i use arch btw
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update nvim config

- Reorganize (todo: split plugins.lua)
- Update all plugins
- Add a bunch of types
- Use require in most places to automatically infer types
- Add macro recording to lualine with lualine-macro-recording.nvim
- Unset max_join_length for treesj
- Migrate to lsp-zero v4.x
- Change nord colorscheme plugin to gbprod/nord.nvim
- Fix ts-autotag by actually enabling it
- Add tmux lsp
- Try to speed up lua lsp
- Fix vtsls updateImportsOnFileMove
- Enable project diagnostics in tsserver
- Leave followed dirs open in neo-tree and track changes using libuv
file watcher
- Use oil instead of neo-tree when opening directories
- Configure z-height and max size for nvim-notify notifications
- Exclude filetypes from nvim-highlight-colors
- Exclude neo-tree from swap-split
- Ignore home directory in session manager
- Add render-markdown.nvim, indentmini.nvim, lsp_lines.nvim

+776 -434
+4 -4
nvim/.config/nvim/init.lua
··· 1 - require("options") 2 - require("autocmds") 3 - require("plugins") 4 - require("keymaps") 1 + require("config.options") 2 + require("config.autocmds") 3 + require("config.lazy") 4 + require("config.keymaps")
+28 -21
nvim/.config/nvim/lazy-lock.json
··· 1 1 { 2 2 "42header_codam": { "branch": "master", "commit": "727e299117075f87b154a40f2e4ec8a48594d7de" }, 3 - "barbar.nvim": { "branch": "master", "commit": "53b5a2f34b68875898f0531032fbf090e3952ad7" }, 3 + "LuaSnip": { "branch": "master", "commit": "7ad2eaeaca56d6ed63acacbfc114b99f1f67b982" }, 4 + "barbar.nvim": { "branch": "master", "commit": "c20691d686addb0d6ea87896d186c082324b01f8" }, 4 5 "c_formatter_42.vim": { "branch": "master", "commit": "7a2d50f6683d6f58a2c95375524b4406d6bdc2c3" }, 5 6 "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, 6 7 "comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, 7 - "conform.nvim": { "branch": "master", "commit": "25d48271e3d4404ba017cb92a37d3a681c1ad149" }, 8 + "conform.nvim": { "branch": "master", "commit": "62eba813b7501b39612146cbf29cd07f1d4ac29c" }, 8 9 "dial.nvim": { "branch": "master", "commit": "ed4d6a5bbd5e479b4c4a3019d148561a2e6c1490" }, 9 10 "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, 10 - "dressing.nvim": { "branch": "master", "commit": "6741f1062d3dc6e4755367a7e9b347b553623f04" }, 11 - "dropbar.nvim": { "branch": "master", "commit": "aa4c0ab1ade45ff9a3c5d4c06365c9b119f32d36" }, 12 - "eyeliner.nvim": { "branch": "main", "commit": "828da1c18de397f7bf8fd4fff1daa1c4352b28cf" }, 11 + "dressing.nvim": { "branch": "master", "commit": "c5775a888adbc50652cb370073fcfec963eca93e" }, 12 + "dropbar.nvim": { "branch": "master", "commit": "d26bf92161cd70e049dc138b44ffa0246dbf7178" }, 13 + "eyeliner.nvim": { "branch": "main", "commit": "85e5a5a815651a434f327d0da3c2a33b9aa4f9ec" }, 13 14 "fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" }, 14 - "gitsigns.nvim": { "branch": "main", "commit": "58bd9e98d8e3c5a1c98af312e85247ee1afd3ed2" }, 15 + "gitsigns.nvim": { "branch": "main", "commit": "562dc47189ad3c8696dbf460d38603a74d544849" }, 15 16 "guess-indent.nvim": { "branch": "main", "commit": "6cd61f7a600bb756e558627cd2e740302c58e32d" }, 16 17 "highlight-undo.nvim": { "branch": "main", "commit": "1ea1c79372d7d93c88fd97543880927b7635e3d2" }, 17 18 "inc-rename.nvim": { "branch": "main", "commit": "8ba77017ca468f3029bf88ef409c2d20476ea66b" }, 19 + "indent-blankline.nvim": { "branch": "master", "commit": "dddb5d21811c319eb6e51a993d8fb44b193aae3f" }, 20 + "indentmini.nvim": { "branch": "main", "commit": "147374581eab6cb5c0ce2027312738d6a84413c8" }, 18 21 "lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" }, 19 22 "lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" }, 20 - "lsp-zero.nvim": { "branch": "v3.x", "commit": "56db3d5ce5476b183783160e6045f7337ba12b83" }, 23 + "lsp-zero.nvim": { "branch": "v4.x", "commit": "0161aeab61d407aa1d43326a5dfc33479f4c53f6" }, 24 + "lsp_lines.nvim": { "branch": "main", "commit": "7d9e2748b61bff6ebba6e30adbc7173ccf21c055" }, 21 25 "lspkind.nvim": { "branch": "master", "commit": "cff4ae321a91ee3473a92ea1a8c637e3a9510aec" }, 22 - "lualine.nvim": { "branch": "master", "commit": "544dd1583f9bb27b393f598475c89809c4d5e86b" }, 23 - "luasnip": { "branch": "master", "commit": "7552e6504ee95a9c8cfc6db53e389122ded46cd4" }, 26 + "lualine-macro-recording.nvim": { "branch": "main", "commit": "e2dcf63ba74e6111b53e1520a4f8a17a3d7427a1" }, 27 + "lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" }, 24 28 "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, 25 29 "marks.nvim": { "branch": "master", "commit": "74e8d01b2a2131b6e46354cffc553aa7f81bcf5b" }, 26 - "mason-lspconfig.nvim": { "branch": "main", "commit": "62360f061d45177dda8afc1b0fd1327328540301" }, 30 + "mason-lspconfig.nvim": { "branch": "main", "commit": "482350b050bd413931c2cdd4857443c3da7d57cb" }, 27 31 "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, 28 32 "mini.files": { "branch": "main", "commit": "99aef1d68a01dd8fd8d37bbf62d67766f97311e3" }, 29 33 "neo-tree.nvim": { "branch": "v3.x", "commit": "29f7c215332ba95e470811c380ddbce2cebe2af4" }, 30 - "neogit": { "branch": "master", "commit": "2b74a777b963dfdeeabfabf84d5ba611666adab4" }, 34 + "neoconf.nvim": { "branch": "main", "commit": "e7bb3b5aba2101c72608f94f6b5f5e0c0c987dbc" }, 35 + "neogit": { "branch": "master", "commit": "6af8fc6b03210d0ac99398f8eff27c5be7b2ba8a" }, 31 36 "neoscroll.nvim": { "branch": "master", "commit": "532dcc8cea4287c4cad6bb77532989a8217cfc7b" }, 32 37 "neovim-session-manager": { "branch": "master", "commit": "cbaebd92dce84e9ba63cb07d3199e5a19b204c1a" }, 33 38 "noice.nvim": { "branch": "main", "commit": "448bb9c524a7601035449210838e374a30153172" }, 34 - "nord.nvim": { "branch": "master", "commit": "80c1e5321505aeb22b7a9f23eb82f1e193c12470" }, 39 + "nord.nvim": { "branch": "main", "commit": "6d6bae56a002a4da507ba263776e9691f47deb5f" }, 35 40 "nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" }, 36 41 "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, 37 42 "nvim-colorizer.lua": { "branch": "master", "commit": "194ec600488f7c7229668d0e80bd197f3a2b84ff" }, 38 - "nvim-dap": { "branch": "master", "commit": "dcc85d12d6e2c18c5fa0f9a304d9f5e767e1401a" }, 43 + "nvim-dap": { "branch": "master", "commit": "281a2e4cd1e7a17cea7ecb1745d84a8ab1249925" }, 39 44 "nvim-dap-projects": { "branch": "main", "commit": "f319ffd99c6c8a0b930bcfc4bee0c751ffbf5808" }, 40 45 "nvim-dap-ui": { "branch": "master", "commit": "a5606bc5958db86f8d92803bea7400ee26a8d7e4" }, 41 46 "nvim-dap-virtual-text": { "branch": "master", "commit": "484995d573c0f0563f6a66ebdd6c67b649489615" }, 42 47 "nvim-highlight-colors": { "branch": "main", "commit": "a411550ef85cae467b889ba7d1a96bd78332d90e" }, 43 48 "nvim-lastplace": { "branch": "main", "commit": "0bb6103c506315044872e0f84b1f736c4172bb20" }, 44 49 "nvim-lsp-file-operations": { "branch": "master", "commit": "92a673de7ecaa157dd230d0128def10beb56d103" }, 45 - "nvim-lspconfig": { "branch": "master", "commit": "6c505d4220b521f3b0e7b645f6ce45fa914d0eed" }, 50 + "nvim-lspconfig": { "branch": "master", "commit": "a7f0f9c18baa70a3970ea18f9984e03b6f6c2e8a" }, 46 51 "nvim-luadev": { "branch": "master", "commit": "3ba0c02c378503739f1fdb95cff3ea2aad48db3e" }, 47 52 "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, 48 53 "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, 49 54 "nvim-pqf": { "branch": "main", "commit": "148ee2ca8b06d83fd9bf6f9b9497724ad39a07d6" }, 50 55 "nvim-scrollbar": { "branch": "main", "commit": "d09f14aa16c9f2748e77008f9da7b1f76e4e7b85" }, 51 56 "nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" }, 52 - "nvim-treesitter": { "branch": "master", "commit": "c79b068f395817c39ed147d4ee76855c36b846e6" }, 57 + "nvim-treesitter": { "branch": "master", "commit": "8724e7d028ba11604dde94dc4be63f70cccf16e0" }, 53 58 "nvim-treesitter-endwise": { "branch": "master", "commit": "8b34305ffc28bd75a22f5a0a9928ee726a85c9a6" }, 54 - "nvim-treesitter-textobjects": { "branch": "master", "commit": "33a17515b79ddb10d750320fa994098bdc3e93ef" }, 55 - "nvim-ts-autotag": { "branch": "main", "commit": "dc5e1687ab76ee02e0f11c5ce137f530b36e98b3" }, 59 + "nvim-treesitter-textobjects": { "branch": "master", "commit": "41e3abf6bfd9a9a681eb1f788bdeba91c9004b2b" }, 60 + "nvim-ts-autotag": { "branch": "main", "commit": "0cb76eea80e9c73b88880f0ca78fbd04c5bdcac7" }, 56 61 "nvim-vtsls": { "branch": "main", "commit": "45c6dfea9f83a126e9bfc5dd63430562b3f8af16" }, 57 62 "nvim-web-devicons": { "branch": "master", "commit": "3722e3d1fb5fe1896a104eb489e8f8651260b520" }, 58 - "oil.nvim": { "branch": "master", "commit": "fcca212c2e966fc3dec1d4baf888e670631d25d1" }, 59 - "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, 63 + "oil.nvim": { "branch": "master", "commit": "a632c898fbe0e363ef89b9577f1a7714ab67d682" }, 64 + "plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" }, 60 65 "presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" }, 61 66 "qf_helper.nvim": { "branch": "master", "commit": "fa3c2f3f2706e2c9984409c9c14b5993302ddfa7" }, 62 - "schemastore.nvim": { "branch": "main", "commit": "218a9887085b81b3eb0ee8f1e2d20c4a7fd7b1c9" }, 67 + "render-markdown.nvim": { "branch": "main", "commit": "c4eb6bf30525fdc7efaf5f33bcb0fa9491ace245" }, 68 + "schemastore.nvim": { "branch": "main", "commit": "2ff2063191144005eb754356517de65ae45f2e41" }, 63 69 "suda.vim": { "branch": "master", "commit": "b97fab52f9cdeabe2bbb5eb98d82356899f30829" }, 64 70 "supermaven-nvim": { "branch": "main", "commit": "d71257f431e190d9236d7f30da4c2d659389e91f" }, 65 71 "swap-split.nvim": { "branch": "main", "commit": "d2c705d279b384a6b47a67f85a6dc8569c4d775d" }, ··· 71 77 "toggleterm.nvim": { "branch": "main", "commit": "48be57eaba817f038d61bbf64d2c597f578c0827" }, 72 78 "treesj": { "branch": "main", "commit": "0d81326b5afd36babe7dd480aabbb0b05f33e688" }, 73 79 "trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" }, 74 - "ultimate-autopair.nvim": { "branch": "v0.6", "commit": "1420fb9e07b1d80cc6d87e7d90827fb2c1109cb3" }, 80 + "ts-error-translator.nvim": { "branch": "main", "commit": "11ae55b28bde02663b5f983f59b0e3fd9c4e845b" }, 81 + "ultimate-autopair.nvim": { "branch": "v0.6", "commit": "53ed7c65e466963c916251f9ce6df7dd3685dc36" }, 75 82 "which-key.nvim": { "branch": "main", "commit": "6c1584eb76b55629702716995cca4ae2798a9cca" } 76 83 }
nvim/.config/nvim/lua/autocmds.lua nvim/.config/nvim/lua/config/autocmds.lua
+30
nvim/.config/nvim/lua/config/lazy.lua
··· 1 + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" 2 + 3 + if not vim.loop.fs_stat(lazypath) then 4 + vim.fn.system({ 5 + "git", 6 + "clone", 7 + "--filter=blob:none", 8 + "https://github.com/folke/lazy.nvim.git", 9 + "--branch=stable", -- latest stable release 10 + lazypath, 11 + }) 12 + end 13 + 14 + vim.opt.rtp:prepend(lazypath) 15 + 16 + vim.g.nord_borders = true -- border between splits 17 + vim.g.nord_italic = false 18 + vim.g.nord_bold = false 19 + 20 + require("lazy").setup({ 21 + spec = { 22 + { import = "plugins" }, 23 + }, 24 + install = { 25 + colorscheme = { "nord" }, 26 + }, 27 + checker = { 28 + enabled = true, 29 + }, 30 + })
+2
nvim/.config/nvim/lua/keymaps.lua nvim/.config/nvim/lua/config/keymaps.lua
··· 35 35 require("noice").cmd("dismiss") 36 36 end 37 37 end, silent) 38 + 39 + map("n", "<C-L>", "<Cmd>Lazy<CR>", silent)
nvim/.config/nvim/lua/options.lua nvim/.config/nvim/lua/config/options.lua
+712 -409
nvim/.config/nvim/lua/plugins.lua
··· 1 - local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" 2 - 3 - if not vim.loop.fs_stat(lazypath) then 4 - vim.fn.system({ 5 - "git", 6 - "clone", 7 - "--filter=blob:none", 8 - "https://github.com/folke/lazy.nvim.git", 9 - "--branch=stable", -- latest stable release 10 - lazypath, 11 - }) 12 - end 13 - 14 - vim.opt.rtp:prepend(lazypath) 15 - 16 - vim.g.nord_borders = true -- border between splits 17 - vim.g.nord_italic = false 18 - vim.g.nord_bold = false 19 - 20 - require("lazy").setup({ 21 - install = { 22 - colorscheme = "nord", 23 - }, 24 - 1 + ---@type LazySpec 2 + return { 25 3 { 26 - "shaunsingh/nord.nvim", 4 + "gbprod/nord.nvim", 27 5 priority = 1000, 6 + lazy = false, 28 7 config = function() 29 - require("nord").set() 8 + require("nord").setup({ 9 + diff = { 10 + mode = "fg", 11 + }, 12 + errors = { 13 + mode = "none", -- doesn't seem to do anything? 14 + }, 15 + on_highlights = function(hi, c) 16 + hi.DiffAdd = vim.tbl_extend("force", hi.DiffAdd, { bg = "" }) 17 + hi.DiffDelete = vim.tbl_extend("force", hi.DiffDelete, { bg = "" }) 18 + hi.DiffChange = vim.tbl_extend("force", hi.DiffChange, { bg = "" }) 19 + hi.DiffText = vim.tbl_extend("force", hi.DiffText, { bg = "" }) 20 + end, 21 + }) 22 + vim.cmd.colorscheme("nord") 30 23 end, 31 24 }, 32 25 33 26 { 34 27 "folke/which-key.nvim", 35 - event = "VeryLazy", 36 - opts = { 37 - preset = "modern", 38 - }, 28 + config = function() 29 + require("which-key").setup({ 30 + preset = "modern", 31 + }) 32 + end, 39 33 }, 40 34 41 35 { 42 36 "nvim-lualine/lualine.nvim", 43 37 dependencies = { 44 38 "nvim-tree/nvim-web-devicons", 39 + "yavorski/lualine-macro-recording.nvim", 45 40 }, 46 - config = function(plugin) 41 + config = function() 47 42 local lualine = require("lualine") 48 43 local startuptime_visible = true 49 44 -- hide startup time after 3 seconds ··· 74 69 { "diff" }, 75 70 { "diagnostics" }, 76 71 }, 77 - lualine_c = {}, 72 + lualine_c = { 73 + "macro_recording", 74 + }, 78 75 lualine_x = { 79 76 { 80 77 function() ··· 112 109 dependencies = { 113 110 "nvim-treesitter/nvim-treesitter-textobjects", 114 111 "RRethy/nvim-treesitter-endwise", 115 - "windwp/nvim-ts-autotag", 112 + { 113 + "windwp/nvim-ts-autotag", 114 + config = true, 115 + }, 116 116 }, 117 - opts = { 118 - ensure_installed = { 119 - "lua", 120 - "vim", 121 - "vimdoc", 122 - "bash", 123 - "fish", 124 - "diff", 125 - "json", 126 - "jsonc", 127 - "markdown", 128 - "markdown_inline", 129 - "regex", 130 - "javascript", 131 - "typescript", 132 - "html", 133 - "css", 134 - "python", 135 - "ruby", 136 - "c", 137 - "go", 138 - "elixir", 139 - "rust", 140 - }, 141 - auto_install = true, 142 - highlight = { 143 - enable = true, 144 - disable = { "gitcommit" }, 145 - }, 146 - textobjects = { 147 - select = { 117 + config = function() 118 + ---@diagnostic disable-next-line: missing-fields 119 + require("nvim-treesitter.configs").setup({ 120 + ensure_installed = { 121 + "lua", 122 + "vim", 123 + "vimdoc", 124 + "bash", 125 + "fish", 126 + "diff", 127 + "json", 128 + "jsonc", 129 + "markdown", 130 + "markdown_inline", 131 + "regex", 132 + "javascript", 133 + "typescript", 134 + "tsx", 135 + "html", 136 + "css", 137 + "python", 138 + "ruby", 139 + "c", 140 + "go", 141 + "elixir", 142 + "rust", 143 + }, 144 + auto_install = true, 145 + highlight = { 148 146 enable = true, 149 - lookahead = true, 150 - keymaps = { 151 - ["af"] = "@function.outer", 152 - ["if"] = "@function.inner", 153 - ["ac"] = "@comment.outer", 154 - ["ic"] = "@comment.outer", 155 - ["aa"] = "@parameter.outer", 156 - ["ia"] = "@parameter.inner", 147 + }, 148 + textobjects = { 149 + select = { 150 + enable = true, 151 + lookahead = true, 152 + keymaps = { 153 + ["af"] = "@function.outer", 154 + ["if"] = "@function.inner", 155 + ["ac"] = "@comment.outer", 156 + ["ic"] = "@comment.outer", 157 + ["aa"] = "@parameter.outer", 158 + ["ia"] = "@parameter.inner", 159 + }, 160 + selection_modes = { 161 + ["@function.outer"] = "V", 162 + ["@function.inner"] = "V", 163 + }, 157 164 }, 158 - selection_modes = { 159 - ["@function.outer"] = "V", 160 - ["@function.inner"] = "V", 165 + move = { 166 + enable = true, 167 + set_jumps = true, 168 + goto_next_start = { 169 + ["]m"] = "@function.outer", 170 + }, 161 171 }, 162 172 }, 163 - move = { 173 + endwise = { 164 174 enable = true, 165 - set_jumps = true, 166 - goto_next_start = { 167 - ["]m"] = "@function.outer", 168 - }, 169 175 }, 170 - }, 171 - endwise = { 172 - enable = true, 173 - }, 174 - autotag = { 175 - enable = true, 176 - }, 177 - }, 178 - config = function(_, opts) 179 - require("nvim-treesitter.configs").setup(opts) 176 + autotag = { 177 + enable = true, 178 + }, 179 + }) 180 180 end, 181 181 }, 182 182 183 183 { 184 184 "wansmer/treesj", 185 - dependencies = { "nvim-treesitter/nvim-treesitter" }, 185 + dependencies = { 186 + "nvim-treesitter/nvim-treesitter", 187 + }, 186 188 keys = { 187 189 { 188 190 "<leader>s", ··· 192 194 desc = "Toggle node (split/join)", 193 195 }, 194 196 }, 197 + ---@class TreeSJ.Settings 198 + ---@field use_default_keymaps boolean Use default keymaps (<space>m - toggle, <space>j - join, <space>s - split) 199 + ---@field check_syntax_error boolean Node with syntax error will not be formatted 200 + ---@field max_join_length number If line after join will be longer than max value, node will not be formatted 201 + ---Cursor behavior: 202 + ---hold - cursor follows the node/place on which it was called 203 + ---start - cursor jumps to the first symbol of the node being formatted 204 + ---end - cursor jumps to the last symbol of the node being formatted 205 + ---@field cursor_behavior 'hold'|'start'|'end' 206 + ---@field notify boolean Notify about possible problems or not 207 + ---@field langs table Presets for languages 208 + ---@field dot_repeat boolean Use `dot` for repeat action 209 + ---@field on_error nil|function Callback for treesj error handler. func (err_text, level, ...) 195 210 opts = { 196 211 use_default_keymaps = false, 197 - max_join_length = 600, 212 + -- max_join_length = 600, 198 213 }, 199 214 }, 200 215 201 216 { 202 217 "zbirenbaum/copilot.lua", 203 218 enabled = false, 204 - opts = { 205 - filetypes = { 206 - gitcommit = true, 207 - markdown = true, 208 - yaml = true, 209 - }, 210 - panel = { 211 - enabled = false, 212 - }, 213 - suggestion = { 214 - auto_trigger = true, 215 - keymap = { 216 - accept = "<M-CR>", 217 - accept_word = "<M-,>", 218 - accept_line = "<M-.>", 219 - next = "<M-j>", 220 - prev = "<M-d>", 221 - dismiss = "<M-]>", 219 + config = function() 220 + require("copilot").setup({ 221 + filetypes = { 222 + gitcommit = true, 223 + markdown = true, 224 + yaml = true, 225 + }, 226 + panel = { 227 + enabled = false, 228 + }, 229 + suggestion = { 230 + auto_trigger = true, 231 + keymap = { 232 + accept = "<M-CR>", 233 + accept_word = "<M-.>", 234 + accept_line = "<M-.>", 235 + next = "<M-j>", 236 + prev = "<M-d>", 237 + dismiss = "<M-]>", 238 + }, 222 239 }, 223 - }, 224 - }, 240 + }) 241 + end, 225 242 }, 226 243 227 244 { 228 245 "supermaven-inc/supermaven-nvim", 229 - opts = { 230 - keymaps = { 231 - accept_suggestion = "<M-CR>", 232 - accept_word = "<M-.>", 233 - clear_suggestion = "<M-]>", 234 - }, 235 - }, 246 + config = function() 247 + require("supermaven-nvim").setup({ 248 + keymaps = { 249 + accept_suggestion = "<M-CR>", 250 + accept_word = "<M-.>", 251 + clear_suggestion = "<M-]>", 252 + }, 253 + }) 254 + end, 255 + }, 256 + 257 + { 258 + "williamboman/mason.nvim", 259 + config = true, 260 + }, 261 + 262 + { 263 + "folke/neoconf.nvim", 264 + config = true, 236 265 }, 237 266 238 267 { 239 - "vonheikemen/lsp-zero.nvim", 240 - branch = "v3.x", 268 + "williamboman/mason-lspconfig.nvim", 241 269 dependencies = { 242 270 "williamboman/mason.nvim", 243 - "williamboman/mason-lspconfig.nvim", 244 271 "neovim/nvim-lspconfig", 245 - "hrsh7th/nvim-cmp", 246 272 "hrsh7th/cmp-nvim-lsp", 247 273 "onsails/lspkind.nvim", 248 - "l3mon4d3/luasnip", 249 274 "b0o/schemastore.nvim", 250 275 "yioneko/nvim-vtsls", 251 - -- { "zbirenbaum/copilot-cmp", opts = {} }, 276 + "folke/neoconf.nvim", 277 + { 278 + "vonheikemen/lsp-zero.nvim", 279 + branch = "v4.x", 280 + }, 252 281 }, 253 282 config = function() 254 283 local lsp_zero = require("lsp-zero") 255 - local lspconfig = require("lspconfig") 256 - local schemastore = require("schemastore") 257 - local cmp = require("cmp") 258 284 259 - cmp.setup({ 260 - sources = { 261 - -- { name = "copilot" }, 262 - { name = "nvim_lsp" }, 263 - { name = "lazydev", group_index = 0 }, 264 - }, 265 - mapping = cmp.mapping.preset.insert({ 266 - ["<C-Space>"] = cmp.mapping.complete(), 267 - }), 268 - formatting = { 269 - fields = { "abbr", "kind", "menu" }, 270 - format = function(entry, item) 271 - local color_item = require("nvim-highlight-colors").format(entry, { kind = item.kind }) 272 - item = require("lspkind").cmp_format({ 273 - -- before = require("tailwind-tools.cmp").lspkind_format, 274 - })(entry, item) 275 - if color_item.abbr_hl_group then 276 - item.kind_hl_group = color_item.abbr_hl_group 277 - item.kind = color_item.abbr 278 - end 279 - return item 280 - end, 281 - expandable_indicator = true, 282 - }, 283 - window = { 284 - completion = cmp.config.window.bordered(), 285 - documentation = cmp.config.window.bordered(), 286 - }, 285 + -- add tmux lsp 286 + vim.api.nvim_create_autocmd("FileType", { 287 + pattern = "tmux", 288 + callback = function() 289 + vim.lsp.start({ 290 + name = "tmux", 291 + cmd = { "tmux-language-server" }, 292 + }) 293 + end, 287 294 }) 288 295 289 - lsp_zero.on_attach(function(client, bufnr) 296 + local on_attach = function(client, bufnr) 297 + -- lsp_zero.highlight_symbol(client, bufnr) 298 + 290 299 -- :h lsp-zero-keybindings 291 300 lsp_zero.default_keymaps({ 292 301 buffer = bufnr, ··· 294 303 exclude = { "gs" }, 295 304 }) 296 305 306 + vim.keymap.set("n", "gl", function() 307 + vim.diagnostic.open_float() 308 + end, { desc = "Show diagnostics", silent = true, buffer = bufnr }) 309 + 297 310 vim.keymap.set( 298 311 "n", 299 312 "gk", ··· 309 322 { desc = "Goto source definition", silent = true, buffer = bufnr } 310 323 ) 311 324 end 312 - end) 325 + end 326 + 327 + lsp_zero.extend_lspconfig({ 328 + capabilities = require("cmp_nvim_lsp").default_capabilities(), 329 + lsp_attach = on_attach, 330 + sign_text = true, 331 + float_border = "rounded", 332 + }) 333 + 334 + -- local orig_util_open_floating_preview = vim.lsp.util.open_floating_preview 335 + -- 336 + -- ---@diagnostic disable-next-line: duplicate-set-field 337 + -- function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...) 338 + -- local bufnr, winnr = orig_util_open_floating_preview(contents, syntax, opts, ...) 339 + -- -- vim.api.nvim_set_option_value("signcolumn", "no", { win = winnr }) 340 + -- vim.api.nvim_set_option_value("filetype", "markdown", { buf = bufnr }) 341 + -- return bufnr, winnr 342 + -- end 313 343 314 - require("mason").setup({}) 315 344 require("mason-lspconfig").setup({ 316 345 ensure_installed = { 317 346 "lua_ls", 318 347 "clangd", 319 348 "jsonls", 320 349 "yamlls", 321 - "jsonnet_ls", 322 350 "bashls", 323 351 "basedpyright", 324 352 "ruff_lsp", ··· 328 356 "vtsls", 329 357 }, 330 358 handlers = { 331 - lsp_zero.default_setup, 359 + function(server) 360 + require("lspconfig")[server].setup({}) 361 + end, 332 362 333 363 lua_ls = function() 334 - -- local lua_opts = lsp_zero.nvim_lua_ls() 364 + ---@diagnostic disable: missing-fields 365 + ---@type lspconfig.options.lua_ls 335 366 local lua_opts = { 336 367 settings = { 337 368 Lua = { 338 369 format = { 339 370 enable = false, 340 371 }, 372 + diagnostics = { 373 + workspaceDelay = -1, 374 + workspaceEvent = "None", 375 + }, 376 + workspace = { 377 + checkThirdParty = false, 378 + }, 379 + codeLens = { 380 + enable = true, 381 + }, 382 + completion = { 383 + callSnippet = "Both", 384 + }, 385 + doc = { 386 + privateName = { "^_" }, 387 + }, 388 + hint = { 389 + enable = true, 390 + setType = false, 391 + paramType = true, 392 + paramName = "Disable", 393 + semicolon = "Disable", 394 + arrayIndex = "Disable", 395 + }, 341 396 }, 342 397 }, 343 398 } 344 - lspconfig.lua_ls.setup(lua_opts) 399 + require("lspconfig").lua_ls.setup(lua_opts) 345 400 end, 346 401 347 402 jsonls = function() 348 - lspconfig.jsonls.setup({ 403 + ---@diagnostic disable: missing-fields 404 + ---@type lspconfig.options.jsonls 405 + local jsonls_opts = { 349 406 settings = { 350 407 json = { 351 - schemas = vim.list_extend(schemastore.json.schemas(), { 408 + schemas = vim.list_extend(require("schemastore").json.schemas(), { 352 409 { 353 - fileMatch = { "dodcker-compose*.json", "compose*.json" }, 410 + fileMatch = { "docker-compose*.json", "compose*.json" }, 354 411 url = "https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json", 355 412 }, 356 413 }), 357 414 validate = { enable = true }, 358 415 }, 359 416 }, 360 - }) 417 + } 418 + require("lspconfig").jsonls.setup(jsonls_opts) 361 419 end, 362 420 363 421 yamlls = function() 364 - lspconfig.yamlls.setup({ 422 + ---@diagnostic disable: missing-fields 423 + ---@type lspconfig.options.yamlls 424 + local yamlls_opts = { 365 425 settings = { 366 426 yaml = { 367 427 schemaStore = { 368 428 enable = false, 369 429 url = "", 370 430 }, 371 - schemas = vim.tbl_extend("force", schemastore.yaml.schemas(), { 431 + schemas = vim.tbl_extend("force", require("schemastore").yaml.schemas(), { 372 432 kubernetes = { "manifests/*.yaml" }, 373 433 }), 374 434 }, 375 435 validate = { enable = true }, 376 436 }, 377 - }) 437 + } 438 + require("lspconfig").yamlls.setup(yamlls_opts) 378 439 end, 379 440 380 441 tailwindcss = function() 381 - lspconfig.tailwindcss.setup({ 442 + ---@diagnostic disable: missing-fields 443 + ---@type lspconfig.options.tailwindcss 444 + local tailwindcss_opts = { 382 445 settings = { 383 446 tailwindCSS = { 384 447 experimental = { ··· 389 452 }, 390 453 }, 391 454 }, 392 - }) 455 + } 456 + require("lspconfig").tailwindcss.setup(tailwindcss_opts) 393 457 end, 394 458 395 459 vtsls = function() 396 - lspconfig.vtsls.setup({ 460 + ---@diagnostic disable: missing-fields 461 + ---@type lspconfig.options.vtsls 462 + local vtsls_opts = { 397 463 settings = { 398 464 javascript = { 399 - updateImportsOnFileMove = "always", 465 + updateImportsOnFileMove = { enabled = "always" }, 400 466 }, 401 467 typescript = { 402 - updateImportsOnFileMove = "always", 468 + updateImportsOnFileMove = { enabled = "always" }, 469 + tsserver = { 470 + experimental = { 471 + enableProjectDiagnostics = true, 472 + }, 473 + }, 403 474 }, 404 475 vtsls = { 405 476 enableMoveToFileCodeAction = true, 406 477 }, 407 478 }, 408 - }) 479 + -- handlers = { 480 + -- ---@diagnostic disable: redundant-parameter 481 + -- ---@param err lsp.ResponseError? 482 + -- ---@param result lsp.PublishDiagnosticsParams 483 + -- ---@param ctx lsp.HandlerContext 484 + -- ---@param config? vim.diagnostic.Opts Configuration table (see |vim.diagnostic.config()|). 485 + -- ["textDocument/publishDiagnostics"] = function(err, result, ctx, config) 486 + -- if not result.diagnostics then 487 + -- return 488 + -- end 489 + -- 490 + -- for _, diagnostic in ipairs(result.diagnostics) do 491 + -- local json = vim.fn.json_encode({ 492 + -- range = diagnostic.range, 493 + -- message = diagnostic.message, 494 + -- code = diagnostic.code, 495 + -- severity = diagnostic.severity, 496 + -- source = diagnostic.source, 497 + -- }) 498 + -- local proc = vim.system( 499 + -- { "pretty-ts-errors-markdown" }, 500 + -- { text = true, stdin = true }, 501 + -- function(obj) 502 + -- diagnostic.message = obj.stdout 503 + -- vim.lsp.diagnostic.on_publish_diagnostics(err, result, ctx, config) 504 + -- end 505 + -- ) 506 + -- proc:write(json) 507 + -- proc:write(nil) 508 + -- end 509 + -- end, 510 + -- }, 511 + } 512 + require("lspconfig").vtsls.setup(vtsls_opts) 409 513 end, 410 514 }, 411 515 }) ··· 413 517 }, 414 518 415 519 { 520 + "hrsh7th/nvim-cmp", 521 + event = "InsertEnter", 522 + dependencies = { 523 + "L3MON4D3/LuaSnip", 524 + }, 525 + config = function() 526 + local cmp = require("cmp") 527 + 528 + cmp.setup({ 529 + sources = { 530 + -- { name = "copilot" }, 531 + { 532 + name = "nvim_lsp", 533 + ---@param entry cmp.Entry 534 + entry_filter = function(entry) 535 + return entry:get_kind() ~= cmp.lsp.CompletionItemKind.Text 536 + end, 537 + }, 538 + { name = "lazydev", group_index = 0 }, 539 + }, 540 + snippet = { 541 + expand = function(args) 542 + require("luasnip").lsp_expand(args.body) 543 + end, 544 + }, 545 + mapping = cmp.mapping.preset.insert({ 546 + ["<C-Space>"] = cmp.mapping.complete(), 547 + }), 548 + formatting = { 549 + fields = { "abbr", "kind", "menu" }, 550 + format = function(entry, item) 551 + local color_item = require("nvim-highlight-colors").format(entry, { kind = item.kind }) 552 + item = require("lspkind").cmp_format({ 553 + -- before = require("tailwind-tools.cmp").lspkind_format, 554 + })(entry, item) 555 + if color_item.abbr_hl_group then 556 + item.kind_hl_group = color_item.abbr_hl_group 557 + item.kind = color_item.abbr 558 + end 559 + return item 560 + end, 561 + expandable_indicator = true, 562 + }, 563 + window = { 564 + completion = cmp.config.window.bordered(), 565 + documentation = cmp.config.window.bordered(), 566 + }, 567 + }) 568 + end, 569 + }, 570 + 571 + { 416 572 "antosha417/nvim-lsp-file-operations", 417 573 requires = { 418 574 "nvim-lua/plenary.nvim", 419 575 "nvim-neo-tree/neo-tree.nvim", 420 576 }, 421 - opts = {}, 577 + config = true, 422 578 }, 423 579 424 580 { 425 581 "luckasRanarison/tailwind-tools.nvim", 426 582 enabled = false, 427 - ---@module "tailwind-tools" 428 - ---@type TailwindTools.Option 429 - opts = {}, 583 + config = true, 430 584 }, 431 585 432 586 { ··· 436 590 init = function() 437 591 vim.o.formatexpr = "v:lua.require'conform'.formatexpr()" 438 592 end, 439 - opts = { 440 - formatters_by_ft = { 441 - lua = { "stylua" }, 442 - yaml = { "yamlfmt" }, 443 - javascript = { "prettierd", "prettier", stop_after_first = true }, 444 - javascriptreact = { "prettierd", "prettier", stop_after_first = true }, 445 - typescript = { "prettierd", "prettier", stop_after_first = true }, 446 - typescriptreact = { "prettierd", "prettier", stop_after_first = true }, 447 - html = { "prettierd", "prettier", stop_after_first = true }, 448 - css = { "prettierd", "prettier", stop_after_first = true }, 449 - graphql = { "prettierd", "prettier", stop_after_first = true }, 450 - sh = { "shfmt" }, 451 - fish = { "fish_indent" }, 452 - }, 453 - format_on_save = function(bufnr) 454 - if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then 455 - return 456 - end 593 + config = function() 594 + require("conform").setup({ 595 + formatters_by_ft = { 596 + lua = { "stylua" }, 597 + yaml = { "yamlfmt" }, 598 + javascript = { "prettierd", "prettier", stop_after_first = true }, 599 + javascriptreact = { "prettierd", "prettier", stop_after_first = true }, 600 + typescript = { "prettierd", "prettier", stop_after_first = true }, 601 + typescriptreact = { "prettierd", "prettier", stop_after_first = true }, 602 + html = { "prettierd", "prettier", stop_after_first = true }, 603 + css = { "prettierd", "prettier", stop_after_first = true }, 604 + graphql = { "prettierd", "prettier", stop_after_first = true }, 605 + sh = { "shfmt" }, 606 + fish = { "fish_indent" }, 607 + }, 608 + format_on_save = function(bufnr) 609 + if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then 610 + return 611 + end 457 612 458 - return { lsp_format = "fallback" } 459 - end, 460 - format_after_save = function(bufnr) 461 - if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then 462 - return 463 - end 613 + return { lsp_format = "fallback" } 614 + end, 615 + format_after_save = function(bufnr) 616 + if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then 617 + return 618 + end 464 619 465 - return { lsp_format = "fallback" } 466 - end, 467 - }, 468 - config = function(_, opts) 469 - require("conform").setup(opts) 620 + return { lsp_format = "fallback" } 621 + end, 622 + }) 470 623 471 624 vim.api.nvim_create_user_command("Format", function(args) 472 625 local range = nil ··· 514 667 { 515 668 "folke/lazydev.nvim", 516 669 ft = "lua", 517 - ---@module "lazydev" 518 - ---@type lazydev.Config 519 - opts = { 520 - ---@type lazydev.Library.spec[] 521 - library = { 522 - { path = "luvit-meta/library", words = { "vim%.uv" } }, 523 - }, 524 - }, 670 + config = function() 671 + require("lazydev").setup({ 672 + ---@type lazydev.Library.spec[] 673 + library = { 674 + { path = "luvit-meta/library" }, 675 + }, 676 + }) 677 + end, 525 678 }, 526 679 527 680 { ··· 532 685 --TODO: configure 533 686 { 534 687 "folke/trouble.nvim", 535 - dependencies = { "nvim-tree/nvim-web-devicons" }, 688 + dependencies = { 689 + "nvim-tree/nvim-web-devicons", 690 + }, 536 691 cmd = { "Trouble" }, 537 692 keys = { 538 693 { "<leader>t", "<Cmd>Trouble<CR>" }, 539 694 }, 540 - opts = {}, 695 + config = true, 541 696 }, 542 697 543 698 { ··· 557 712 { "<C-t><C-m>", "<cmd>Telescope man_pages<CR>", desc = "Telescope man" }, 558 713 --{ 'gd', '<cmd>Telescope lsp_definitions<CR>', desc = 'Telescope definitions' }, 559 714 --{ 'gi', '<cmd>Telescope implementations<CR>', desc = 'Telescope implementations' }, 560 - --{ '<leader>dl', '<cmd>Telescope diagnostics<CR>', desc = 'Telescope diagnostics' }, 715 + { "<C-t><C-d>", "<cmd>Telescope diagnostics<CR>", desc = "Telescope diagnostics" }, 561 716 }, 562 - opts = { 563 - defaults = { 564 - sorting_strategy = "ascending", 565 - layout_config = { 566 - prompt_position = "top", 717 + config = function() 718 + require("telescope").setup({ 719 + defaults = { 720 + sorting_strategy = "ascending", 721 + layout_config = { 722 + prompt_position = "top", 723 + }, 724 + file_ignore_patterns = { ".git/" }, 567 725 }, 568 - file_ignore_patterns = { ".git/" }, 569 - }, 570 - pickers = { 571 - find_files = { 572 - theme = "dropdown", 573 - hidden = true, 574 - }, 575 - buffers = { 576 - theme = "dropdown", 577 - }, 578 - live_grep = { 579 - theme = "dropdown", 580 - }, 581 - help_tags = { 582 - theme = "dropdown", 583 - }, 584 - man_pages = { 585 - theme = "dropdown", 726 + pickers = { 727 + find_files = { 728 + theme = "dropdown", 729 + hidden = true, 730 + }, 731 + buffers = { 732 + theme = "dropdown", 733 + }, 734 + live_grep = { 735 + theme = "dropdown", 736 + }, 737 + help_tags = { 738 + theme = "dropdown", 739 + }, 740 + man_pages = { 741 + theme = "dropdown", 742 + }, 586 743 }, 587 - }, 588 - }, 744 + }) 745 + end, 589 746 }, 590 747 591 748 { ··· 601 758 { "<C-h>", "<cmd>Neotree toggle<CR>", desc = "Toggle Neotree" }, 602 759 { "<leader>fh", "<cmd>Neotree reveal<CR>", desc = "Reveal file in Neotree" }, 603 760 }, 604 - opts = { 605 - close_if_last_window = true, 606 - filesystem = { 607 - follow_current_file = { 608 - enabled = true, 609 - }, 610 - filtered_items = { 611 - visible = true, 612 - never_show = { 613 - "..", 614 - "node_modules", 761 + config = function() 762 + require("neo-tree").setup({ 763 + close_if_last_window = true, 764 + filesystem = { 765 + follow_current_file = { 766 + enabled = true, 767 + leave_dirs_open = true, 615 768 }, 616 - }, 617 - find_command = "fd", 618 - find_args = { 619 - fd = { 620 - "--exclude", 621 - ".git", 622 - "--exclude", 623 - "node_modules", 769 + filtered_items = { 770 + visible = true, 771 + never_show = { 772 + "..", 773 + "node_modules", 774 + }, 775 + }, 776 + find_command = "fd", 777 + find_args = { 778 + fd = { 779 + "--exclude", 780 + ".git", 781 + "--exclude", 782 + "node_modules", 783 + }, 624 784 }, 785 + hijack_netrw_behavior = "disabled", 786 + use_libuv_file_watcher = true, 625 787 }, 626 - }, 627 - event_handlers = { 628 - -- { 629 - -- event = "file_opened", 630 - -- handler = function() 631 - -- require("neo-tree.command").execute({ action = "close" }) 632 - -- end, 633 - -- }, 634 - }, 635 - window = { 636 - mappings = { 637 - ["P"] = { "toggle_preview", config = { use_float = false } }, 788 + event_handlers = { 789 + -- { 790 + -- event = "file_opened", 791 + -- handler = function() 792 + -- require("neo-tree.command").execute({ action = "close" }) 793 + -- end, 794 + -- }, 638 795 }, 639 - }, 640 - }, 796 + window = { 797 + mappings = { 798 + ["P"] = { "toggle_preview", config = { use_float = false } }, 799 + }, 800 + }, 801 + }) 802 + end, 641 803 }, 642 804 643 805 { ··· 646 808 keys = { 647 809 { "<C-h>", "<cmd>lua if not MiniFiles.close() then MiniFiles.open() end<CR>", desc = "Toggle MiniFiles" }, 648 810 }, 649 - opts = { 650 - mappings = { 651 - close = "<Esc>", 652 - }, 653 - }, 811 + config = function() 812 + require("mini.files").setup({ 813 + mappings = { 814 + close = "<Esc>", 815 + }, 816 + }) 817 + end, 654 818 }, 655 819 656 820 { 657 821 "stevearc/oil.nvim", 658 - opts = { 659 - skip_confirm_for_simple_edits = true, 660 - prompt_save_on_select_new_entry = false, 661 - watch_for_changes = true, 662 - }, 822 + config = function() 823 + require("oil").setup({ 824 + skip_confirm_for_simple_edits = true, 825 + prompt_save_on_select_new_entry = false, 826 + watch_for_changes = true, 827 + }) 828 + end, 829 + }, 830 + 831 + { 832 + "rcarriga/nvim-notify", 833 + priority = 500, 834 + config = function() 835 + require("notify").setup({ 836 + stages = "static", 837 + max_height = function() 838 + return math.floor(vim.o.lines * 0.75) 839 + end, 840 + max_width = function() 841 + return math.floor(vim.o.columns * 0.75) 842 + end, 843 + on_open = function(win) 844 + vim.api.nvim_win_set_config(win, { zindex = 100 }) 845 + end, 846 + }) 847 + end, 663 848 }, 664 849 665 850 { ··· 669 854 "rcarriga/nvim-notify", 670 855 "smjonas/inc-rename.nvim", 671 856 }, 672 - opts = { 673 - lsp = { 674 - override = { 675 - ["vim.lsp.util.convert_input_to_markdown_lines"] = true, 676 - ["vim.lsp.util.stylize_markdown"] = true, 677 - ["cmp.entry.get_documentation"] = true, 857 + config = function() 858 + require("noice").setup({ 859 + lsp = { 860 + override = { 861 + ["vim.lsp.util.convert_input_to_markdown_lines"] = true, 862 + ["vim.lsp.util.stylize_markdown"] = true, 863 + ["cmp.entry.get_documentation"] = true, 864 + }, 865 + progress = { 866 + enabled = false, 867 + }, 868 + hover = { 869 + silent = true, 870 + }, 678 871 }, 679 - progress = { 680 - enabled = false, 872 + presets = { 873 + bottom_search = true, 874 + long_message_to_split = true, 875 + inc_rename = true, 876 + lsp_doc_border = true, 877 + }, 878 + popupmenu = { 879 + backend = "nui", -- cmp seems broken? 681 880 }, 682 - }, 683 - presets = { 684 - bottom_search = true, 685 - long_message_to_split = true, 686 - inc_rename = true, 687 - lsp_doc_border = true, 688 - }, 689 - }, 881 + }) 882 + end, 690 883 }, 691 884 692 885 { "stevearc/dressing.nvim" }, ··· 694 887 { 695 888 "andweeb/presence.nvim", 696 889 -- enabled = false, 697 - opts = { 698 - show_time = false, 699 - neovim_image_text = "Neovim", 700 - -- log_level = "debug", 701 - }, 890 + config = function() 891 + require("presence").setup({ 892 + show_time = false, 893 + neovim_image_text = "Neovim", 894 + -- log_level = "debug", 895 + }) 896 + end, 702 897 }, 703 898 704 899 { ··· 709 904 { "<leader>q", "<Cmd>QFToggle!<CR>" }, 710 905 { "<leader>l", "<Cmd>LLToggle!<CR>" }, 711 906 }, 712 - opts = {}, 907 + config = true, 713 908 }, 714 909 715 910 { 716 911 "yorickpeterse/nvim-pqf", 717 - opts = {}, 912 + config = true, 718 913 }, 719 914 720 915 { 721 916 "petertriho/nvim-scrollbar", 722 - dependencies = { "kevinhwang91/nvim-hlslens" }, 723 - opts = function() 724 - return { 917 + dependencies = { 918 + "kevinhwang91/nvim-hlslens", 919 + }, 920 + config = function() 921 + require("scrollbar").setup({ 725 922 handle = { 726 - color = require("nord.colors").nord2_gui, 923 + color = require("nord.colors").palette.polar_night.brighter, 727 924 }, 728 925 handlers = { 729 926 -- search = true, 730 927 }, 731 - } 928 + }) 732 929 end, 733 930 }, 734 931 ··· 743 940 { "g*", "g*<Cmd>lua require('hlslens').start()<CR>" }, 744 941 { "g#", "g#<Cmd>lua require('hlslens').start()<CR>" }, 745 942 }, 746 - opts = {}, 943 + config = true, 747 944 }, 748 945 749 946 { 750 947 "akinsho/toggleterm.nvim", 751 948 version = "*", 752 - opts = { 753 - open_mapping = "<C-q>", 754 - shading_factor = "0", 755 - winbar = { 756 - enabled = true, 757 - }, 949 + keys = { 950 + { "<C-q>", desc = "Toggle terminal" }, 758 951 }, 952 + config = function() 953 + require("toggleterm").setup({ 954 + open_mapping = "<C-q>", 955 + shading_factor = "0", 956 + winbar = { 957 + enabled = true, 958 + }, 959 + }) 960 + end, 759 961 }, 760 962 761 963 { 762 964 "ethanholz/nvim-lastplace", 763 - opts = {}, 965 + config = true, 764 966 }, 765 967 766 968 { 767 969 "kylechui/nvim-surround", 768 - opts = {}, 970 + config = true, 769 971 }, 770 972 771 973 { 772 974 "numtostr/comment.nvim", 773 - opts = {}, 975 + config = true, 774 976 }, 775 977 776 978 { ··· 798 1000 799 1001 { 800 1002 "j-hui/fidget.nvim", 801 - opts = {}, 1003 + config = true, 802 1004 }, 803 1005 804 1006 { 805 1007 "lewis6991/gitsigns.nvim", 806 - opts = {}, 1008 + config = true, 807 1009 }, 808 1010 809 1011 { 810 1012 "karb94/neoscroll.nvim", 811 - opts = { 812 - easing_function = "quadratic", 813 - }, 1013 + config = function() 1014 + require("neoscroll").setup({ 1015 + easing_function = "quadratic", 1016 + }) 1017 + end, 814 1018 }, 815 1019 816 1020 { "JopjeKnopje/42header_codam" }, ··· 820 1024 { 821 1025 "altermo/ultimate-autopair.nvim", 822 1026 event = { "InsertEnter", "CmdlineEnter" }, 823 - opts = { 824 - fastwarp = { 825 - faster = true, 826 - }, 827 - }, 1027 + config = function() 1028 + require("ultimate-autopair").setup({ 1029 + fastwarp = { 1030 + faster = true, 1031 + }, 1032 + }) 1033 + end, 828 1034 }, 829 1035 830 1036 { 831 1037 "TimUntersberger/neogit", 832 - opts = { 833 - commit_popup = { 834 - kind = "floating", 835 - }, 836 - popup = { 837 - kind = "floating", 838 - }, 839 - }, 1038 + config = function() 1039 + require("neogit").setup({ 1040 + commit_popup = { 1041 + kind = "floating", 1042 + }, 1043 + popup = { 1044 + kind = "floating", 1045 + }, 1046 + }) 1047 + end, 840 1048 }, 841 1049 842 1050 { 843 1051 "sindrets/diffview.nvim", 844 - dependencies = { "nvim-lua/plenary.nvim" }, 1052 + dependencies = { 1053 + "nvim-lua/plenary.nvim", 1054 + }, 1055 + config = true, 845 1056 }, 846 1057 847 1058 { 848 1059 "abecodes/tabout.nvim", 849 - opts = {}, 1060 + config = true, 850 1061 }, 851 1062 852 1063 { 853 1064 "NMAC427/guess-indent.nvim", 854 - opts = {}, 1065 + config = true, 855 1066 }, 856 1067 857 1068 { 858 1069 "NvChad/nvim-colorizer.lua", 859 1070 enabled = false, 860 1071 main = "colorizer", 861 - opts = { 862 - filetypes = { "*", "!lazy" }, 863 - user_default_options = { 864 - RGB = true, -- #RGB hex codes 865 - RRGGBB = true, -- #RRGGBB hex codes 866 - names = false, -- "Name" codes like Blue or blue 867 - RRGGBBAA = false, -- #RRGGBBAA hex codes 868 - AARRGGBB = false, -- 0xAARRGGBB hex codes 869 - rgb_fn = true, -- CSS rgb() and rgba() functions 870 - hsl_fn = true, -- CSS hsl() and hsla() functions 871 - css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB 872 - css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn 873 - -- Available modes for `mode`: foreground, background, virtualtext 874 - mode = "background", 875 - -- Available methods are false / true / "normal" / "lsp" / "both" 876 - -- True is same as normal 877 - tailwind = "both", 878 - sass = { 879 - enable = true, 880 - parsers = { "css" }, 1072 + config = function() 1073 + require("colorizer").setup({ 1074 + filetypes = { "*", "!lazy" }, 1075 + user_default_options = { 1076 + RGB = true, -- #RGB hex codes 1077 + RRGGBB = true, -- #RRGGBB hex codes 1078 + names = false, -- "Name" codes like Blue or blue 1079 + RRGGBBAA = false, -- #RRGGBBAA hex codes 1080 + AARRGGBB = false, -- 0xAARRGGBB hex codes 1081 + rgb_fn = true, -- CSS rgb() and rgba() functions 1082 + hsl_fn = true, -- CSS hsl() and hsla() functions 1083 + css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB 1084 + css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn 1085 + -- Available modes for `mode`: foreground, background, virtualtext 1086 + mode = "background", 1087 + -- Available methods are false / true / "normal" / "lsp" / "both" 1088 + -- True is same as normal 1089 + tailwind = "both", 1090 + sass = { 1091 + enable = true, 1092 + parsers = { "css" }, 1093 + }, 1094 + virtualtext = "■", 1095 + -- update color values even if buffer is not focused 1096 + -- example use: cmp_menu, cmp_docs 1097 + always_update = true, 881 1098 }, 882 - virtualtext = "■", 883 - -- update color values even if buffer is not focused 884 - -- example use: cmp_menu, cmp_docs 885 - always_update = true, 886 - }, 887 - }, 1099 + }) 1100 + end, 888 1101 }, 889 1102 890 1103 { 891 1104 "brenoprata10/nvim-highlight-colors", 892 1105 enabled = true, 893 - opts = { 894 - render = "virtual", 895 - enable_tailwind = true, 896 - }, 1106 + config = function() 1107 + require("nvim-highlight-colors").setup({ 1108 + render = "virtual", 1109 + enable_tailwind = true, 1110 + exclude_filetypes = { "gitcommit", "lazy", "help" }, 1111 + }) 1112 + end, 897 1113 }, 898 1114 899 1115 { 900 1116 "xorid/swap-split.nvim", 901 - opts = { 902 - ignore_filetypes = { "NvimTree", "notify", "toggleterm", "Trouble", "qf" }, 903 - }, 1117 + config = function() 1118 + require("swap-split").setup({ 1119 + ignore_filetypes = { "NvimTree", "neo-tree", "notify", "toggleterm", "Trouble", "qf" }, 1120 + }) 1121 + end, 904 1122 }, 905 1123 906 1124 { ··· 924 1142 }, 925 1143 }, 926 1144 config = function() 927 - local dap, dapui = require("dap"), require("dapui") 1145 + local dap = require("dap") 1146 + local dapui = require("dapui") 928 1147 929 1148 dap.listeners.after.event_initialized["dapui_config"] = function() 930 1149 dapui.open({}) ··· 942 1161 943 1162 { 944 1163 "Shatur/neovim-session-manager", 945 - dependencies = { "nvim-lua/plenary.nvim" }, 1164 + dependencies = { 1165 + "nvim-lua/plenary.nvim", 1166 + }, 946 1167 main = "session_manager", 947 1168 opts = function() 948 1169 local config = require("session_manager.config") 949 - 1170 + ---@module "plenary" 1171 + ---@class SessionManager.Settings 1172 + ---@field sessions_dir Path The directory where the session files will be saved. 1173 + ---@field session_filename_to_dir function(string): Path Function that replaces symbols into separators and colons to transform filename into a session directory. 1174 + ---@field dir_to_session_filename function(string): Path Function that replaces separators and colons into special symbols to transform session directory into a filename. Should use `vim.uv.cwd()` if the passed `dir` is `nil`. 1175 + ---@field autoload_mode ('Disabled'|'CurrentDir'|'LastSession'|'GitSession')[] Define what to do when Neovim is started without arguments. See "Autoload mode" section below. 1176 + ---@field autosave_last_session boolean Automatically save last session on exit and on session switch. 1177 + ---@field autosave_ignore_not_normal boolean Plugin will not save a session when no buffers are opened, or all of them aren't writable or listed. 1178 + ---@field autosave_ignore_dirs string[] A list of directories where the session will not be autosaved. 1179 + ---@field autosave_ignore_filetypes string[] All buffers of these file types will be closed before the session is saved. 1180 + ---@field autosave_ignore_buftypes string[] All buffers of these bufer types will be closed before the session is saved. 1181 + ---@field autosave_only_in_session boolean Always autosaves session. If true, only autosaves after a session is active. 1182 + ---@field max_path_length number Shorten the display path if length exceeds this threshold. Use 0 if don't want to shorten the path at all. 950 1183 return { 951 1184 autoload_mode = { config.AutoloadMode.GitSession, config.AutoloadMode.CurrentDir }, 1185 + autosave_ignore_dirs = { "~" }, 952 1186 } 953 1187 end, 954 1188 }, 955 1189 956 1190 { 957 1191 "chentoast/marks.nvim", 958 - opts = {}, 1192 + config = true, 959 1193 }, 960 1194 961 1195 { 962 1196 "jinh0/eyeliner.nvim", 963 - opts = { 964 - highlight_on_key = true, 965 - dim = true, 966 - }, 1197 + config = function() 1198 + require("eyeliner").setup({ 1199 + highlight_on_key = true, 1200 + dim = true, 1201 + }) 1202 + end, 967 1203 }, 968 1204 969 1205 { ··· 988 1224 { "<M-K>", "<Cmd>lua require('tmux').resize_top()<CR>", desc = "Resize top", mode = { "n", "t" } }, 989 1225 { "<M-L>", "<Cmd>lua require('tmux').resize_right()<CR>", desc = "Resize right", mode = { "n", "t" } }, 990 1226 }, 991 - opts = { 992 - navigation = { 993 - enable_default_keybindings = false, 994 - }, 995 - resize = { 996 - enable_custom_bindings = false, 997 - resize_step_x = 5, 998 - resize_step_y = 5, 999 - }, 1000 - }, 1227 + config = function() 1228 + require("tmux").setup({ 1229 + navigation = { 1230 + enable_default_keybindings = false, 1231 + }, 1232 + resize = { 1233 + enable_custom_bindings = false, 1234 + resize_step_x = 5, 1235 + resize_step_y = 5, 1236 + }, 1237 + }) 1238 + end, 1001 1239 }, 1002 1240 1003 1241 { ··· 1009 1247 vim.cmd.highlight("WinBar guibg=none") 1010 1248 vim.cmd.highlight("WinBarNC guibg=none") 1011 1249 end, 1012 - opts = {}, 1250 + config = true, 1013 1251 }, 1014 1252 1015 1253 { ··· 1038 1276 { "<M-9>", "<Cmd>BufferGoto 9<CR>", desc = "Buffer goto 9" }, 1039 1277 { "<M-0>", "<Cmd>BufferLast<CR>", desc = "Buffer goto last" }, 1040 1278 }, 1041 - opts = { 1042 - auto_hide = 1, 1043 - focus_on_close = "previous", 1044 - no_name_title = "new", 1045 - }, 1279 + config = function() 1280 + require("barbar").setup({ 1281 + auto_hide = 1, 1282 + focus_on_close = "previous", 1283 + no_name_title = "new", 1284 + }) 1285 + end, 1046 1286 }, 1047 1287 1048 1288 { 1049 1289 "tzachar/highlight-undo.nvim", 1050 1290 init = function() 1051 - local nord = require("nord.named_colors") 1291 + local nord = require("nord.colors").palette 1052 1292 1053 1293 vim.api.nvim_set_hl(0, "HighlightUndo", { 1054 - bg = nord.light_gray, 1055 - fg = nord.white, 1294 + bg = nord.polar_night.brighter, 1295 + fg = nord.snow_storm.brightest, 1296 + }) 1297 + end, 1298 + config = true, 1299 + }, 1300 + 1301 + { 1302 + "dmmulroy/ts-error-translator.nvim", 1303 + enabled = false, 1304 + config = true, 1305 + }, 1306 + 1307 + { 1308 + "MeanderingProgrammer/render-markdown.nvim", 1309 + enabled = false, 1310 + dependencies = { 1311 + "nvim-treesitter/nvim-treesitter", 1312 + "nvim-tree/nvim-web-devicons", 1313 + }, -- if you prefer nvim-web-devicons 1314 + config = function() 1315 + require("render-markdown").setup({ 1316 + preset = "lazy", 1317 + overrides = { 1318 + buftype = { 1319 + nofile = { 1320 + code = { left_pad = 0, right_pad = 0 }, 1321 + }, 1322 + }, 1323 + }, 1056 1324 }) 1057 1325 end, 1058 - opts = {}, 1059 1326 }, 1060 - }) 1327 + 1328 + { 1329 + "nvimdev/indentmini.nvim", 1330 + init = function() 1331 + local nord = require("nord.colors").palette 1332 + 1333 + vim.cmd.highlight("IndentLine guifg=" .. nord.polar_night.brighter) 1334 + vim.cmd.highlight("IndentLineCurHide guifg=" .. nord.polar_night.brighter) 1335 + vim.cmd.highlight("IndentLineCurrent guifg=" .. nord.polar_night.light) 1336 + end, 1337 + config = function() 1338 + require("indentmini").setup({ 1339 + char = "▎", 1340 + exclude = { "gitcommit" }, 1341 + }) 1342 + end, 1343 + enabled = true, 1344 + }, 1345 + 1346 + { 1347 + "lukas-reineke/indent-blankline.nvim", 1348 + main = "ibl", 1349 + config = true, 1350 + enabled = false, 1351 + }, 1352 + 1353 + { 1354 + "https://git.sr.ht/~whynothugo/lsp_lines.nvim", 1355 + config = function() 1356 + require("lsp_lines").setup() 1357 + vim.diagnostic.config({ 1358 + virtual_text = false, 1359 + virtual_lines = true, 1360 + }) 1361 + end, 1362 + }, 1363 + }