i use arch btw
0
fork

Configure Feed

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

Update nvim config

- Update which-key config for latest version
- Show startup time in lualine
- Switch from Copilot to Maven and move config
- Add lspkind for icons in nvim-cmp
- Add nvim-highlight-colors
- Switch from tsserver to vtsls and map GotoSourceDefinition
- Add tailwindcss language server
- Add nvim-lsp-file-operations
- Add formatters to conform.nvim, stop after first formatter, add
commands to toggle autoformat on save
- Add luvit-meta library to lazydev
- Change Telscope buffers keybinds to avoid conflict with tmux
- Follow current file in neo-tree, hide node_modules and .. (which
shows
up after moving something using a relative path), don't use
floating
window for preview
- Add mini.files (disable for now)
- Add oil.nvim
- Use opts for presence.nvim config
- Change config = true to opts = {} for a bunch of plugins
- Add dial.nvim augends
- Add nvim-colorizer (disabled) and nvim-highlight-colors
- Autoload last session using nvim-session-manager
- Disable default tmux.nvim keybinds
- Add barbar.nvim keybinds, disable offset with neo-tree

+465 -191
+51 -43
nvim/.config/nvim/lazy-lock.json
··· 1 1 { 2 2 "42header_codam": { "branch": "master", "commit": "727e299117075f87b154a40f2e4ec8a48594d7de" }, 3 - "barbar.nvim": { "branch": "master", "commit": "d181f2cfd4b828f9c6f1e10e69c68241de59f54f" }, 3 + "barbar.nvim": { "branch": "master", "commit": "53b5a2f34b68875898f0531032fbf090e3952ad7" }, 4 4 "c_formatter_42.vim": { "branch": "master", "commit": "7a2d50f6683d6f58a2c95375524b4406d6bdc2c3" }, 5 5 "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, 6 6 "comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, 7 - "conform.nvim": { "branch": "master", "commit": "c26dadf8a47a547768d1048a0d698ecec33494ce" }, 8 - "copilot.lua": { "branch": "master", "commit": "86537b286f18783f8b67bccd78a4ef4345679625" }, 9 - "dial.nvim": { "branch": "master", "commit": "750f802879c90ea51f92b68c35fa562ee575804a" }, 7 + "conform.nvim": { "branch": "master", "commit": "25d48271e3d4404ba017cb92a37d3a681c1ad149" }, 8 + "dial.nvim": { "branch": "master", "commit": "ed4d6a5bbd5e479b4c4a3019d148561a2e6c1490" }, 10 9 "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, 11 10 "dressing.nvim": { "branch": "master", "commit": "6741f1062d3dc6e4755367a7e9b347b553623f04" }, 12 - "dropbar.nvim": { "branch": "master", "commit": "79847a78ec0c58f5e5c0360192b03d0cee803e95" }, 13 - "eyeliner.nvim": { "branch": "main", "commit": "c540d58bf52aa979d4cca639c60387ae0c0ccf88" }, 14 - "fidget.nvim": { "branch": "main", "commit": "ef99df04a1c53a453602421bc0f756997edc8289" }, 15 - "gitsigns.nvim": { "branch": "main", "commit": "fa42613096ebfa5fee1ea87d70f8625ab9685d01" }, 16 - "guess-indent.nvim": { "branch": "main", "commit": "6c75506e71836f34fe5c5efa322dfce3e0494e7b" }, 11 + "dropbar.nvim": { "branch": "master", "commit": "aa4c0ab1ade45ff9a3c5d4c06365c9b119f32d36" }, 12 + "eyeliner.nvim": { "branch": "main", "commit": "828da1c18de397f7bf8fd4fff1daa1c4352b28cf" }, 13 + "fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" }, 14 + "gitsigns.nvim": { "branch": "main", "commit": "58bd9e98d8e3c5a1c98af312e85247ee1afd3ed2" }, 15 + "guess-indent.nvim": { "branch": "main", "commit": "6cd61f7a600bb756e558627cd2e740302c58e32d" }, 17 16 "highlight-undo.nvim": { "branch": "main", "commit": "1ea1c79372d7d93c88fd97543880927b7635e3d2" }, 18 - "inc-rename.nvim": { "branch": "main", "commit": "535b508c0cb14d00c1836ad901b3c531cb1152bb" }, 19 - "lazy.nvim": { "branch": "main", "commit": "69041bccb70f68408633e93ed33012ee18889bb0" }, 20 - "lazydev.nvim": { "branch": "main", "commit": "6184ebbbc8045d70077659b7d30c705a588dc62f" }, 21 - "lsp-zero.nvim": { "branch": "v3.x", "commit": "16de3b18c5f7b6230d89b8e64ce9a4801b6f8d08" }, 22 - "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, 23 - "luasnip": { "branch": "master", "commit": "50fcf17db7c75af80e6b6109acfbfb4504768780" }, 17 + "inc-rename.nvim": { "branch": "main", "commit": "8ba77017ca468f3029bf88ef409c2d20476ea66b" }, 18 + "lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" }, 19 + "lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" }, 20 + "lsp-zero.nvim": { "branch": "v3.x", "commit": "56db3d5ce5476b183783160e6045f7337ba12b83" }, 21 + "lspkind.nvim": { "branch": "master", "commit": "cff4ae321a91ee3473a92ea1a8c637e3a9510aec" }, 22 + "lualine.nvim": { "branch": "master", "commit": "544dd1583f9bb27b393f598475c89809c4d5e86b" }, 23 + "luasnip": { "branch": "master", "commit": "7552e6504ee95a9c8cfc6db53e389122ded46cd4" }, 24 + "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, 24 25 "marks.nvim": { "branch": "master", "commit": "74e8d01b2a2131b6e46354cffc553aa7f81bcf5b" }, 25 - "mason-lspconfig.nvim": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" }, 26 - "mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" }, 26 + "mason-lspconfig.nvim": { "branch": "main", "commit": "62360f061d45177dda8afc1b0fd1327328540301" }, 27 + "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, 28 + "mini.files": { "branch": "main", "commit": "99aef1d68a01dd8fd8d37bbf62d67766f97311e3" }, 27 29 "neo-tree.nvim": { "branch": "v3.x", "commit": "29f7c215332ba95e470811c380ddbce2cebe2af4" }, 28 - "neogit": { "branch": "master", "commit": "d27a36009114f61d620817d8cc6e421dc8d6bd77" }, 29 - "neoscroll.nvim": { "branch": "master", "commit": "a731f66f1d39ec6175fd201c5bf849e54abda99c" }, 30 - "neovim-session-manager": { "branch": "master", "commit": "29f80e9c6f3620b81908e287b3d1ed79c2290dd5" }, 31 - "noice.nvim": { "branch": "main", "commit": "cade1f972ba226e7753a7a113f3f1a942908e73c" }, 30 + "neogit": { "branch": "master", "commit": "2b74a777b963dfdeeabfabf84d5ba611666adab4" }, 31 + "neoscroll.nvim": { "branch": "master", "commit": "532dcc8cea4287c4cad6bb77532989a8217cfc7b" }, 32 + "neovim-session-manager": { "branch": "master", "commit": "cbaebd92dce84e9ba63cb07d3199e5a19b204c1a" }, 33 + "noice.nvim": { "branch": "main", "commit": "448bb9c524a7601035449210838e374a30153172" }, 32 34 "nord.nvim": { "branch": "master", "commit": "80c1e5321505aeb22b7a9f23eb82f1e193c12470" }, 33 - "nui.nvim": { "branch": "main", "commit": "a2bc1e9d0359caa5d11ad967cd1e30e8d4676226" }, 34 - "nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" }, 35 - "nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" }, 36 - "nvim-dap": { "branch": "master", "commit": "6f79b822997f2e8a789c6034e147d42bc6706770" }, 35 + "nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" }, 36 + "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, 37 + "nvim-colorizer.lua": { "branch": "master", "commit": "194ec600488f7c7229668d0e80bd197f3a2b84ff" }, 38 + "nvim-dap": { "branch": "master", "commit": "dcc85d12d6e2c18c5fa0f9a304d9f5e767e1401a" }, 37 39 "nvim-dap-projects": { "branch": "main", "commit": "f319ffd99c6c8a0b930bcfc4bee0c751ffbf5808" }, 38 - "nvim-dap-ui": { "branch": "master", "commit": "b7267003ba4dd860350be86f75b9d9ea287cedca" }, 39 - "nvim-dap-virtual-text": { "branch": "master", "commit": "d7c695ea39542f6da94ee4d66176f5d660ab0a77" }, 40 + "nvim-dap-ui": { "branch": "master", "commit": "a5606bc5958db86f8d92803bea7400ee26a8d7e4" }, 41 + "nvim-dap-virtual-text": { "branch": "master", "commit": "484995d573c0f0563f6a66ebdd6c67b649489615" }, 42 + "nvim-highlight-colors": { "branch": "main", "commit": "a411550ef85cae467b889ba7d1a96bd78332d90e" }, 40 43 "nvim-lastplace": { "branch": "main", "commit": "0bb6103c506315044872e0f84b1f736c4172bb20" }, 41 - "nvim-lspconfig": { "branch": "master", "commit": "9c9eb07fecc578e25e28db8dc9002b43fff2ed79" }, 44 + "nvim-lsp-file-operations": { "branch": "master", "commit": "92a673de7ecaa157dd230d0128def10beb56d103" }, 45 + "nvim-lspconfig": { "branch": "master", "commit": "6c505d4220b521f3b0e7b645f6ce45fa914d0eed" }, 42 46 "nvim-luadev": { "branch": "master", "commit": "3ba0c02c378503739f1fdb95cff3ea2aad48db3e" }, 43 - "nvim-nio": { "branch": "master", "commit": "7969e0a8ffabdf210edd7978ec954a47a737bbcc" }, 47 + "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, 44 48 "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, 45 49 "nvim-pqf": { "branch": "main", "commit": "148ee2ca8b06d83fd9bf6f9b9497724ad39a07d6" }, 46 50 "nvim-scrollbar": { "branch": "main", "commit": "d09f14aa16c9f2748e77008f9da7b1f76e4e7b85" }, 47 51 "nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" }, 48 - "nvim-treesitter": { "branch": "master", "commit": "09700b88b41ed96391de3d2010d74dc54fd5c210" }, 52 + "nvim-treesitter": { "branch": "master", "commit": "c79b068f395817c39ed147d4ee76855c36b846e6" }, 49 53 "nvim-treesitter-endwise": { "branch": "master", "commit": "8b34305ffc28bd75a22f5a0a9928ee726a85c9a6" }, 50 - "nvim-treesitter-textobjects": { "branch": "master", "commit": "34867c69838078df7d6919b130c0541c0b400c47" }, 51 - "nvim-ts-autotag": { "branch": "main", "commit": "ddfccbf0df1b9349c2b9e9b17f4afa8f9b6c1ed1" }, 52 - "nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" }, 54 + "nvim-treesitter-textobjects": { "branch": "master", "commit": "33a17515b79ddb10d750320fa994098bdc3e93ef" }, 55 + "nvim-ts-autotag": { "branch": "main", "commit": "dc5e1687ab76ee02e0f11c5ce137f530b36e98b3" }, 56 + "nvim-vtsls": { "branch": "main", "commit": "45c6dfea9f83a126e9bfc5dd63430562b3f8af16" }, 57 + "nvim-web-devicons": { "branch": "master", "commit": "3722e3d1fb5fe1896a104eb489e8f8651260b520" }, 58 + "oil.nvim": { "branch": "master", "commit": "fcca212c2e966fc3dec1d4baf888e670631d25d1" }, 53 59 "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, 54 60 "presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" }, 55 61 "qf_helper.nvim": { "branch": "master", "commit": "fa3c2f3f2706e2c9984409c9c14b5993302ddfa7" }, 56 - "schemastore.nvim": { "branch": "main", "commit": "93ccaf12b9fb6df87d13da2782d83b34a3cbb893" }, 62 + "schemastore.nvim": { "branch": "main", "commit": "218a9887085b81b3eb0ee8f1e2d20c4a7fd7b1c9" }, 57 63 "suda.vim": { "branch": "master", "commit": "b97fab52f9cdeabe2bbb5eb98d82356899f30829" }, 64 + "supermaven-nvim": { "branch": "main", "commit": "d71257f431e190d9236d7f30da4c2d659389e91f" }, 58 65 "swap-split.nvim": { "branch": "main", "commit": "d2c705d279b384a6b47a67f85a6dc8569c4d775d" }, 59 - "tabout.nvim": { "branch": "master", "commit": "3d7fbc7f5e91ef0f96b4d787c78ad9f8820de3ec" }, 60 - "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" }, 66 + "tabout.nvim": { "branch": "master", "commit": "923aea2613c9e7abf81e099d46086f62c7e54896" }, 67 + "tailwind-tools.nvim": { "branch": "master", "commit": "72f01ba654ffaf382c1df996b77cc53ec7860f70" }, 68 + "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, 61 69 "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, 62 - "tmux.nvim": { "branch": "main", "commit": "da618e075f42793400c3ee1e59ef3ebada2cb23c" }, 63 - "toggleterm.nvim": { "branch": "main", "commit": "066cccf48a43553a80a210eb3be89a15d789d6e6" }, 64 - "treesj": { "branch": "main", "commit": "f98deb33805485b56a8d44d1a27d16874af00d7f" }, 65 - "trouble.nvim": { "branch": "main", "commit": "88c3be40c061ce053ab326ce4fdcb973a1f785ff" }, 66 - "ultimate-autopair.nvim": { "branch": "v0.6", "commit": "035d92eab05ac1390afef7204e3fcad9a50fa443" }, 67 - "which-key.nvim": { "branch": "main", "commit": "0099511294f16b81c696004fa6a403b0ae61f7a0" } 68 - } 70 + "tmux.nvim": { "branch": "main", "commit": "65ee9d6e6308afcd7d602e1320f727c5be63a947" }, 71 + "toggleterm.nvim": { "branch": "main", "commit": "48be57eaba817f038d61bbf64d2c597f578c0827" }, 72 + "treesj": { "branch": "main", "commit": "0d81326b5afd36babe7dd480aabbb0b05f33e688" }, 73 + "trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" }, 74 + "ultimate-autopair.nvim": { "branch": "v0.6", "commit": "1420fb9e07b1d80cc6d87e7d90827fb2c1109cb3" }, 75 + "which-key.nvim": { "branch": "main", "commit": "6c1584eb76b55629702716995cca4ae2798a9cca" } 76 + }
+414 -148
nvim/.config/nvim/lua/plugins.lua
··· 32 32 33 33 { 34 34 "folke/which-key.nvim", 35 + event = "VeryLazy", 35 36 opts = { 36 - window = { 37 - border = "single", 38 - }, 37 + preset = "modern", 39 38 }, 40 39 }, 41 40 ··· 44 43 dependencies = { 45 44 "nvim-tree/nvim-web-devicons", 46 45 }, 47 - config = function() 48 - require("lualine").setup({ 46 + config = function(plugin) 47 + local lualine = require("lualine") 48 + local startuptime_visible = true 49 + -- hide startup time after 3 seconds 50 + vim.defer_fn(function() 51 + startuptime_visible = false 52 + end, 3000) 53 + 54 + lualine.setup({ 49 55 options = { 50 56 theme = "nord", 51 57 component_separators = "|", ··· 72 78 lualine_x = { 73 79 { 74 80 function() 75 - return require("lazy").stats().startuptime 81 + return math.floor(require("lazy").stats().startuptime) .. "ms" 82 + end, 83 + icon = "󱎫", 84 + cond = function() 85 + return startuptime_visible 76 86 end, 77 87 }, 78 88 }, ··· 104 114 "RRethy/nvim-treesitter-endwise", 105 115 "windwp/nvim-ts-autotag", 106 116 }, 107 - config = function() 108 - ---@diagnostic disable-next-line: missing-fields 109 - require("nvim-treesitter.configs").setup({ 110 - ensure_installed = { 111 - "lua", 112 - "vim", 113 - "vimdoc", 114 - "bash", 115 - "fish", 116 - "diff", 117 - "json", 118 - "jsonc", 119 - "markdown", 120 - "markdown_inline", 121 - "regex", 122 - }, 123 - auto_install = true, 124 - highlight = { 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 = { 125 148 enable = true, 126 - disable = { "gitcommit" }, 127 - }, 128 - textobjects = { 129 - select = { 130 - enable = true, 131 - lookahead = true, 132 - keymaps = { 133 - ["af"] = "@function.outer", 134 - ["if"] = "@function.inner", 135 - ["ac"] = "@comment.outer", 136 - ["ic"] = "@comment.outer", 137 - ["aa"] = "@parameter.outer", 138 - ["ia"] = "@parameter.inner", 139 - }, 140 - selection_modes = { 141 - ["@function.outer"] = "V", 142 - ["@function.inner"] = "V", 143 - }, 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", 144 157 }, 145 - move = { 146 - enable = true, 147 - set_jumps = true, 148 - goto_next_start = { 149 - ["]m"] = "@function.outer", 150 - }, 158 + selection_modes = { 159 + ["@function.outer"] = "V", 160 + ["@function.inner"] = "V", 151 161 }, 152 162 }, 153 - endwise = { 163 + move = { 154 164 enable = true, 165 + set_jumps = true, 166 + goto_next_start = { 167 + ["]m"] = "@function.outer", 168 + }, 155 169 }, 156 - autotag = { 157 - enable = true, 158 - }, 159 - }) 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) 160 180 end, 161 181 }, 162 182 ··· 179 199 }, 180 200 181 201 { 202 + "zbirenbaum/copilot.lua", 203 + 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-]>", 222 + }, 223 + }, 224 + }, 225 + }, 226 + 227 + { 228 + "supermaven-inc/supermaven-nvim", 229 + opts = { 230 + keymaps = { 231 + accept_suggestion = "<M-CR>", 232 + accept_word = "<M-.>", 233 + clear_suggestion = "<M-]>", 234 + }, 235 + }, 236 + }, 237 + 238 + { 182 239 "vonheikemen/lsp-zero.nvim", 183 240 branch = "v3.x", 184 241 dependencies = { ··· 187 244 "neovim/nvim-lspconfig", 188 245 "hrsh7th/nvim-cmp", 189 246 "hrsh7th/cmp-nvim-lsp", 247 + "onsails/lspkind.nvim", 190 248 "l3mon4d3/luasnip", 191 249 "b0o/schemastore.nvim", 192 - { 193 - "zbirenbaum/copilot.lua", 194 - opts = { 195 - filetypes = { 196 - gitcommit = true, 197 - markdown = true, 198 - yaml = true, 199 - }, 200 - panel = { 201 - enabled = false, 202 - }, 203 - suggestion = { 204 - auto_trigger = true, 205 - keymap = { 206 - accept = "<M-CR>", 207 - accept_word = "<M-L>", 208 - accept_line = "<M-l>", 209 - next = "<M-j>", 210 - prev = "<M-k>", 211 - dismiss = "<C-]>", 212 - }, 213 - }, 214 - }, 215 - }, 216 - -- { "zbirenbaum/copilot-cmp", config = true }, 250 + "yioneko/nvim-vtsls", 251 + -- { "zbirenbaum/copilot-cmp", opts = {} }, 217 252 }, 218 253 config = function() 219 254 local lsp_zero = require("lsp-zero") 220 255 local lspconfig = require("lspconfig") 221 256 local schemastore = require("schemastore") 222 257 local cmp = require("cmp") 223 - local cmp_format = require("lsp-zero").cmp_format() 224 258 225 259 cmp.setup({ 226 260 sources = { ··· 231 265 mapping = cmp.mapping.preset.insert({ 232 266 ["<C-Space>"] = cmp.mapping.complete(), 233 267 }), 234 - formatting = cmp_format, 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 + }, 235 283 window = { 236 284 completion = cmp.config.window.bordered(), 237 285 documentation = cmp.config.window.bordered(), ··· 239 287 }) 240 288 241 289 lsp_zero.on_attach(function(client, bufnr) 242 - -- see :help lsp-zero-keybindings 243 - -- to learn the available actions 290 + -- :h lsp-zero-keybindings 244 291 lsp_zero.default_keymaps({ 245 292 buffer = bufnr, 246 293 preserve_mappings = false, 294 + exclude = { "gs" }, 247 295 }) 296 + 297 + vim.keymap.set( 298 + "n", 299 + "gk", 300 + "<cmd>lua vim.lsp.buf.signature_help()<cr>", 301 + { desc = "Show function signature", silent = true, buffer = bufnr } 302 + ) 303 + 304 + if client.name == "vtsls" then 305 + vim.keymap.set( 306 + "n", 307 + "gs", 308 + "<cmd>VtsExec goto_source_definition<cr>", 309 + { desc = "Goto source definition", silent = true, buffer = bufnr } 310 + ) 311 + end 248 312 end) 249 313 250 314 require("mason").setup({}) ··· 261 325 "tailwindcss", 262 326 "terraformls", 263 327 "tflint", 264 - "tsserver", 328 + "vtsls", 265 329 }, 266 330 handlers = { 267 331 lsp_zero.default_setup, 268 332 269 333 lua_ls = function() 270 - local lua_opts = lsp_zero.nvim_lua_ls() 271 - lua_opts.settings.Lua.format = { 272 - enable = false, 334 + -- local lua_opts = lsp_zero.nvim_lua_ls() 335 + local lua_opts = { 336 + settings = { 337 + Lua = { 338 + format = { 339 + enable = false, 340 + }, 341 + }, 342 + }, 273 343 } 274 344 lspconfig.lua_ls.setup(lua_opts) 275 345 end, 346 + 276 347 jsonls = function() 277 348 lspconfig.jsonls.setup({ 278 349 settings = { ··· 288 359 }, 289 360 }) 290 361 end, 362 + 291 363 yamlls = function() 292 364 lspconfig.yamlls.setup({ 293 365 settings = { ··· 304 376 }, 305 377 }) 306 378 end, 379 + 380 + tailwindcss = function() 381 + lspconfig.tailwindcss.setup({ 382 + settings = { 383 + tailwindCSS = { 384 + experimental = { 385 + classRegex = { 386 + { "cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]" }, 387 + { "cx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)" }, 388 + }, 389 + }, 390 + }, 391 + }, 392 + }) 393 + end, 394 + 395 + vtsls = function() 396 + lspconfig.vtsls.setup({ 397 + settings = { 398 + javascript = { 399 + updateImportsOnFileMove = "always", 400 + }, 401 + typescript = { 402 + updateImportsOnFileMove = "always", 403 + }, 404 + vtsls = { 405 + enableMoveToFileCodeAction = true, 406 + }, 407 + }, 408 + }) 409 + end, 307 410 }, 308 411 }) 309 412 end, 310 413 }, 311 414 312 415 { 416 + "antosha417/nvim-lsp-file-operations", 417 + requires = { 418 + "nvim-lua/plenary.nvim", 419 + "nvim-neo-tree/neo-tree.nvim", 420 + }, 421 + opts = {}, 422 + }, 423 + 424 + { 425 + "luckasRanarison/tailwind-tools.nvim", 426 + enabled = false, 427 + ---@module "tailwind-tools" 428 + ---@type TailwindTools.Option 429 + opts = {}, 430 + }, 431 + 432 + { 313 433 "stevearc/conform.nvim", 434 + event = { "BufWritePre" }, 435 + cmd = { "ConformInfo", "Format", "FormatDisable", "FormatEnable", "FormatToggle" }, 314 436 init = function() 315 437 vim.o.formatexpr = "v:lua.require'conform'.formatexpr()" 316 438 end, ··· 318 440 formatters_by_ft = { 319 441 lua = { "stylua" }, 320 442 yaml = { "yamlfmt" }, 321 - javascript = { { "prettierd", "prettier" } }, 322 - javascriptreact = { { "prettierd", "prettier" } }, 323 - typescript = { { "prettierd", "prettier" } }, 324 - typescriptreact = { { "prettierd", "prettier" } }, 325 - css = { { "prettierd", "prettier" } }, 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 }, 326 450 sh = { "shfmt" }, 327 451 fish = { "fish_indent" }, 328 452 }, 329 - format_on_save = { 330 - lsp_fallback = true, 331 - }, 453 + format_on_save = function(bufnr) 454 + if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then 455 + return 456 + end 457 + 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 464 + 465 + return { lsp_format = "fallback" } 466 + end, 332 467 }, 468 + config = function(_, opts) 469 + require("conform").setup(opts) 470 + 471 + vim.api.nvim_create_user_command("Format", function(args) 472 + local range = nil 473 + if args.count ~= -1 then 474 + local end_line = vim.api.nvim_buf_get_lines(0, args.line2 - 1, args.line2, true)[1] 475 + range = { 476 + start = { args.line1, 0 }, 477 + ["end"] = { args.line2, end_line:len() }, 478 + } 479 + end 480 + 481 + require("conform").format({ async = true, lsp_format = "fallback", range = range }) 482 + end, {}) 483 + 484 + vim.api.nvim_create_user_command("FormatDisable", function(args) 485 + if args.bang then 486 + vim.b.disable_autoformat = true 487 + else 488 + vim.g.disable_autoformat = true 489 + end 490 + end, { 491 + bang = true, 492 + desc = "Disable autoformat on save (bang to disable for current buffer only)", 493 + }) 494 + 495 + vim.api.nvim_create_user_command("FormatEnable", function() 496 + vim.b.disable_autoformat = false 497 + vim.g.disable_autoformat = false 498 + end, { 499 + desc = "Re-enable autoformat on save", 500 + }) 501 + 502 + vim.api.nvim_create_user_command("FormatToggle", function() 503 + if vim.g.disable_autoformat then 504 + vim.g.disable_autoformat = false 505 + else 506 + vim.g.disable_autoformat = true 507 + end 508 + end, { 509 + desc = "Toggle autoformat on save", 510 + }) 511 + end, 333 512 }, 334 513 335 514 { 336 515 "folke/lazydev.nvim", 337 516 ft = "lua", 338 - opts = {}, 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 + }, 525 + }, 526 + 527 + { 528 + "Bilal2453/luvit-meta", 529 + lazy = true, 339 530 }, 340 531 341 532 --TODO: configure ··· 360 551 keys = { 361 552 { "<C-t><C-r>", "<cmd>Telescope resume<CR>", desc = "Telescope resume" }, 362 553 { "<C-t><C-p>", "<cmd>Telescope find_files<CR>", desc = "Telescope find files" }, 363 - { "<C-t><C-b>", "<cmd>Telescope buffers<CR>", desc = "Telescope buffers" }, 554 + { "<C-t><C-f>", "<cmd>Telescope buffers<CR>", desc = "Telescope buffers" }, 364 555 { "<C-t><C-g>", "<cmd>Telescope live_grep<CR>", desc = "Telescope grep" }, 365 556 { "<C-t><C-c>", "<cmd>Telescope help_tags<CR>", desc = "Telescope help" }, 366 557 { "<C-t><C-m>", "<cmd>Telescope man_pages<CR>", desc = "Telescope man" }, ··· 408 599 }, 409 600 keys = { 410 601 { "<C-h>", "<cmd>Neotree toggle<CR>", desc = "Toggle Neotree" }, 602 + { "<leader>fh", "<cmd>Neotree reveal<CR>", desc = "Reveal file in Neotree" }, 411 603 }, 412 604 opts = { 413 605 close_if_last_window = true, 414 606 filesystem = { 607 + follow_current_file = { 608 + enabled = true, 609 + }, 415 610 filtered_items = { 416 611 visible = true, 612 + never_show = { 613 + "..", 614 + "node_modules", 615 + }, 417 616 }, 418 617 find_command = "fd", 419 618 find_args = { ··· 432 631 -- require("neo-tree.command").execute({ action = "close" }) 433 632 -- end, 434 633 -- }, 634 + }, 635 + window = { 636 + mappings = { 637 + ["P"] = { "toggle_preview", config = { use_float = false } }, 638 + }, 435 639 }, 436 640 }, 437 641 }, 438 642 439 643 { 644 + "echasnovski/mini.files", 645 + enabled = false, 646 + keys = { 647 + { "<C-h>", "<cmd>lua if not MiniFiles.close() then MiniFiles.open() end<CR>", desc = "Toggle MiniFiles" }, 648 + }, 649 + opts = { 650 + mappings = { 651 + close = "<Esc>", 652 + }, 653 + }, 654 + }, 655 + 656 + { 657 + "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 + }, 663 + }, 664 + 665 + { 440 666 "folke/noice.nvim", 441 667 dependencies = { 442 668 "muniftanjim/nui.nvim", ··· 467 693 468 694 { 469 695 "andweeb/presence.nvim", 470 - enabled = true, 471 - config = function() 472 - require("presence"):setup({ 473 - show_time = false, 474 - neovim_image_text = "Neovim", 475 - -- log_level = "debug", 476 - }) 477 - end, 696 + -- enabled = false, 697 + opts = { 698 + show_time = false, 699 + neovim_image_text = "Neovim", 700 + -- log_level = "debug", 701 + }, 478 702 }, 479 703 480 704 { ··· 485 709 { "<leader>q", "<Cmd>QFToggle!<CR>" }, 486 710 { "<leader>l", "<Cmd>LLToggle!<CR>" }, 487 711 }, 488 - config = true, 712 + opts = {}, 489 713 }, 490 714 491 715 { 492 716 "yorickpeterse/nvim-pqf", 493 - config = true, 717 + opts = {}, 494 718 }, 495 719 496 720 { ··· 519 743 { "g*", "g*<Cmd>lua require('hlslens').start()<CR>" }, 520 744 { "g#", "g#<Cmd>lua require('hlslens').start()<CR>" }, 521 745 }, 522 - config = true, 746 + opts = {}, 523 747 }, 524 748 525 749 { ··· 536 760 537 761 { 538 762 "ethanholz/nvim-lastplace", 539 - config = true, 763 + opts = {}, 540 764 }, 541 765 542 766 { 543 767 "kylechui/nvim-surround", 544 - config = true, 768 + opts = {}, 545 769 }, 546 770 547 771 { 548 772 "numtostr/comment.nvim", 549 - config = true, 773 + opts = {}, 550 774 }, 551 775 552 776 { ··· 557 781 { "g<C-a>", "<Cmd>lua require('dial.map').manipulate('increment', 'gnormal')<CR>", mode = { "n", "v" } }, 558 782 { "g<C-x>", "<Cmd>lua require('dial.map').manipulate('decrement', 'gnormal')<CR>", mode = { "n", "v" } }, 559 783 }, 784 + config = function() 785 + local augend = require("dial.augend") 786 + 787 + require("dial.config").augends:register_group({ 788 + default = { 789 + augend.integer.alias.decimal, 790 + augend.integer.alias.hex, 791 + augend.date.alias["%Y/%m/%d"], 792 + augend.date.alias["%Y-%m-%d"], 793 + augend.constant.alias.bool, 794 + }, 795 + }) 796 + end, 560 797 }, 561 798 562 799 { ··· 566 803 567 804 { 568 805 "lewis6991/gitsigns.nvim", 569 - config = true, 806 + opts = {}, 570 807 }, 571 808 572 809 { ··· 609 846 610 847 { 611 848 "abecodes/tabout.nvim", 612 - config = true, 849 + opts = {}, 613 850 }, 614 851 615 852 { 616 853 "NMAC427/guess-indent.nvim", 617 - config = true, 854 + opts = {}, 618 855 }, 619 856 620 857 { 621 858 "NvChad/nvim-colorizer.lua", 859 + enabled = false, 860 + main = "colorizer", 622 861 opts = { 623 862 filetypes = { "*", "!lazy" }, 624 - RGB = true, -- #RGB hex codes 625 - RRGGBB = true, -- #RRGGBB hex codes 626 - names = false, -- "Name" codes like Blue or blue 627 - RRGGBBAA = false, -- #RRGGBBAA hex codes 628 - AARRGGBB = false, -- 0xAARRGGBB hex codes 629 - rgb_fn = true, -- CSS rgb() and rgba() functions 630 - hsl_fn = true, -- CSS hsl() and hsla() functions 631 - css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB 632 - css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn 633 - -- Available modes for `mode`: foreground, background, virtualtext 634 - mode = "background", 635 - -- Available methods are false / true / "normal" / "lsp" / "both" 636 - -- True is same as normal 637 - tailwind = "both", 638 - sass = { 639 - enable = true, 640 - parsers = { "css" }, 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" }, 881 + }, 882 + virtualtext = "■", 883 + -- update color values even if buffer is not focused 884 + -- example use: cmp_menu, cmp_docs 885 + always_update = true, 641 886 }, 642 - virtualtext = "■", 643 - -- update color values even if buffer is not focused 644 - -- example use: cmp_menu, cmp_docs 645 - always_update = false, 887 + }, 888 + }, 889 + 890 + { 891 + "brenoprata10/nvim-highlight-colors", 892 + enabled = true, 893 + opts = { 894 + render = "virtual", 895 + enable_tailwind = true, 646 896 }, 647 897 }, 648 898 ··· 693 943 { 694 944 "Shatur/neovim-session-manager", 695 945 dependencies = { "nvim-lua/plenary.nvim" }, 696 - config = function() 946 + main = "session_manager", 947 + opts = function() 697 948 local config = require("session_manager.config") 698 - -- print(config.AutoloadMode.CurrentDir) 699 949 700 - require("session_manager").setup({ 701 - autoload_mode = config.AutoloadMode.Disabled, 702 - }) 950 + return { 951 + autoload_mode = { config.AutoloadMode.GitSession, config.AutoloadMode.CurrentDir }, 952 + } 703 953 end, 704 954 }, 705 955 706 956 { 707 957 "chentoast/marks.nvim", 708 - config = true, 958 + opts = {}, 709 959 }, 710 960 711 961 { ··· 739 989 { "<M-L>", "<Cmd>lua require('tmux').resize_right()<CR>", desc = "Resize right", mode = { "n", "t" } }, 740 990 }, 741 991 opts = { 742 - copy_sync = { 743 - redirect_to_clipboard = true, 992 + navigation = { 993 + enable_default_keybindings = false, 744 994 }, 745 995 resize = { 746 996 enable_custom_bindings = false, ··· 755 1005 dependencies = { 756 1006 "nvim-telescope/telescope-fzf-native.nvim", 757 1007 }, 758 - config = function() 759 - require("dropbar").setup() 760 - 1008 + init = function() 761 1009 vim.cmd.highlight("WinBar guibg=none") 762 1010 vim.cmd.highlight("WinBarNC guibg=none") 763 1011 end, 1012 + opts = {}, 764 1013 }, 765 1014 766 1015 { 767 1016 "romgrk/barbar.nvim", 1017 + lazy = false, 768 1018 dependencies = { 769 1019 "lewis6991/gitsigns.nvim", 770 1020 "nvim-tree/nvim-web-devicons", 771 1021 }, 1022 + keys = { 1023 + { "<M-.>", "<Cmd>BufferNext<CR>", desc = "Buffer next" }, 1024 + { "<M-,>", "<Cmd>BufferPrevious<CR>", desc = "Buffer previous" }, 1025 + { "<M-d>", "<Cmd>BufferClose<CR>", desc = "Buffer close" }, 1026 + { "<M-<>", "<Cmd>BufferMovePrevious<CR>", desc = "Buffer move previous" }, 1027 + { "<M->>", "<Cmd>BufferMoveNext<CR>", desc = "Buffer move next" }, 1028 + { "<M-p", "<Cmd>BufferPin<CR>", desc = "Buffer pin" }, 1029 + { "<C-p>", "<Cmd>BufferPick<CR>", desc = "Buffer pick" }, 1030 + { "<M-1>", "<Cmd>BufferGoto 1<CR>", desc = "Buffer goto 1" }, 1031 + { "<M-2>", "<Cmd>BufferGoto 2<CR>", desc = "Buffer goto 2" }, 1032 + { "<M-3>", "<Cmd>BufferGoto 3<CR>", desc = "Buffer goto 3" }, 1033 + { "<M-4>", "<Cmd>BufferGoto 4<CR>", desc = "Buffer goto 4" }, 1034 + { "<M-5>", "<Cmd>BufferGoto 5<CR>", desc = "Buffer goto 5" }, 1035 + { "<M-6>", "<Cmd>BufferGoto 6<CR>", desc = "Buffer goto 6" }, 1036 + { "<M-7>", "<Cmd>BufferGoto 7<CR>", desc = "Buffer goto 7" }, 1037 + { "<M-8>", "<Cmd>BufferGoto 8<CR>", desc = "Buffer goto 8" }, 1038 + { "<M-9>", "<Cmd>BufferGoto 9<CR>", desc = "Buffer goto 9" }, 1039 + { "<M-0>", "<Cmd>BufferLast<CR>", desc = "Buffer goto last" }, 1040 + }, 772 1041 opts = { 773 1042 auto_hide = 1, 774 1043 focus_on_close = "previous", 775 - sidebar_filetypes = { 776 - ["neo-tree"] = { event = "BufWipeout" }, 777 - }, 778 1044 no_name_title = "new", 779 1045 }, 780 1046 },