fix formatting issue

This commit is contained in:
2024-03-20 08:13:27 +00:00
parent 3fda145ea0
commit 62a04fa842
8 changed files with 227 additions and 225 deletions

View File

@ -1,22 +1,22 @@
local M = {} local M = {}
M.ui = { M.ui = {
lsp = { lsp = {
signature = false, signature = false,
}, },
theme = "poimandres", theme = "poimandres",
transparency = true, transparency = true,
nvdash = { nvdash = {
load_on_startup = true, load_on_startup = true,
header = { header = {
"|------------------------|", "|------------------------|",
"| NOBODY FUX WITH TUX |", "| NOBODY FUX WITH TUX |",
"|------------------------|", "|------------------------|",
" \\ (•◡•) / ", " \\ (•◡•) / ",
" \\ / ", " \\ / ",
}, },
}, },
} }
return M return M

View File

@ -4,14 +4,14 @@ require("nvim-dap-virtual-text").setup()
local dap, dapui = require("dap"), require("dapui") local dap, dapui = require("dap"), require("dapui")
dap.listeners.before.attach.dapui_config = function() dap.listeners.before.attach.dapui_config = function()
dapui.open() dapui.open()
end end
dap.listeners.before.launch.dapui_config = function() dap.listeners.before.launch.dapui_config = function()
dapui.open() dapui.open()
end end
dap.listeners.before.event_terminated.dapui_config = function() dap.listeners.before.event_terminated.dapui_config = function()
dapui.close() dapui.close()
end end
dap.listeners.before.event_exited.dapui_config = function() dap.listeners.before.event_exited.dapui_config = function()
dapui.close() dapui.close()
end end

View File

@ -7,21 +7,21 @@ local lspconfig = require("lspconfig")
local servers = { "tailwindcss", "eslint", "gopls" } local servers = { "tailwindcss", "eslint", "gopls" }
for _, lsp in ipairs(servers) do for _, lsp in ipairs(servers) do
lspconfig[lsp].setup({ lspconfig[lsp].setup({
on_attach = on_attach, on_attach = on_attach,
capabilities = capabilities, capabilities = capabilities,
}) })
end end
lspconfig.nil_ls.setup({ lspconfig.nil_ls.setup({
on_attach = on_attach, on_attach = on_attach,
capabilities = capabilities, capabilities = capabilities,
cmd = { "nil" }, cmd = { "nil" },
settings = { settings = {
["nil"] = { ["nil"] = {
flake = { flake = {
autoArchive = true, autoArchive = true,
}, },
}, },
}, },
}) })

View File

@ -8,8 +8,8 @@ local opts = {
}, },
presets = { presets = {
long_message_to_split = true, -- long messages will be sent to a split long_message_to_split = true, -- long messages will be sent to a split
inc_rename = false, -- enables an input dialog for inc-rename.nvim inc_rename = false, -- enables an input dialog for inc-rename.nvim
lsp_doc_border = false, -- add a border to hover docs and signature help lsp_doc_border = false, -- add a border to hover docs and signature help
}, },
} }

View File

