From c18e5408358b0e280ca02d5554762170b259cbf9 Mon Sep 17 00:00:00 2001 From: Aram Markarov Date: Thu, 11 Dec 2025 00:21:33 +0100 Subject: [PATCH] formatted --- init.lua | 9 +- lua/autocmd.lua | 10 +- lua/config/autosession.lua | 73 ++++++----- lua/config/barbar.lua | 27 ++--- lua/config/colorizer.lua | 7 +- lua/config/copilot.lua | 64 ---------- lua/config/dap.lua | 178 +++++++++++++-------------- lua/config/indent-blankline.lua | 33 ++--- lua/config/lazy.lua | 42 ++++--- lua/config/lspconfig.lua | 139 ++++++++++----------- lua/config/lualine.lua | 129 +++++++------------- lua/config/notify.lua | 209 ++++++++++++++++---------------- lua/config/nvimtree.lua | 16 +-- lua/config/themedark.lua | 44 +++---- lua/config/treesitter.lua | 24 +--- lua/config/undotree.lua | 35 +++--- lua/globals.lua | 10 +- lua/mappings.lua | 27 +++-- lua/options.lua | 8 +- lua/plugins/init.lua | 198 +++++++++--------------------- 20 files changed, 520 insertions(+), 762 deletions(-) delete mode 100644 lua/config/copilot.lua diff --git a/init.lua b/init.lua index 187251d..ccba47a 100644 --- a/init.lua +++ b/init.lua @@ -3,16 +3,13 @@ require("options") require("config.lazy") require("mappings") vim.cmd("source ~/.config/nvim/suda.vim") -local time = tonumber( os.date "%H" ) +local time = tonumber(os.date "%H") vim.filetype.add({ - pattern = { - [".*/hypr/.*%.conf"] = "hyprlang", - [".*/uwsm/env.*"] = "zsh", - } + pattern = {[".*/hypr/.*%.conf"] = "hyprlang", [".*/uwsm/env.*"] = "zsh"} }) -vim.cmd[[colorscheme catppuccin-macchiato]] +vim.cmd [[colorscheme catppuccin-macchiato]] -- vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) -- vim.api.nvim_set_hl(0, "NormalNC", { bg = "none" }) diff --git a/lua/autocmd.lua b/lua/autocmd.lua index 0f01026..b024a51 100644 --- a/lua/autocmd.lua +++ b/lua/autocmd.lua @@ -1,10 +1,8 @@ local autocmd = vim.api.nvim_create_autocmd autocmd("BufWritePre", { - callback = function() - local ok = pcall(function() - vim.cmd "undojoin" - end) - vim.cmd "Neoformat" - end, + callback = function() + local ok = pcall(function() vim.cmd "undojoin" end) + vim.cmd "Neoformat" + end }) diff --git a/lua/config/autosession.lua b/lua/config/autosession.lua index d9e375e..b6d9306 100644 --- a/lua/config/autosession.lua +++ b/lua/config/autosession.lua @@ -1,38 +1,37 @@ -require("auto-session").setup ({ - { - enabled = true, - root_dir = vim.fn.stdpath "data" .. "/sessions/", - auto_save = true, - auto_restore = true, - auto_create = true, - suppressed_dirs = nil, - allowed_dirs = nil, - auto_restore_last_session = false, - use_git_branch = false, - lazy_support = true, - bypass_save_filetypes = nil, - close_unsupported_windows = true, - args_allow_single_directory = true, - args_allow_files_auto_save = false, - continue_restore_on_error = true, - show_auto_restore_notif = false, - cwd_change_handling = false, - lsp_stop_on_restore = false, - log_level = "error", - session_lens = { - load_on_setup = true, - theme_conf = { - }, - previewer = false, - mappings = { - delete_session = { "i", "" }, - alternate_session = { "i", "" }, - copy_session = { "i", "" }, - }, - session_control = { - control_dir = vim.fn.stdpath "data" .. "/auto_session/", - control_filename = "session_control.json", - }, - }, - } +require("auto-session").setup({ + { + enabled = true, + root_dir = vim.fn.stdpath "data" .. "/sessions/", + auto_save = true, + auto_restore = true, + auto_create = true, + suppressed_dirs = nil, + allowed_dirs = nil, + auto_restore_last_session = false, + use_git_branch = false, + lazy_support = true, + bypass_save_filetypes = nil, + close_unsupported_windows = true, + args_allow_single_directory = true, + args_allow_files_auto_save = false, + continue_restore_on_error = true, + show_auto_restore_notif = false, + cwd_change_handling = false, + lsp_stop_on_restore = false, + log_level = "error", + session_lens = { + load_on_setup = true, + theme_conf = {}, + previewer = false, + mappings = { + delete_session = {"i", ""}, + alternate_session = {"i", ""}, + copy_session = {"i", ""} + }, + session_control = { + control_dir = vim.fn.stdpath "data" .. "/auto_session/", + control_filename = "session_control.json" + } + } + } }) diff --git a/lua/config/barbar.lua b/lua/config/barbar.lua index 8fe7033..ca5a8a7 100644 --- a/lua/config/barbar.lua +++ b/lua/config/barbar.lua @@ -1,32 +1,25 @@ -require("bufferline").setup ({ +require("bufferline").setup({ options = { diagnostics = "coc", diagnostics_indicator = function(count, level, diagnostics_dict, context) local s = " " for e, n in pairs(diagnostics_dict) do - local sym = e == "error" and " " - or (e == "warning" and " " or " ") + local sym = e == "error" and " " or + (e == "warning" and " " or " ") s = s .. n .. sym end return s end, always_show_bufferline = true, offsets = { - { - filetype = "NvimTree", - text = "Explorer", - text_align = "center", - }, - { - filetype = "snacks_layout_box", - }, + {filetype = "NvimTree", text = "Explorer", text_align = "center"}, + {filetype = "snacks_layout_box"} }, - vim.api.nvim_create_autocmd({ "BufAdd", "BufDelete" }, { + vim.api.nvim_create_autocmd({"BufAdd", "BufDelete"}, + { callback = function() - vim.schedule(function() - pcall(nvim_bufferline) - end) - end, + vim.schedule(function() pcall(nvim_bufferline) end) + end }) - }, + } }) diff --git a/lua/config/colorizer.lua b/lua/config/colorizer.lua index 1c130d1..ed68fe2 100644 --- a/lua/config/colorizer.lua +++ b/lua/config/colorizer.lua @@ -4,7 +4,8 @@ require("colorizer").setup({ virtualtext = "■", css = true, tailwind = true, - sass = { enable = true, parsers = { "css" }}, - virtualtext_inline = 'before', - }, + sass = {enable = true, parsers = {"css"}}, + virtualtext_inline = 'before' + } }) + diff --git a/lua/config/copilot.lua b/lua/config/copilot.lua deleted file mode 100644 index fad611d..0000000 --- a/lua/config/copilot.lua +++ /dev/null @@ -1,64 +0,0 @@ -require("copilot").setup({ - panel = { - enabled = true, - auto_refresh = true, - keymap = { - jump_prev = "[[", - jump_next = "]]", - accept = "", - refresh = "gr", - open = "" - }, - layout = { - position = "bottom", -- | top | left | right | horizontal | vertical - ratio = 0.4 - }, - }, - suggestion = { - enabled = true, - auto_trigger = true, - hide_during_completion = true, - debounce = 75, - keymap = { - accept = "", - accept_word = false, - accept_line = false, - next = "", - prev = "", - dismiss = "", - }, - }, - filetypes = { - -- yaml = false, - -- markdown = false, - -- help = false, - -- gitcommit = false, - -- gitrebase = false, - -- hgcommit = false, - -- svn = false, - -- cvs = false, - -- python = false, - -- html = false, - -- css = false, - -- sh = false, - -- tex = false, - -- typescript = false, - -- java = false, - -- swift = false, - -- cpp = false, - -- hypr = false, - -- ["."] = false, - }, - copilot_node_command = 'node', -- Node.js version must be > 18.x - server_opts_overrides = {}, - vim.api.nvim_create_autocmd({ "VimLeavePre" }, { - callback = function() - vim.cmd( "CopilotChatSave AutoSave" ) - end, - }), - vim.api.nvim_create_autocmd( "VimEnter", { - callback = function() - vim.cmd( "CopilotChatLoad AutoSave" ) - end, - }), -}) diff --git a/lua/config/dap.lua b/lua/config/dap.lua index d88da6e..e3b054f 100644 --- a/lua/config/dap.lua +++ b/lua/config/dap.lua @@ -1,115 +1,111 @@ local dap = require('dap') dap.adapters.python = function(cb, config) - if config.request == 'attach' then - ---@diagnostic disable-next-line: undefined-field - local port = (config.connect or config).port - ---@diagnostic disable-next-line: undefined-field - local host = (config.connect or config).host or '127.0.0.1' - cb({ - type = 'server', - port = assert(port, '`connect.port` is required for a python `attach` configuration'), - host = host, - options = { - source_filetype = 'python', - }, - }) - else - cb({ - type = 'executable', - command = 'path/to/virtualenvs/debugpy/bin/python', - args = { '-m', 'debugpy.adapter' }, - options = { - source_filetype = 'python', - }, - }) - end + if config.request == 'attach' then + ---@diagnostic disable-next-line: undefined-field + local port = (config.connect or config).port + ---@diagnostic disable-next-line: undefined-field + local host = (config.connect or config).host or '127.0.0.1' + cb({ + type = 'server', + port = assert(port, + '`connect.port` is required for a python `attach` configuration'), + host = host, + options = {source_filetype = 'python'} + }) + else + cb({ + type = 'executable', + command = 'path/to/virtualenvs/debugpy/bin/python', + args = {'-m', 'debugpy.adapter'}, + options = {source_filetype = 'python'} + }) + end end dap.configurations.python = { - { - -- The first three options are required by nvim-dap - type = 'python'; -- the type here established the link to the adapter definition: `dap.adapters.python` - request = 'launch'; - name = "Launch file"; + { + -- The first three options are required by nvim-dap + type = 'python', -- the type here established the link to the adapter definition: `dap.adapters.python` + request = 'launch', + name = "Launch file", - -- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options + -- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options - program = "${file}"; -- This configuration will launch the current file if used. - pythonPath = function() - -- debugpy supports launching an application with a different interpreter then the one used to launch debugpy itself. - -- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within. - -- You could adapt this - to for example use the `VIRTUAL_ENV` environment variable. - local cwd = vim.fn.getcwd() - if vim.fn.executable(cwd .. '/venv/bin/python') == 1 then - return cwd .. '/venv/bin/python' - elseif vim.fn.executable(cwd .. '/.venv/bin/python') == 1 then - return cwd .. '/.venv/bin/python' - else - return '/home/zach/miniconda3/bin/python' - end - end; - }, + program = "${file}", -- This configuration will launch the current file if used. + pythonPath = function() + -- debugpy supports launching an application with a different interpreter then the one used to launch debugpy itself. + -- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within. + -- You could adapt this - to for example use the `VIRTUAL_ENV` environment variable. + local cwd = vim.fn.getcwd() + if vim.fn.executable(cwd .. '/venv/bin/python') == 1 then + return cwd .. '/venv/bin/python' + elseif vim.fn.executable(cwd .. '/.venv/bin/python') == 1 then + return cwd .. '/.venv/bin/python' + else + return '/home/zach/miniconda3/bin/python' + end + end + } } dap.adapters.lldb = { - type = 'executable', - command = '/usr/bin/lldb-vscode', -- adjust as needed, must be absolute path - name = 'lldb' + type = 'executable', + command = '/usr/bin/lldb-vscode', -- adjust as needed, must be absolute path + name = 'lldb' } dap.configurations.cpp = { - { - name = 'Launch', - type = 'lldb', - request = 'launch', - program = function() - return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') - end, - cwd = '${workspaceFolder}', - stopOnEntry = false, - args = {}, + { + name = 'Launch', + type = 'lldb', + request = 'launch', + program = function() + return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', + 'file') + end, + cwd = '${workspaceFolder}', + stopOnEntry = false, + args = {} - -- 💀 - -- if you change `runInTerminal` to true, you might need to change the yama/ptrace_scope setting: - -- - -- echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope - -- - -- Otherwise you might get the following error: - -- - -- Error on launch: Failed to attach to the target process - -- - -- But you should be aware of the implications: - -- https://www.kernel.org/doc/html/latest/admin-guide/LSM/Yama.html - -- runInTerminal = false, - }, + -- 💀 + -- if you change `runInTerminal` to true, you might need to change the yama/ptrace_scope setting: + -- + -- echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope + -- + -- Otherwise you might get the following error: + -- + -- Error on launch: Failed to attach to the target process + -- + -- But you should be aware of the implications: + -- https://www.kernel.org/doc/html/latest/admin-guide/LSM/Yama.html + -- runInTerminal = false, + } } dap.adapters["pwa-node"] = { - type = "server", - host = "localhost", - port = "${port}", - executable = { - command = "node", - -- 💀 Make sure to update this path to point to your installation - args = {"/home/zach/.config/nvim/java-dap/js-debug/src/dapDebugServer.js", "${port}"}, - } + type = "server", + host = "localhost", + port = "${port}", + executable = { + command = "node", + -- 💀 Make sure to update this path to point to your installation + args = { + "/home/zach/.config/nvim/java-dap/js-debug/src/dapDebugServer.js", + "${port}" + } + } } dap.configurations.javascript = { - { - type = "pwa-node", - request = "launch", - name = "Launch file", - program = "${file}", - cwd = "${workspaceFolder}", - }, + { + type = "pwa-node", + request = "launch", + name = "Launch file", + program = "${file}", + cwd = "${workspaceFolder}" + } } dap.configurations.java = { - { - type = "java", - name = "Debug", - request = "launch", - program = "${file}", - }, + {type = "java", name = "Debug", request = "launch", program = "${file}"} } diff --git a/lua/config/indent-blankline.lua b/lua/config/indent-blankline.lua index 9410fc0..e6fb5c1 100644 --- a/lua/config/indent-blankline.lua +++ b/lua/config/indent-blankline.lua @@ -1,29 +1,22 @@ local highlight = { - "RainbowRed", - "RainbowYellow", - "RainbowBlue", - "RainbowOrange", - "RainbowGreen", - "RainbowViolet", - "RainbowCyan", + "RainbowRed", "RainbowYellow", "RainbowBlue", "RainbowOrange", + "RainbowGreen", "RainbowViolet", "RainbowCyan" } local hooks = require "ibl.hooks" -- create the highlight groups in the highlight setup hook, so they are reset -- every time the colorscheme changes hooks.register(hooks.type.HIGHLIGHT_SETUP, function() - vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#E06C75" }) - vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#E5C07B" }) - vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#61AFEF" }) - vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#D19A66" }) - vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#98C379" }) - vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#C678DD" }) - vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#56B6C2" }) + vim.api.nvim_set_hl(0, "RainbowRed", {fg = "#E06C75"}) + vim.api.nvim_set_hl(0, "RainbowYellow", {fg = "#E5C07B"}) + vim.api.nvim_set_hl(0, "RainbowBlue", {fg = "#61AFEF"}) + vim.api.nvim_set_hl(0, "RainbowOrange", {fg = "#D19A66"}) + vim.api.nvim_set_hl(0, "RainbowGreen", {fg = "#98C379"}) + vim.api.nvim_set_hl(0, "RainbowViolet", {fg = "#C678DD"}) + vim.api.nvim_set_hl(0, "RainbowCyan", {fg = "#56B6C2"}) end) -vim.g.rainbow_delimiters = { highlight = highlight } -require("ibl").setup { - indent = { char = "▏" }, - scope = { highlight = highlight } -} +vim.g.rainbow_delimiters = {highlight = highlight} +require("ibl").setup {indent = {char = "▏"}, scope = {highlight = highlight}} -hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark) +hooks.register(hooks.type.SCOPE_HIGHLIGHT, + hooks.builtin.scope_highlight_from_extmark) diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index f5ee74c..7eeca95 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -1,17 +1,19 @@ -- Bootstrap lazy.nvim local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ + "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, + lazypath + }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + {"Failed to clone lazy.nvim:\n", "ErrorMsg"}, {out, "WarningMsg"}, + {"\nPress any key to exit..."} + }, true, {}) + vim.fn.getchar() + os.exit(1) + end end vim.opt.rtp:prepend(lazypath) @@ -23,13 +25,13 @@ vim.g.maplocalleader = "\\" -- Setup lazy.nvim require("lazy").setup({ - spec = { - -- import your plugins - { import = "plugins" }, - }, - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "habamax" } }, - -- automatically check for plugin updates - checker = { enabled = true }, + spec = { + -- import your plugins + {import = "plugins"} + }, + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = {colorscheme = {"habamax"}}, + -- automatically check for plugin updates + checker = {enabled = true} }) diff --git a/lua/config/lspconfig.lua b/lua/config/lspconfig.lua index 3bb5c09..8ba0281 100644 --- a/lua/config/lspconfig.lua +++ b/lua/config/lspconfig.lua @@ -1,38 +1,35 @@ local cmp = require("cmp") local cmp_lsp = require("cmp_nvim_lsp") -local capabilities = vim.tbl_deep_extend( - "force", - {}, - vim.lsp.protocol.make_client_capabilities(), - cmp_lsp.default_capabilities() -) +local capabilities = vim.tbl_deep_extend("force", {}, vim.lsp.protocol + .make_client_capabilities(), + cmp_lsp.default_capabilities()) -local cmp_kinds = { --change later - Text = ' ', - Method = ' ', - Function = ' ', - Constructor = ' ', - Field = ' ', - Variable = ' ', - Class = ' ', - Interface = ' ', - Module = ' ', - Property = ' ', - Unit = ' ', - Value = ' ', - Enum = ' ', - Keyword = ' ', - Snippet = ' ', - Color = ' ', - File = ' ', - Reference = ' ', - Folder = ' ', - EnumMember = ' ', - Constant = ' ', - Struct = ' ', - Event = ' ', - Operator = ' ', - TypeParameter = ' ', +local cmp_kinds = { -- change later + Text = ' ', + Method = ' ', + Function = ' ', + Constructor = ' ', + Field = ' ', + Variable = ' ', + Class = ' ', + Interface = ' ', + Module = ' ', + Property = ' ', + Unit = ' ', + Value = ' ', + Enum = ' ', + Keyword = ' ', + Snippet = ' ', + Color = ' ', + File = ' ', + Reference = ' ', + Folder = ' ', + EnumMember = ' ', + Constant = ' ', + Struct = ' ', + Event = ' ', + Operator = ' ', + TypeParameter = ' ' } require("fidget").setup({}) @@ -40,21 +37,13 @@ require("mason").setup() require("mason-lspconfig").setup({ automatic_enable = true, ensure_installed = { - "lua_ls", - "rust_analyzer", - "jdtls", - "prettier", - "yamlls", - "ts_ls", - "tailwindcss", - "html", - "cssls", - "shfmt", + "lua_ls", "rust_analyzer", "jdtls", "yamlls", "ts_ls", "tailwindcss", + "html", "cssls" }, handlers = { function(server_name) -- default handler (optional) require("lspconfig")[server_name].setup { - capabilities = capabilities, + capabilities = capabilities } end, @@ -62,14 +51,15 @@ require("mason-lspconfig").setup({ local lspconfig = require("lspconfig") lspconfig.zls.setup({ capabilities = capabilities, - root_dir = lspconfig.util.root_pattern(".git", "build.zig", "zls.json"), + root_dir = lspconfig.util.root_pattern(".git", "build.zig", + "zls.json"), settings = { zls = { enable_inlay_hints = true, enable_snippets = true, - warn_style = true, - }, - }, + warn_style = true + } + } }) vim.g.zig_fmt_parse_errors = 0 vim.g.zig_fmt_autosave = 0 @@ -81,42 +71,43 @@ require("mason-lspconfig").setup({ capabilities = capabilities, settings = { Lua = { - runtime = { version = "Lua 5.1" }, + runtime = {version = "Lua 5.1"}, diagnostics = { - globals = { "bit", "vim", "it", "describe", "before_each", "after_each" }, + globals = { + "bit", "vim", "it", "describe", "before_each", + "after_each" + } } } } } - end, + end } }) cmp.setup { formatting = { - fields = { 'kind', 'abbr' }, + fields = {'kind', 'abbr'}, format = function(entry, vim_item) vim_item.kind = cmp_kinds[vim_item.kind] or '' if entry.completion_item.detail then vim_item.menu = entry.completion_item.detail end return vim_item - end, + end }, - completion = { completeopt = "menu,menuone" }, + completion = {completeopt = "menu,menuone"}, snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) - end, + expand = function(args) require("luasnip").lsp_expand(args.body) end }, - mapping = { --change later zach is ???? + mapping = { -- change later zach is ???? [""] = cmp.mapping.scroll_docs(-4), [""] = cmp.mapping.scroll_docs(4), [""] = cmp.mapping.complete(), [""] = cmp.mapping.close(), [""] = cmp.mapping.confirm { behavior = cmp.ConfirmBehavior.Insert, - select = true, + select = true }, [""] = cmp.mapping(function(fallback) if cmp.visible() then @@ -126,7 +117,7 @@ cmp.setup { else fallback() end - end, { "i", "s" }), + end, {"i", "s"}), [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_prev_item() @@ -135,16 +126,13 @@ cmp.setup { else fallback() end - end, { "i", "s" }), + end, {"i", "s"}) }, sources = cmp.config.sources({ - { name = "path" }, - { name = "nvim_lsp" }, - { name = "luasnip" }, -- snip snip - { name = "buffer" }, - { name = "nvim_lua" }, - }), + {name = "path"}, {name = "nvim_lsp"}, {name = "luasnip"}, -- snip snip + {name = "buffer"}, {name = "nvim_lua"} + }) } vim.diagnostic.config({ @@ -156,21 +144,18 @@ vim.diagnostic.config({ border = "rounded", source = "always", header = "", - prefix = "", - }, + prefix = "" + } }) -vim.api.nvim_set_keymap("n", "gd", "lua vim.lsp.buf.definition()", { noremap = true, silent = true }) -vim.api.nvim_set_keymap("n", "gD", "lua vim.lsp.buf.declaration()", { noremap = true, silent = true }) +vim.api.nvim_set_keymap("n", "gd", "lua vim.lsp.buf.definition()", + {noremap = true, silent = true}) +vim.api.nvim_set_keymap("n", "gD", "lua vim.lsp.buf.declaration()", + {noremap = true, silent = true}) local lspconfig = require "lspconfig" -- EXAMPLE -local servers = { +local servers = {} -} - -for _, server in ipairs(servers) do - lspconfig[server].setup { - } -end +for _, server in ipairs(servers) do lspconfig[server].setup {} end diff --git a/lua/config/lualine.lua b/lua/config/lualine.lua index bc27c7c..fff577c 100644 --- a/lua/config/lualine.lua +++ b/lua/config/lualine.lua @@ -1,22 +1,21 @@ local fn = vim.fn local function get_coc_lsp_client() - local clients = vim.g.coc_service_initialized and vim.fn['CocAction']('services') or {} - for _, client in pairs(clients) do - if client['state'] == 'running' then - local client_name = client['id'] - -- Remove 'languageserver.' prefix if it exists - client_name = client_name:gsub('^languageserver%.', '') - return client_name + local clients = vim.g.coc_service_initialized and + vim.fn['CocAction']('services') or {} + for _, client in pairs(clients) do + if client['state'] == 'running' then + local client_name = client['id'] + -- Remove 'languageserver.' prefix if it exists + client_name = client_name:gsub('^languageserver%.', '') + return client_name + end end - end - return '' + return '' end local function spell() - if vim.o.spell then - return string.format("[SPELL]") - end + if vim.o.spell then return string.format("[SPELL]") end return "" end @@ -24,11 +23,10 @@ end --- show indicator for Chinese IME local function ime_state() if vim.g.is_mac then - local layout = fn.libcall(vim.g.XkbSwitchLib, "Xkb_Switch_getXkbLayout", "") + local layout = fn.libcall(vim.g.XkbSwitchLib, "Xkb_Switch_getXkbLayout", + "") local res = fn.match(layout, [[\v(Squirrel\.Rime|SCIM.ITABC)]]) - if res ~= -1 then - return "[CN]" - end + if res ~= -1 then return "[CN]" end end return "" @@ -36,24 +34,20 @@ end local diff = function() local git_status = vim.b.gitsigns_status_dict - if git_status == nil then - return - end + if git_status == nil then return end local modify_num = git_status.changed local remove_num = git_status.removed local add_num = git_status.added - local info = { added = add_num, modified = modify_num, removed = remove_num } + local info = {added = add_num, modified = modify_num, removed = remove_num} -- vim.print(info) return info end local virtual_env = function() -- only show virtual env for Python - if vim.bo.filetype ~= "python" then - return "" - end + if vim.bo.filetype ~= "python" then return "" end local conda_env = os.getenv("CONDA_DEFAULT_ENV") local venv_path = os.getenv("VIRTUAL_ENV") @@ -76,16 +70,12 @@ require("lualine").setup { theme = "auto", globalstatus = true, component_separators = '', - section_separators = { left = '', right = '' }, + section_separators = {left = '', right = ''}, disabled_filetypes = {}, - always_divide_middle = true, + always_divide_middle = true }, sections = { - lualine_a = { - { - "mode", - }, - }, + lualine_a = {{"mode"}}, lualine_b = { { "branch", @@ -93,73 +83,44 @@ require("lualine").setup { -- truncate branch name in case the name is too long return string.sub(name, 1, 20) end, - color = { gui = "italic,bold" }, - separator = { right = "" }, - }, - { - virtual_env, - color = { fg = "black", bg = "#F1CA81" }, - }, + color = {gui = "italic,bold"}, + separator = {right = ""} + }, {virtual_env, color = {fg = "black", bg = "#F1CA81"}} }, lualine_c = { - { - "filename", - symbols = { - readonly = "[🔒]", - }, - }, - { - "diff", - source = diff, - }, - { - "%S", - color = { gui = "bold", fg = "cyan" }, - }, - { - spell, - color = { fg = "black", bg = "#a7c080" }, - }, + {"filename", symbols = {readonly = "[🔒]"}}, + {"diff", source = diff}, + {"%S", color = {gui = "bold", fg = "cyan"}}, + {spell, color = {fg = "black", bg = "#a7c080"}} }, lualine_x = { - { - ime_state, - color = { fg = "black", bg = "#f46868" }, - }, - { - get_coc_lsp_client, - icon = " LSP:", - }, - { + {ime_state, color = {fg = "black", bg = "#f46868"}}, + {get_coc_lsp_client, icon = " LSP:"}, { "diagnostics", - sources = { "nvim_diagnostic" }, - symbols = { error = "🆇 ", warn = "⚠️ ", info = "ℹ️ ", hint = " " }, - }, + sources = {"nvim_diagnostic"}, + symbols = { + error = "🆇 ", + warn = "⚠️ ", + info = "ℹ️ ", + hint = " " + } + } }, lualine_y = { - { "encoding", fmt = string.upper }, - { - "fileformat", - symbols = { - unix = "", - dos = "", - mac = "", - }, - }, - "filetype", - }, - lualine_z = { - "progress", + {"encoding", fmt = string.upper}, + {"fileformat", symbols = {unix = "", dos = "", mac = ""}}, + "filetype" }, + lualine_z = {"progress"} }, inactive_sections = { lualine_a = {}, lualine_b = {}, - lualine_c = { "filename" }, - lualine_x = { "location" }, + lualine_c = {"filename"}, + lualine_x = {"location"}, lualine_y = {}, - lualine_z = {}, + lualine_z = {} }, tabline = {}, - extensions = { "quickfix", "fugitive", "nvim-tree" }, + extensions = {"quickfix", "fugitive", "nvim-tree"} } diff --git a/lua/config/notify.lua b/lua/config/notify.lua index c66f637..bd975cb 100644 --- a/lua/config/notify.lua +++ b/lua/config/notify.lua @@ -3,22 +3,22 @@ local dap = require('dap') require('notify').setup({ render = "wrapped-default", - timeout = 6000, - max_width = 50, - minimum_width = 50, - level = "info", - fps = 60, - icons = { - ERROR = "", - WARN = "", - INFO = "", - DEBUG = "", - TRACE = "✎", - }, + timeout = 6000, + max_width = 50, + minimum_width = 50, + level = "info", + fps = 60, + icons = { + ERROR = "", + WARN = "", + INFO = "", + DEBUG = "", + TRACE = "✎" + }, on_open = function(win) -- vim.api.nvim_win_set_option(win, 'wrap', true) vim.api.nvim_win_set_option(win, 'breakat', ' ') - end, + end }) -- Utility functions shared between progress reports for LSP and DAP @@ -26,133 +26,134 @@ require('notify').setup({ local client_notifs = {} local function get_notif_data(client_id, token) - if not client_notifs[client_id] then - client_notifs[client_id] = {} - end + if not client_notifs[client_id] then client_notifs[client_id] = {} end - if not client_notifs[client_id][token] then - client_notifs[client_id][token] = {} - end + if not client_notifs[client_id][token] then + client_notifs[client_id][token] = {} + end - return client_notifs[client_id][token] + return client_notifs[client_id][token] end - -local spinner_frames = { "⣾", "⣽", "⣻", "⢿", "⡿", "⣟", "⣯", "⣷" } +local spinner_frames = {"⣾", "⣽", "⣻", "⢿", "⡿", "⣟", "⣯", "⣷"} local function update_spinner(client_id, token) - local notif_data = get_notif_data(client_id, token) + local notif_data = get_notif_data(client_id, token) - if notif_data.spinner then - local new_spinner = (notif_data.spinner + 1) % #spinner_frames - notif_data.spinner = new_spinner + if notif_data.spinner then + local new_spinner = (notif_data.spinner + 1) % #spinner_frames + notif_data.spinner = new_spinner - notif_data.notification = vim.notify(nil, nil, { - hide_from_history = true, - icon = spinner_frames[new_spinner], - replace = notif_data.notification, - }) + notif_data.notification = vim.notify(nil, nil, { + hide_from_history = true, + icon = spinner_frames[new_spinner], + replace = notif_data.notification + }) - vim.defer_fn(function() - update_spinner(client_id, token) - end, 100) - end + vim.defer_fn(function() update_spinner(client_id, token) end, 100) + end end local function format_title(title, client_name) - return client_name .. (#title > 0 and ": " .. title or "") + return client_name .. (#title > 0 and ": " .. title or "") end local function format_message(message, percentage) - return (percentage and percentage .. "%\t" or "") .. (message or "") + return (percentage and percentage .. "%\t" or "") .. (message or "") end -- LSP integration -- Make sure to also have the snippet with the common helper functions in your config! vim.lsp.handlers["$/progress"] = function(_, result, ctx) - local client_id = ctx.client_id + local client_id = ctx.client_id - local val = result.value + local val = result.value - if not val.kind then - return - end + if not val.kind then return end - local notif_data = get_notif_data(client_id, result.token) + local notif_data = get_notif_data(client_id, result.token) - if val.kind == "begin" then - local message = format_message(val.message, val.percentage) + if val.kind == "begin" then + local message = format_message(val.message, val.percentage) - notif_data.notification = vim.notify(message, "info", { - title = format_title(val.title, vim.lsp.get_client_by_id(client_id).name), - icon = spinner_frames[1], - timeout = false, - hide_from_history = false, - }) + notif_data.notification = vim.notify(message, "info", { + title = format_title(val.title, + vim.lsp.get_client_by_id(client_id).name), + icon = spinner_frames[1], + timeout = false, + hide_from_history = false + }) - notif_data.spinner = 1 - update_spinner(client_id, result.token) - elseif val.kind == "report" and notif_data then - notif_data.notification = vim.notify(format_message(val.message, val.percentage), "info", { - replace = notif_data.notification, - hide_from_history = false, - }) - elseif val.kind == "end" and notif_data then - notif_data.notification = - vim.notify(val.message and format_message(val.message) or "Complete", "info", { - icon = "", - replace = notif_data.notification, - timeout = 6000, - }) + notif_data.spinner = 1 + update_spinner(client_id, result.token) + elseif val.kind == "report" and notif_data then + notif_data.notification = vim.notify( + format_message(val.message, val.percentage), + "info", { + replace = notif_data.notification, + hide_from_history = false + }) + elseif val.kind == "end" and notif_data then + notif_data.notification = vim.notify(val.message and + format_message(val.message) or + "Complete", "info", { + icon = "", + replace = notif_data.notification, + timeout = 6000 + }) - notif_data.spinner = nil -end + notif_data.spinner = nil + end end -- table from lsp severity to vim severity. -local severity = { - "error", - "warn", - "info", -} +local severity = {"error", "warn", "info"} -vim.lsp.handlers["window/showMessage"] = function(err, method, params, client_id) - vim.notify(method.message, severity[params.type]) -end +vim.lsp.handlers["window/showMessage"] = + function(err, method, params, client_id) + vim.notify(method.message, severity[params.type]) + end -- DAP integration -- Make sure to also have the snippet with the common helper functions in your config! -dap.listeners.before['event_progressStart']['progress-notifications'] = function(session, body) - local notif_data = get_notif_data("dap", body.progressId) +dap.listeners.before['event_progressStart']['progress-notifications'] = + function(session, body) + local notif_data = get_notif_data("dap", body.progressId) - local message = format_message(body.message, body.percentage) - notif_data.notification = vim.notify(message, "info", { - title = format_title(body.title, session.config.type), - icon = spinner_frames[1], - timeout = false, - hide_from_history = false, - }) + local message = format_message(body.message, body.percentage) + notif_data.notification = vim.notify(message, "info", { + title = format_title(body.title, session.config.type), + icon = spinner_frames[1], + timeout = false, + hide_from_history = false + }) - notif_data.notification.spinner = 1, - update_spinner("dap", body.progressId) -end - -dap.listeners.before['event_progressUpdate']['progress-notifications'] = function(session, body) - local notif_data = get_notif_data("dap", body.progressId) - notif_data.notification = vim.notify(format_message(body.message, body.percentage), "info", { - replace = notif_data.notification, - hide_from_history = false, - }) -end - -dap.listeners.before['event_progressEnd']['progress-notifications'] = function(session, body) - local notif_data = client_notifs["dap"][body.progressId] - notif_data.notification = vim.notify(body.message and format_message(body.message) or "Complete", "info", { - icon = "", - replace = notif_data.notification, - timeout = 6000 - }) - notif_data.spinner = nil + notif_data.notification.spinner = 1, update_spinner("dap", + body.progressId) + end + +dap.listeners.before['event_progressUpdate']['progress-notifications'] = + function(session, body) + local notif_data = get_notif_data("dap", body.progressId) + notif_data.notification = vim.notify( + format_message(body.message, + body.percentage), "info", { + replace = notif_data.notification, + hide_from_history = false + }) + end + +dap.listeners.before['event_progressEnd']['progress-notifications'] = function( + session, body) + local notif_data = client_notifs["dap"][body.progressId] + notif_data.notification = vim.notify(body.message and + format_message(body.message) or + "Complete", "info", { + icon = "", + replace = notif_data.notification, + timeout = 6000 + }) + notif_data.spinner = nil end diff --git a/lua/config/nvimtree.lua b/lua/config/nvimtree.lua index ea7acbc..1a4b8ef 100644 --- a/lua/config/nvimtree.lua +++ b/lua/config/nvimtree.lua @@ -1,14 +1,6 @@ require("nvim-tree").setup({ - sort = { - sorter = "case_sensitive", - }, - view = { - width = 45, - }, - renderer = { - group_empty = true, - }, - filters = { - dotfiles = true, - }, + sort = {sorter = "case_sensitive"}, + view = {width = 45}, + renderer = {group_empty = true}, + filters = {dotfiles = true} }) diff --git a/lua/config/themedark.lua b/lua/config/themedark.lua index d5ef34d..db025a8 100644 --- a/lua/config/themedark.lua +++ b/lua/config/themedark.lua @@ -1,25 +1,25 @@ -- Default options: require("gruvbox").setup({ - terminal_colors = true, -- add neovim terminal colors - undercurl = true, - underline = true, - bold = true, - italic = { - strings = true, - emphasis = true, - comments = true, - operators = false, - folds = true, - }, - strikethrough = true, - invert_selection = false, - invert_signs = false, - invert_tabline = false, - invert_intend_guides = false, - inverse = true, -- invert background for search, diffs, statuslines and errors - contrast = "", -- can be "hard", "soft" or empty string - palette_overrides = {}, - overrides = {}, - dim_inactive = false, - transparent_mode = false, + terminal_colors = true, -- add neovim terminal colors + undercurl = true, + underline = true, + bold = true, + italic = { + strings = true, + emphasis = true, + comments = true, + operators = false, + folds = true + }, + strikethrough = true, + invert_selection = false, + invert_signs = false, + invert_tabline = false, + invert_intend_guides = false, + inverse = true, -- invert background for search, diffs, statuslines and errors + contrast = "", -- can be "hard", "soft" or empty string + palette_overrides = {}, + overrides = {}, + dim_inactive = false, + transparent_mode = false }) diff --git a/lua/config/treesitter.lua b/lua/config/treesitter.lua index 48d4b27..7e5937b 100644 --- a/lua/config/treesitter.lua +++ b/lua/config/treesitter.lua @@ -2,24 +2,8 @@ require'nvim-treesitter.configs'.setup { ensure_installed = "all", sync_install = true, auto_install = true, - highlight = { - enable = true, - additional_vim_regex_highlighting = false, - }, - indent = { - enable = true, - disable = {}, - }, - ensure_installed = { - "jsx", - "toml", - "json", - "yaml", - "css", - "html", - "lua" - }, - autotag = { - enable = true, - }, + highlight = {enable = true, additional_vim_regex_highlighting = false}, + indent = {enable = true, disable = {}}, + ensure_installed = {"jsx", "toml", "json", "yaml", "css", "html", "lua"}, + autotag = {enable = true} } diff --git a/lua/config/undotree.lua b/lua/config/undotree.lua index 8c9513f..b0c277c 100644 --- a/lua/config/undotree.lua +++ b/lua/config/undotree.lua @@ -1,19 +1,20 @@ require('undotree').setup({ - float_diff = true, - layout = "left_bottom", - position = "left", - ignore_filetype = { 'undotree', 'undotreeDiff', 'qf', 'TelescopePrompt', 'spectre_panel', 'tsplayground' }, - window = { - winblend = 30, - }, - keymaps = { - ['j'] = "move_next", - ['k'] = "move_prev", - ['gj'] = "move2parent", - ['J'] = "move_change_next", - ['K'] = "move_change_prev", - [''] = "action_enter", - ['p'] = "enter_diffbuf", - ['q'] = "quit", - }, + float_diff = true, + layout = "left_bottom", + position = "left", + ignore_filetype = { + 'undotree', 'undotreeDiff', 'qf', 'TelescopePrompt', 'spectre_panel', + 'tsplayground' + }, + window = {winblend = 30}, + keymaps = { + ['j'] = "move_next", + ['k'] = "move_prev", + ['gj'] = "move2parent", + ['J'] = "move_change_next", + ['K'] = "move_change_prev", + [''] = "action_enter", + ['p'] = "enter_diffbuf", + ['q'] = "quit" + } }) diff --git a/lua/globals.lua b/lua/globals.lua index c44b861..fa42745 100644 --- a/lua/globals.lua +++ b/lua/globals.lua @@ -1,11 +1,11 @@ -local time = tonumber( os.date "%H" ) +local time = tonumber(os.date "%H") vim.g.loaded_netrw = 1 vim.g.loaded_netrwPlugin = 1 vim.g.base46_cache = vim.fn.stdpath "data" .. "/base46/" vim.g.mapleader = " " vim.g.gruvbox_material_background = "medium" -vim.g.coq_settings = { keymap = { recommended = false } } +vim.g.coq_settings = {keymap = {recommended = false}} vim.g.gruvbox_material_foreground = "original" -vim.api.nvim_set_hl(0, 'GitGutterAdd', { fg = '#009900', ctermfg = 2 }) -vim.api.nvim_set_hl(0, 'GitGutterChange', { fg = '#bbbb00', ctermfg = 3 }) -vim.api.nvim_set_hl(0, 'GitGutterDelete', { fg = '#ff2222', ctermfg = 1 }) +vim.api.nvim_set_hl(0, 'GitGutterAdd', {fg = '#009900', ctermfg = 2}) +vim.api.nvim_set_hl(0, 'GitGutterChange', {fg = '#bbbb00', ctermfg = 3}) +vim.api.nvim_set_hl(0, 'GitGutterDelete', {fg = '#ff2222', ctermfg = 1}) diff --git a/lua/mappings.lua b/lua/mappings.lua index 678a9de..0088750 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -1,32 +1,35 @@ local map = vim.keymap.set local default_opts = {noremap = true} -map('n', 'ff', "lua require'telescope.builtin'.find_files({ find_command = {'rg', '--files', '--hidden', '-g', '!.git' }})", default_opts) +map('n', 'ff', + "lua require'telescope.builtin'.find_files({ find_command = {'rg', '--files', '--hidden', '-g', '!.git' }})", + default_opts) map({"n", "v"}, "ap", require("actions-preview").code_actions) map("n", "", "BufferLineCycleNext") map("n", "", "BufferLineCyclePrev") -map("n", ";", ":", { desc = "CMD enter command mode" }) +map("n", ";", ":", {desc = "CMD enter command mode"}) -- Move selected text up -map("v", "", ":m '<-2gv=gv", { desc = "Move selected text up" }) -map("v", "", ":m '>+1gv=gv", { desc = "Move selected text down" }) +map("v", "", ":m '<-2gv=gv", {desc = "Move selected text up"}) +map("v", "", ":m '>+1gv=gv", {desc = "Move selected text down"}) -- Alt + Arrow Key to change buffer -map("n", "", "h", { desc = "Move to left split" }) -map("n", "", "j", { desc = "Move to bottom split" }) -map("n", "", "k", { desc = "Move to top split" }) -map("n", "", "l", { desc = "Move to right split" }) +map("n", "", "h", {desc = "Move to left split"}) +map("n", "", "j", {desc = "Move to bottom split"}) +map("n", "", "k", {desc = "Move to top split"}) +map("n", "", "l", {desc = "Move to right split"}) map('n', 'e', vim.cmd.NvimTreeToggle) -map('n', 'u', require('undotree').toggle, { noremap = true, silent = true }) +map('n', 'u', require('undotree').toggle, + {noremap = true, silent = true}) map("n", "", ":bdelete") -- map("n", "", ":BufferRestore") -map("n", "", "ggVG", { noremap = true, silent = true }) +map("n", "", "ggVG", {noremap = true, silent = true}) map("n", "pv", vim.cmd.Ex) @@ -54,6 +57,4 @@ map("i", "", "") map("n", "mr", "CellularAutomaton make_it_rain"); -map("n", "", function() - vim.cmd("so") -end) +map("n", "", function() vim.cmd("so") end) diff --git a/lua/options.lua b/lua/options.lua index 1ac2507..c71d6a4 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -20,12 +20,13 @@ vim.opt.updatetime = 50 vim.opt.textwidth = 0 vim.opt.colorcolumn = "80" vim.opt.formatoptions = "rqnj" -vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions" +vim.o.sessionoptions = + "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions" vim.o.laststatus = 3 vim.o.clipboard = "unnamedplus" vim.o.cursorline = true vim.o.cursorlineopt = "number" -vim.opt.fillchars = { eob = " " } +vim.opt.fillchars = {eob = " "} vim.o.ignorecase = true vim.o.smartcase = true vim.o.mouse = "a" @@ -45,4 +46,5 @@ vim.g.loaded_ruby_provider = 0 local is_windows = vim.fn.has "win32" ~= 0 local sep = is_windows and "\\" or "/" local delim = is_windows and ";" or ":" -vim.env.PATH = table.concat({ vim.fn.stdpath "data", "mason", "bin" }, sep) .. delim .. vim.env.PATH +vim.env.PATH = table.concat({vim.fn.stdpath "data", "mason", "bin"}, sep) .. + delim .. vim.env.PATH diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 202368a..7f531a5 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,183 +1,99 @@ return { { "aznhe21/actions-preview.nvim", - config = function() - require("actions-preview") - end, - }, - { + config = function() require("actions-preview") end + }, { "sbdchd/neoformat", init = function() - vim.cmd( - "source" - .. vim.fn.stdpath "config" - .. "/lua/config/neoformat.vim" - ) - end, - }, - { + vim.cmd("source" .. vim.fn.stdpath "config" .. + "/lua/config/neoformat.vim") + end + }, { "rachartier/tiny-inline-diagnostic.nvim", event = "VeryLazy", priority = 1000, config = function() require("tiny-inline-diagnostic").setup() - vim.diagnostic.config({ virtual_text = false }) - end, - }, - { + vim.diagnostic.config({virtual_text = false}) + end + }, { "ThePrimeagen/refactoring.nvim", dependencies = { - "nvim-lua/plenary.nvim", - "nvim-treesitter/nvim-treesitter", + "nvim-lua/plenary.nvim", "nvim-treesitter/nvim-treesitter" }, lazy = false, opts = {}, - config = function() - require("config.refactoring") - end, - }, - { + config = function() require("config.refactoring") end + }, { "nvim-neorg/neorg", lazy = false, version = "*", config = true, - config = function() - require("config.neorg") - end, - }, - { + config = function() require("config.neorg") end + }, { "folke/snacks.nvim", priority = 1000, lazy = false, ---@type snacks.Config opts = { - bigfile = { enabled = true }, - dashboard = { enabled = true }, - explorer = { enabled = true }, - indent = { enabled = true }, - input = { enabled = true }, - picker = { enabled = true }, - notifier = { enabled = true }, - quickfile = { enabled = true }, - scope = { enabled = true }, - scroll = { enabled = true }, - statuscolumn = { enabled = true }, - words = { enabled = true }, - }, - }, - { + bigfile = {enabled = true}, + dashboard = {enabled = true}, + explorer = {enabled = true}, + indent = {enabled = true}, + input = {enabled = true}, + picker = {enabled = true}, + notifier = {enabled = true}, + quickfile = {enabled = true}, + scope = {enabled = true}, + scroll = {enabled = true}, + statuscolumn = {enabled = true}, + words = {enabled = true} + } + }, { "neovim/nvim-lspconfig", dependencies = { - "williamboman/mason.nvim", - "williamboman/mason-lspconfig.nvim", - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-path", - "hrsh7th/cmp-cmdline", - "hrsh7th/nvim-cmp", - "L3MON4D3/LuaSnip", - "saadparwaiz1/cmp_luasnip", - "j-hui/fidget.nvim", + "williamboman/mason.nvim", "williamboman/mason-lspconfig.nvim", + "hrsh7th/cmp-nvim-lsp", "hrsh7th/cmp-buffer", "hrsh7th/cmp-path", + "hrsh7th/cmp-cmdline", "hrsh7th/nvim-cmp", "L3MON4D3/LuaSnip", + "saadparwaiz1/cmp_luasnip", "j-hui/fidget.nvim" }, - config = function() - require("config.lspconfig") - end, - }, - { + config = function() require("config.lspconfig") end + }, { 'vyfor/cord.nvim', build = ':Cord update', - config = function() - require("config.cord") - end, - }, - { + config = function() require("config.cord") end + }, { "nvim-treesitter/nvim-treesitter", - config = function() - require("config.treesitter") - end, - }, - { + config = function() require("config.treesitter") end + }, { "rmagatti/auto-session", - config = function() - require("config.autosession") - end, - }, - { + config = function() require("config.autosession") end + }, { "nvim-telescope/telescope.nvim", - dependencies = { - "nvim-lua/plenary.nvim", - }, - config = function() - require("config.telescope") - end, - }, - { - "lambdalisue/vim-suda", - }, - { - "nvim-tree/nvim-web-devicons", - }, - { + dependencies = {"nvim-lua/plenary.nvim"}, + config = function() require("config.telescope") end + }, {"lambdalisue/vim-suda"}, {"nvim-tree/nvim-web-devicons"}, { "nvim-tree/nvim-tree.lua", - cmd = { "NvimTreeToggle", "NvimTreeFocus" }, - config = function() - require("config.nvimtree") - end, - }, - { + cmd = {"NvimTreeToggle", "NvimTreeFocus"}, + config = function() require("config.nvimtree") end + }, { "akinsho/bufferline.nvim", event = "VeryLazy", - config = function() - require("config.barbar") - end, - }, - { + config = function() require("config.barbar") end + }, { "nvim-lualine/lualine.nvim", event = "VeryLazy", - config = function () - require("config.lualine") - end, + config = function() require("config.lualine") end }, - { - "jiaoshijie/undotree", - config = function() - require("config.undotree") - end, - }, - { - "hiphish/rainbow-delimiters.nvim", - }, - { + {"jiaoshijie/undotree", config = function() require("config.undotree") end}, + {"hiphish/rainbow-delimiters.nvim"}, { "windwp/nvim-autopairs", event = "InsertEnter", - config = function() - require("config.autopairs") - end, - }, - { - "tpope/vim-fugitive", - }, - { + config = function() require("config.autopairs") end + }, {"tpope/vim-fugitive"}, { "catgoose/nvim-colorizer.lua", - config = function() - require("config.colorizer") - end, - }, - { - "catppuccin/nvim", - name = "catppuccin", - priority = 1000 - }, - { - "ellisonleao/gruvbox.nvim", - priority = 1000 , - config = true, - opts = ... - }, - { - "mfussenegger/nvim-dap", - config = function() - require("config.dap") - end, - }, + config = function() require("config.colorizer") end + }, {"catppuccin/nvim", name = "catppuccin", priority = 1000}, + {"ellisonleao/gruvbox.nvim", priority = 1000, config = true, opts = ...}, + {"mfussenegger/nvim-dap", config = function() require("config.dap") end} }