@ -4,24 +4,24 @@ local map = vim.keymap.set
local g = vim.g local g = vim.g
local float_opts = { local float_opts = {
relative = "editor", relative = "editor",
row = 0.13, row = 0.13,
col = 0.14, col = 0.14,
width = 0.7, width = 0.7,
height = 0.7, height = 0.7,
border = "single", border = "single",
} }
local toggleTerm = function() local toggleTerm = function()
require("nvchad.term").toggle({ pos = "float", id = "float", float_opts = float_opts }) require("nvchad.term").toggle({ pos = "float", id = "float", float_opts = float_opts })
end end
local toggleLazygit = function() local toggleLazygit = function()
require("nvchad.term").toggle({ pos = "float", id = "lazygit", float_opts = float_opts, cmd = "lazygit" }) require("nvchad.term").toggle({ pos = "float", id = "lazygit", float_opts = float_opts, cmd = "lazygit" })
end end
local toggleTreesj = function() local toggleTreesj = function()
require("treesj").toggle() require("treesj").toggle()
end end
map({ "n", "t" }, "<F7>", toggleTerm, { desc = "Toggle Floating Terminal" }) map({ "n", "t" }, "<F7>", toggleTerm, { desc = "Toggle Floating Terminal" })
@ -45,14 +45,14 @@ map("n", "<C-x>", "<cmd>DapTerminate<cr>", { desc = "Terminate" })
map("n", "<C-o>", "<cmd>DapStepOver<cr>", { desc = "Step over" }) map("n", "<C-o>", "<cmd>DapStepOver<cr>", { desc = "Step over" })
if g.neovide then if g.neovide then
local zoomInNeovide = function() local zoomInNeovide = function()
g.neovide_scale_factor = g.neovide_scale_factor + 0.1 g.neovide_scale_factor = g.neovide_scale_factor + 0.1
end end
local zoomOutNeovide = function() local zoomOutNeovide = function()
g.neovide_scale_factor = g.neovide_scale_factor - 0.1 g.neovide_scale_factor = g.neovide_scale_factor - 0.1
end end
map("n", "<C-=>", zoomInNeovide, { desc = "Zoom In (Neovide)" }) map("n", "<C-=>", zoomInNeovide, { desc = "Zoom In (Neovide)" })
map("n", "<C-->", zoomOutNeovide, { desc = "Zoom Out (Neovide)" }) map("n", "<C-->", zoomOutNeovide, { desc = "Zoom Out (Neovide)" })
end end

View File

@ -1,4 +1,4 @@
require "nvchad.options" require("nvchad.options")
local opt = vim.opt local opt = vim.opt
local g = vim.g local g = vim.g
@ -10,4 +10,3 @@ opt.guifont = "FiraCode Nerd Font:h12"
-- neovide stuff -- neovide stuff
g.neovide_scale_factor = 0.7 g.neovide_scale_factor = 0.7
-- g.neovide_transparency = 0.8 -- g.neovide_transparency = 0.8

View File

@ -1,176 +1,176 @@
local overrides = require("configs.overrides") local overrides = require("configs.overrides")
local plugins = { local plugins = {
{ {
"stevearc/conform.nvim", "stevearc/conform.nvim",
event = { "BufWritePre" }, event = { "BufWritePre" },
cmd = { "ConformInfo" }, cmd = { "ConformInfo" },
config = function() config = function()
require("configs.conform") require("configs.conform")
end, end,
}, },
{ {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
opts = overrides.treesitter, opts = overrides.treesitter,
}, },
{ {
"williamboman/mason.nvim", "williamboman/mason.nvim",
opts = overrides.mason, opts = overrides.mason,
}, },
{ {
"David-Kunz/gen.nvim", "David-Kunz/gen.nvim",
lazy = false, lazy = false,
opts = function() opts = function()
return require("configs.gen") return require("configs.gen")
end, end,
}, },
{ {
"Shatur/neovim-session-manager", "Shatur/neovim-session-manager",
dependencies = { dependencies = {
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",
"stevearc/dressing.nvim", "stevearc/dressing.nvim",
}, },
event = "BufWritePost", event = "BufWritePost",
cmd = "SessionManager", cmd = "SessionManager",
}, },
{ {
"folke/noice.nvim", "folke/noice.nvim",
event = "VeryLazy", event = "VeryLazy",
dependencies = { dependencies = {
"MunifTanjim/nui.nvim", "MunifTanjim/nui.nvim",
"rcarriga/nvim-notify", "rcarriga/nvim-notify",
}, },
opts = function() opts = function()
return require("configs.noice") return require("configs.noice")
end, end,
}, },
{ {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
config = function() config = function()
require("nvchad.configs.lspconfig").defaults() require("nvchad.configs.lspconfig").defaults()
require("configs.lspconfig") require("configs.lspconfig")
end, end,
}, },
{ {
"nvimtools/none-ls.nvim", "nvimtools/none-ls.nvim",
event = "VeryLazy", event = "VeryLazy",
opts = function() opts = function()
return require("configs.null-ls") return require("configs.null-ls")
end, end,
}, },
{ {
"windwp/nvim-ts-autotag", "windwp/nvim-ts-autotag",
ft = { "javascript", "javascriptreact", "typescript", "typescriptreact" }, ft = { "javascript", "javascriptreact", "typescript", "typescriptreact" },
config = function() config = function()
require("nvim-ts-autotag").setup() require("nvim-ts-autotag").setup()
end, end,
}, },
{ {
"wakatime/vim-wakatime", "wakatime/vim-wakatime",
lazy = false, lazy = false,
}, },
{ {
"nvim-treesitter/nvim-treesitter-context", "nvim-treesitter/nvim-treesitter-context",
event = "BufReadPost", event = "BufReadPost",
}, },
{ {
"Wansmer/treesj", "Wansmer/treesj",
cmd = { "TSJToggle" }, cmd = { "TSJToggle" },
}, },
{ {
"hedyhli/outline.nvim", "hedyhli/outline.nvim",
lazy = true, lazy = true,
cmd = { "Outline", "OutlineOpen" }, cmd = { "Outline", "OutlineOpen" },
opts = {}, opts = {},
}, },
{ {
"folke/trouble.nvim", "folke/trouble.nvim",
cmd = { "Trouble", "TroubleToggle" }, cmd = { "Trouble", "TroubleToggle" },
}, },
{ {
"folke/todo-comments.nvim", "folke/todo-comments.nvim",
cmd = { "TodoTrouble", "TodoTelescope" }, cmd = { "TodoTrouble", "TodoTelescope" },
config = true, config = true,
}, },
{ {
"folke/neodev.nvim", "folke/neodev.nvim",
event = "VeryLazy", event = "VeryLazy",
config = function() config = function()
require("neodev").setup({ require("neodev").setup({
library = { library = {
plugins = { "nvim-dap-ui" }, plugins = { "nvim-dap-ui" },
types = true, types = true,
}, },
}) })
end, end,
}, },
{ {
"mfussenegger/nvim-dap", "mfussenegger/nvim-dap",
config = function() config = function()
require("configs.dap") require("configs.dap")
end, end,
dependencies = { dependencies = {
"rcarriga/nvim-dap-ui", "rcarriga/nvim-dap-ui",
"nvim-neotest/nvim-nio", "nvim-neotest/nvim-nio",
"theHamsta/nvim-dap-virtual-text", "theHamsta/nvim-dap-virtual-text",
}, },
}, },
{ {
"nat-418/boole.nvim", "nat-418/boole.nvim",
event = "VeryLazy", event = "VeryLazy",
config = function() config = function()
require("boole").setup() require("boole").setup()
end, end,
}, },
-- Language specific plugins -- Language specific plugins
{ {
"pmizio/typescript-tools.nvim", "pmizio/typescript-tools.nvim",
dependencies = { dependencies = {
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
}, },
config = function() config = function()
require("configs.ts") require("configs.ts")
end, end,
ft = { ft = {
"javascript", "javascript",
"typescript", "typescript",
"javascriptreact", "javascriptreact",
"typescriptreact", "typescriptreact",
}, },
}, },
{ {
"ray-x/go.nvim", "ray-x/go.nvim",
dependencies = { dependencies = {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
"mfussenegger/nvim-dap", "mfussenegger/nvim-dap",
"rcarriga/nvim-dap-ui", "rcarriga/nvim-dap-ui",
}, },
event = { "CmdlineEnter" }, event = { "CmdlineEnter" },
config = function() config = function()
require("configs.go") require("configs.go")
end, end,
ft = { ft = {
"go", "go",
"gomod", "gomod",
"gosum", "gosum",
"gowork", "gowork",
"gotmpl", "gotmpl",
}, },
build = ':lua require("go.install").update_all_sync()', build = ':lua require("go.install").update_all_sync()',
}, },
{ {
"mrcjkb/rustaceanvim", "mrcjkb/rustaceanvim",
config = function() config = function()
require("configs.rust") require("configs.rust")
end, end,
version = "^4", version = "^4",
dependencies = { dependencies = {
"mfussenegger/nvim-dap", "mfussenegger/nvim-dap",
"rcarriga/nvim-dap-ui", "rcarriga/nvim-dap-ui",
}, },
ft = { "rust" }, ft = { "rust" },
}, },
} }
return plugins return plugins

3
stylua.toml Normal file
View File

@ -0,0 +1,3 @@
line_endings = "Unix"
indent_type = "Spaces"
indent_width = 2