clone of my dotfiles.ssp.sh
1
fork

Configure Feed

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

updated lspconfig to new way

sspaeti d2a79646 d2d026d2

+177 -235
+52 -52
nvim/.config/nvim/lazy-lock.json
··· 1 1 { 2 2 "ChatGPT.nvim": { "branch": "main", "commit": "5b6d296eefc75331e2ff9f0adcffbd7d27862dd6" }, 3 - "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" }, 4 - "aerial.nvim": { "branch": "master", "commit": "5c0df1679bf7c814c924dc6646cc5291daca8363" }, 5 - "alpha-nvim": { "branch": "main", "commit": "2b3cbcdd980cae1e022409289245053f62fb50f6" }, 6 - "avante.nvim": { "branch": "main", "commit": "fed6902c9a9a3c4473238e924cddc1ba19f3195b" }, 3 + "LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" }, 4 + "aerial.nvim": { "branch": "master", "commit": "3c42785790d401731e7809a25f27f62dae2fec12" }, 5 + "alpha-nvim": { "branch": "main", "commit": "3979b01cb05734331c7873049001d3f2bb8477f4" }, 6 + "avante.nvim": { "branch": "main", "commit": "ca95e0386433da2077184719886fa658257261a3" }, 7 7 "bigfile.nvim": { "branch": "main", "commit": "33eb067e3d7029ac77e081cfe7c45361887a311a" }, 8 - "black": { "branch": "main", "commit": "9c47b6e20c934c9137a4562bda49a039820488ba" }, 9 - "blame.nvim": { "branch": "main", "commit": "b87b8c820e4cec06fbbd2f946b7b35c45906ee0c" }, 8 + "black": { "branch": "main", "commit": "45b4087976b7880db9dabacc992ee142f2d6c7c7" }, 9 + "blame.nvim": { "branch": "main", "commit": "f3f6153ea94e1120f2776f22bbbd63c4aeebaf32" }, 10 10 "blamer.nvim": { "branch": "master", "commit": "e0d43c11697300eb68f00d69df8b87deb0bf52dc" }, 11 11 "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, 12 - "catppuccin": { "branch": "main", "commit": "30fa4d122d9b22ad8b2e0ab1b533c8c26c4dde86" }, 12 + "catppuccin": { "branch": "main", "commit": "da33755d00e09bff2473978910168ff9ea5dc453" }, 13 13 "chatblade.nvim": { "branch": "main", "commit": "358b03ee53d59acd8448860fa280c99916f597c0" }, 14 14 "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, 15 - "cmp-nvim-lsp": { "branch": "main", "commit": "bd5a7d6db125d4654b50eeae9f5217f24bb22fd3" }, 15 + "cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" }, 16 16 "cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" }, 17 17 "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, 18 - "copilot.vim": { "branch": "release", "commit": "f3d66c148aa60ad04c0a21d3e0a776459de09eb2" }, 18 + "copilot.vim": { "branch": "release", "commit": "da369d90cfd6c396b1d0ec259836a1c7222fb2ea" }, 19 19 "dbtpal": { "branch": "main", "commit": "981eab51609362712c64e3cf3fb773fe11f859b9" }, 20 20 "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, 21 - "fidget.nvim": { "branch": "main", "commit": "2cb5edb2dd6700a958a446b20bb2be04d318da9d" }, 21 + "fidget.nvim": { "branch": "main", "commit": "e32b672d8fd343f9d6a76944fedb8c61d7d8111a" }, 22 22 "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, 23 - "fzf": { "branch": "master", "commit": "de1824f71d82896331a12cea4fe5781de5f8a315" }, 24 - "fzf.vim": { "branch": "master", "commit": "3725f364ccd25b85a91970720ba9bc2931861910" }, 23 + "fzf": { "branch": "master", "commit": "3db63f5e52ebf88a483558cbdfa4143fb84e41d0" }, 24 + "fzf.vim": { "branch": "master", "commit": "879db51d0965515cdaef9b7f6bdeb91c65d2829e" }, 25 25 "github-nvim-theme": { "branch": "main", "commit": "8db454eb272eabb349209ec62ceb63b8eea5f011" }, 26 26 "gruvbox-material": { "branch": "master", "commit": "30e9f4b0fa24c25980df1690a8c47c36e40b6673" }, 27 - "gruvbox.nvim": { "branch": "main", "commit": "58a2cda2e953a99e2f87c12b7fb4602da4e0709c" }, 27 + "gruvbox.nvim": { "branch": "main", "commit": "5e0a460d8e0f7f669c158dedd5f9ae2bcac31437" }, 28 28 "harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" }, 29 29 "highlight-undo.nvim": { "branch": "main", "commit": "ee32e12693d70e66f954d09a504a7371d110fc27" }, 30 30 "indent-blankline.nvim": { "branch": "master", "commit": "9637670896b68805430e2f72cf5d16be5b97a22a" }, 31 - "kanagawa-paper.nvim": { "branch": "master", "commit": "de0c30425b9df69446664377d0d72824d2391872" }, 32 - "kanagawa.nvim": { "branch": "master", "commit": "debe91547d7fb1eef34ce26a5106f277fbfdd109" }, 33 - "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, 34 - "lazygit.nvim": { "branch": "main", "commit": "3c524ebec6072568064235c407195e9f9fd0cb8a" }, 35 - "lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" }, 36 - "lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" }, 31 + "kanagawa-paper.nvim": { "branch": "master", "commit": "075c35ea22ddb65399f80e81285558aea53542bb" }, 32 + "kanagawa.nvim": { "branch": "master", "commit": "aef7f5cec0a40dbe7f3304214850c472e2264b10" }, 33 + "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, 34 + "lazygit.nvim": { "branch": "main", "commit": "2305deed25bc61b866d5d39189e9105a45cf1cfb" }, 35 + "lspkind.nvim": { "branch": "master", "commit": "3ddd1b4edefa425fda5a9f95a4f25578727c0bb3" }, 36 + "lualine.nvim": { "branch": "master", "commit": "3946f0122255bc377d14a59b27b609fb3ab25768" }, 37 37 "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, 38 - "markdown.nvim": { "branch": "master", "commit": "dfa0d2def6dbf77e9206b16dc90cad4dd23d55d2" }, 39 - "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, 40 - "mason-null-ls.nvim": { "branch": "main", "commit": "de19726de7260c68d94691afb057fa73d3cc53e7" }, 38 + "markdown.nvim": { "branch": "master", "commit": "34bb88989ace6c678abd947662668994219996e0" }, 39 + "mason-lspconfig.nvim": { "branch": "main", "commit": "7d527c76c43f46294de9c19d39c5a86317809b4b" }, 40 + "mason-null-ls.nvim": { "branch": "main", "commit": "8e7806acaa87fae64f0bfde25bb4b87c18bd19b4" }, 41 41 "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, 42 - "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, 42 + "mason.nvim": { "branch": "main", "commit": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800" }, 43 43 "mcphub.nvim": { "branch": "main", "commit": "8ff40b5edc649959bb7e89d25ae18e055554859a" }, 44 - "mini.icons": { "branch": "main", "commit": "f9a177c11daa7829389b7b6eaaec8b8a5c47052d" }, 45 - "neo-tree.nvim": { "branch": "main", "commit": "ed057048a281b418d5318dd5153f9486daa517a3" }, 44 + "mini.icons": { "branch": "main", "commit": "397ed3807e96b59709ef3292f0a3e253d5c1dc0a" }, 45 + "neo-tree.nvim": { "branch": "v3.x", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" }, 46 46 "neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" }, 47 47 "neoformat": { "branch": "master", "commit": "2b11fb9fa383636de5de9ecc7c989436c4e0f9d1" }, 48 - "neovim": { "branch": "main", "commit": "72befaffeac38db7bdd49e0549eaa2c4806dd878" }, 49 - "noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" }, 50 - "none-ls.nvim": { "branch": "main", "commit": "5fcb73913a9290f78097e34420fe0e6130c5c33c" }, 48 + "neovim": { "branch": "main", "commit": "cf2a288696b03d0934da713d66c6d71557b5c997" }, 49 + "noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" }, 50 + "none-ls.nvim": { "branch": "main", "commit": "550197530c12b4838d685cf4e0d5eb4cca8d52c7" }, 51 51 "nordic.nvim": { "branch": "main", "commit": "6afe957722fb1b0ec7ca5fbea5a651bcca55f3e1" }, 52 52 "nui-components.nvim": { "branch": "main", "commit": "1654dd709f13874089eefc80d82e0eb667f7fdfb" }, 53 53 "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, 54 - "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, 55 - "nvim-dev-container": { "branch": "main", "commit": "664d31ed0f71f0ca7c6cf1dead281bc157d7d858" }, 56 - "nvim-highlight-colors": { "branch": "main", "commit": "1ce0a09bfc28c7274e649d20927cea51e440b65c" }, 57 - "nvim-jdtls": { "branch": "master", "commit": "4d77ff02063cf88963d5cf10683ab1fd15d072de" }, 54 + "nvim-cmp": { "branch": "main", "commit": "d97d85e01339f01b842e6ec1502f639b080cb0fc" }, 55 + "nvim-dev-container": { "branch": "main", "commit": "59d85de531912c3def3061ae1d84c769e09a5653" }, 56 + "nvim-highlight-colors": { "branch": "main", "commit": "e0c4a58ec8c3ca7c92d3ee4eb3bc1dd0f7be317e" }, 57 + "nvim-jdtls": { "branch": "master", "commit": "38d265ee4d45da73a083ca83e41de7d37567be5c" }, 58 58 "nvim-lsp-file-operations": { "branch": "master", "commit": "9744b738183a5adca0f916527922078a965515ed" }, 59 - "nvim-lspconfig": { "branch": "master", "commit": "c8b90ae5cbe21d547b342b05c9266dcb8ca0de8f" }, 60 - "nvim-notify": { "branch": "master", "commit": "397c7c1184745fca649e5104de659e6392ef5a4d" }, 59 + "nvim-lspconfig": { "branch": "master", "commit": "b7c48a7111534b66bee077da8035ac7208a294ff" }, 60 + "nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" }, 61 61 "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, 62 - "nvim-treesitter-context": { "branch": "master", "commit": "dca8726fea2c14e1ce6adbaa76a04816fbfaff61" }, 63 - "nvim-treesitter-textobjects": { "branch": "master", "commit": "71385f191ec06ffc60e80e6b0c9a9d5daed4824c" }, 64 - "nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" }, 65 - "nvim-web-devicons": { "branch": "master", "commit": "c2599a81ecabaae07c49ff9b45dcd032a8d90f1a" }, 66 - "octo.nvim": { "branch": "master", "commit": "cdddd801139a3d8b7cdae788e10d4755991a0a11" }, 67 - "onedark.nvim": { "branch": "master", "commit": "de495fabe171d48aed5525f002d14414efcecbb2" }, 62 + "nvim-treesitter-context": { "branch": "master", "commit": "660861b1849256398f70450afdf93908d28dc945" }, 63 + "nvim-treesitter-textobjects": { "branch": "master", "commit": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef" }, 64 + "nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" }, 65 + "nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" }, 66 + "octo.nvim": { "branch": "master", "commit": "14bc17dc3b3befcb1fd1c870d311b389060c63e7" }, 67 + "onedark.nvim": { "branch": "master", "commit": "6c10964f91321c6a0f09bcc41dd64e7a6602bc4f" }, 68 68 "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, 69 69 "rainbow-delimiters.nvim": { "branch": "master", "commit": "97bf4b8ef9298644a29fcd9dd41a0210cf08cac7" }, 70 - "render-markdown.nvim": { "branch": "main", "commit": "e5c3c500d66e9aaf04c116cdfdb0b040d56a1521" }, 70 + "render-markdown.nvim": { "branch": "main", "commit": "6e0e8902dac70fecbdd8ce557d142062a621ec38" }, 71 71 "rust-tools.nvim": { "branch": "master", "commit": "676187908a1ce35ffcd727c654ed68d851299d3e" }, 72 - "snacks.nvim": { "branch": "main", "commit": "b0a95a027cf68d3a07c68909b73fe96818cbf7c9" }, 72 + "snacks.nvim": { "branch": "main", "commit": "fe7cfe9800a182274d0f868a74b7263b8c0c020b" }, 73 73 "solarized-osaka.nvim": { "branch": "main", "commit": "f796014c14b1910e08d42cc2077fef34f08e0295" }, 74 74 "telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, 75 - "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, 75 + "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }, 76 76 "tree-sitter-glimmer": { "branch": "main", "commit": "da605af8c5999b43e6839b575eae5e6cafabb06f" }, 77 - "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, 78 - "undotree": { "branch": "master", "commit": "28f2f54a34baff90ea6f4a735ef1813ad875c743" }, 79 - "vague.nvim": { "branch": "main", "commit": "087ff41d1b4d90e7b64e1c97860700fa6b7f0daf" }, 77 + "trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" }, 78 + "undotree": { "branch": "master", "commit": "0f1c9816975b5d7f87d5003a19c53c6fd2ff6f7f" }, 79 + "vague.nvim": { "branch": "main", "commit": "dba28050887c2810b5ebf9e0143b4e919bd55757" }, 80 80 "vim-abolish": { "branch": "master", "commit": "dcbfe065297d31823561ba787f51056c147aa682" }, 81 81 "vim-commentary": { "branch": "master", "commit": "64a654ef4a20db1727938338310209b6a63f60c9" }, 82 82 "vim-dadbod": { "branch": "master", "commit": "e95afed23712f969f83b4857a24cf9d59114c2e6" }, 83 83 "vim-dadbod-completion": { "branch": "master", "commit": "a8dac0b3cf6132c80dc9b18bef36d4cf7a9e1fe6" }, 84 - "vim-dadbod-ui": { "branch": "master", "commit": "2900a1617b3df1a48683d872eadbe1101146a49a" }, 84 + "vim-dadbod-ui": { "branch": "master", "commit": "236179fd6bdc2aabeb1326d428e6b29d41044d8e" }, 85 85 "vim-easy-align": { "branch": "master", "commit": "9815a55dbcd817784458df7a18acacc6f82b1241" }, 86 86 "vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" }, 87 - "vim-helm": { "branch": "master", "commit": "cc5ac22444332381f38084a6c7f023c25eef6201" }, 87 + "vim-helm": { "branch": "master", "commit": "2c8525fd98e57472769d137317bca83e477858ce" }, 88 88 "vim-jinja2-syntax": { "branch": "master", "commit": "2c17843b074b06a835f88587e1023ceff7e2c7d1" }, 89 89 "vim-lastplace": { "branch": "master", "commit": "e58cb0df716d3c88605ae49db5c4741db8b48aa9" }, 90 90 "vim-rhubarb": { "branch": "master", "commit": "5496d7c94581c4c9ad7430357449bb57fc59f501" }, 91 - "vim-signify": { "branch": "master", "commit": "54346382be614ef5934cbbe204fd58ba3247a84d" }, 91 + "vim-signify": { "branch": "master", "commit": "9ec7989ef5f92c5073de26abb46fc6a998b75ef8" }, 92 92 "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, 93 93 "vim-system-copy": { "branch": "master", "commit": "8abd9ed21016bdc21b458c79da3b9ac0ee25c1ce" }, 94 94 "vim-textobj-python": { "branch": "master", "commit": "06de233e805b6bcfd0fde7591c64cf927637feb7" }, 95 95 "vim-textobj-user": { "branch": "master", "commit": "41a675ddbeefd6a93664a4dc52f302fe3086a933" }, 96 96 "vim-tmux-navigator": { "branch": "master", "commit": "c45243dc1f32ac6bcf6068e5300f3b2b237e576a" }, 97 - "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }, 97 + "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }, 98 98 "wpm.nvim": { "branch": "main", "commit": "dba1dd57fe744cd0e09c54fb0b2c334eaed777f8" }, 99 - "yazi.nvim": { "branch": "main", "commit": "ddb52bd5c1067643071b42c0d0934f4d48c8774a" }, 100 - "zen-mode.nvim": { "branch": "main", "commit": "863f150ca321b3dd8aa1a2b69b5f411a220e144f" } 99 + "yazi.nvim": { "branch": "main", "commit": "996cff24ca2afcf975e249b6c1c75183b3563826" }, 100 + "zen-mode.nvim": { "branch": "main", "commit": "8564ce6d29ec7554eb9df578efa882d33b3c23a7" } 101 101 }
+27 -26
nvim/.config/nvim/lua/sspaeti/plugins/_init_lazy.lua
··· 1 1 return { 2 2 --rust 3 3 { 4 - "simrat39/rust-tools.nvim", 5 - event = "VeryLazy", 4 + "neovim/nvim-lspconfig", 5 + ft = { "rust" }, 6 6 config = function() 7 - local opts = { 8 - tools = { 9 - -- rust-tools options 7 + -- Configure rust_analyzer using the new vim.lsp.config API 8 + vim.lsp.config("rust_analyzer", { 9 + settings = { 10 + ["rust-analyzer"] = { 11 + cargo = { 12 + allFeatures = true, 13 + }, 14 + checkOnSave = { 15 + command = "clippy", 16 + }, 17 + }, 10 18 }, 11 - server = { 12 - on_attach = function(_, bufnr) 13 - -- Hover actions 14 - vim.keymap.set( 15 - "n", 16 - "<C-space>", 17 - require("rust-tools").hover_actions.hover_actions, 18 - { buffer = bufnr } 19 - ) 20 - -- Code action groups 21 - vim.keymap.set( 22 - "n", 23 - "<Leader>a", 24 - require("rust-tools").code_action_group.code_action_group, 25 - { buffer = bufnr } 26 - ) 27 - end, 28 - }, -- rust-analyser options 29 - } 30 - require("rust-tools").setup(opts) 19 + }) 20 + 21 + -- Enable rust_analyzer for rust files 22 + vim.api.nvim_create_autocmd("FileType", { 23 + pattern = "rust", 24 + callback = function() 25 + vim.lsp.enable("rust_analyzer") 26 + 27 + -- Set up keymaps for rust files 28 + local bufnr = vim.api.nvim_get_current_buf() 29 + vim.keymap.set("n", "<C-space>", vim.lsp.buf.hover, { buffer = bufnr, desc = "Hover actions" }) 30 + vim.keymap.set("n", "<Leader>a", vim.lsp.buf.code_action, { buffer = bufnr, desc = "Code actions" }) 31 + end, 32 + }) 31 33 end, 32 - ft = { "rust", "rs" }, 33 34 }, 34 35 --'puremourning/vimspector', --debugging in vim 35 36 { "christoomey/vim-system-copy", event = "VeryLazy" },
+95 -152
nvim/.config/nvim/lua/sspaeti/plugins/lsp/lspconfig.lua
··· 57 57 -- { "<Leader>lw", function() vim.lsp.buf.workspace_symbol() end, desc = "LSP Workspace Symbol (Leader)" }, 58 58 }, 59 59 config = function() 60 - -- import lspconfig plugin 61 - local lspconfig = require("lspconfig") 62 - 63 60 -- import cmp-nvim-lsp plugin 64 61 local cmp_nvim_lsp = require("cmp_nvim_lsp") 65 62 ··· 133 130 vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" }) 134 131 end 135 132 136 - -- configure html server 137 - lspconfig["html"].setup({ 138 - capabilities = capabilities, 139 - on_attach = on_attach, 140 - }) 141 - 142 - -- configure typescript server with plugin 143 - lspconfig["ts_ls"].setup({ 144 - capabilities = capabilities, 145 - on_attach = on_attach, 146 - }) 147 - -- 148 - -- -- not suggested with ts_ls together 149 - -- lspconfig["denols"].setup({ 150 - -- capabilities = capabilities, 151 - -- on_attach = on_attach, 152 - -- }) 153 - 154 - -- configure css server 155 - lspconfig["cssls"].setup({ 156 - capabilities = capabilities, 157 - on_attach = on_attach, 158 - }) 159 - 160 - -- configure tailwindcss server 161 - lspconfig["tailwindcss"].setup({ 162 - capabilities = capabilities, 163 - on_attach = on_attach, 164 - }) 165 - 166 - lspconfig["helm_ls"].setup({ 167 - capabilities = capabilities, 168 - on_attach = on_attach, 169 - filetypes = { "helm", "yaml" }, 170 - }) 171 - 172 - -- -- configure svelte server 173 - -- lspconfig["svelte"].setup({ 174 - -- capabilities = capabilities, 175 - -- on_attach = function(client, bufnr) 176 - -- on_attach(client, bufnr) 177 - 178 - -- vim.api.nvim_create_autocmd("BufWritePost", { 179 - -- pattern = { "*.js", "*.ts" }, 180 - -- callback = function(ctx) 181 - -- if client.name == "svelte" then 182 - -- client.notify("$/onDidChangeTsOrJsFile", { uri = ctx.file }) 183 - -- end 184 - -- end, 185 - -- }) 186 - -- end, 187 - -- }) 188 - 189 - -- configure graphql language server 190 - lspconfig["graphql"].setup({ 191 - capabilities = capabilities, 192 - on_attach = on_attach, 193 - filetypes = { "graphql", "gql", "svelte", "typescriptreact", "javascriptreact" }, 194 - }) 195 - 196 - -- configure emmet language server 197 - lspconfig["emmet_ls"].setup({ 198 - capabilities = capabilities, 199 - on_attach = on_attach, 200 - filetypes = { "html", "typescriptreact", "javascriptreact", "css", "sass", "scss", "less", "svelte" }, 201 - }) 202 - 203 - -- configure python server 204 - lspconfig["pyright"].setup({ 205 - capabilities = capabilities, 206 - on_attach = on_attach, 207 - }) 208 - 209 - -- Configure `ruff-lsp`. 210 - -- See: https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ruff_lsp 211 - -- For the default config, along with instructions on how to customize the settings 212 - lspconfig["ruff"].setup { 213 - capabilities = capabilities, 214 - on_attach = on_attach, 215 - init_options = { 133 + -- Define LSP servers with their configurations 134 + local servers = { 135 + { "html", { 136 + capabilities = capabilities, 137 + on_attach = on_attach, 138 + }}, 139 + { "ts_ls", { 140 + capabilities = capabilities, 141 + on_attach = on_attach, 142 + }}, 143 + { "cssls", { 144 + capabilities = capabilities, 145 + on_attach = on_attach, 146 + }}, 147 + { "tailwindcss", { 148 + capabilities = capabilities, 149 + on_attach = on_attach, 150 + }}, 151 + { "helm_ls", { 152 + capabilities = capabilities, 153 + on_attach = on_attach, 154 + filetypes = { "helm", "yaml" }, 155 + }}, 156 + { "graphql", { 157 + capabilities = capabilities, 158 + on_attach = on_attach, 159 + filetypes = { "graphql", "gql", "svelte", "typescriptreact", "javascriptreact" }, 160 + }}, 161 + { "emmet_ls", { 162 + capabilities = capabilities, 163 + on_attach = on_attach, 164 + filetypes = { "html", "typescriptreact", "javascriptreact", "css", "sass", "scss", "less", "svelte" }, 165 + }}, 166 + { "pyright", { 167 + capabilities = capabilities, 168 + on_attach = on_attach, 169 + }}, 170 + { "ruff", { 171 + capabilities = capabilities, 172 + on_attach = on_attach, 173 + init_options = { 174 + settings = { 175 + args = {}, 176 + } 177 + } 178 + }}, 179 + { "lua_ls", { 180 + capabilities = capabilities, 181 + on_attach = on_attach, 216 182 settings = { 217 - -- Any extra CLI arguments for `ruff` go here. 218 - args = {}, 219 - } 220 - } 221 - } 222 - -- configure lua server (with special settings) 223 - lspconfig["lua_ls"].setup({ 224 - capabilities = capabilities, 225 - on_attach = on_attach, 226 - settings = { -- custom settings for lua 227 - Lua = { 228 - format = { 229 - enable = true, 230 - defaultConfig = { 231 - indent_style = "space", 232 - indent_size = "2", 233 - align_continuous_assign_statement = false, 234 - align_continuous_rect_table_field = false, 235 - align_array_table = false 183 + Lua = { 184 + format = { 185 + enable = true, 186 + defaultConfig = { 187 + indent_style = "space", 188 + indent_size = "2", 189 + align_continuous_assign_statement = false, 190 + align_continuous_rect_table_field = false, 191 + align_array_table = false 192 + }, 236 193 }, 237 - }, 238 - -- make the language server recognize "vim" global 239 - diagnostics = { 240 - globals = { "vim" }, 241 - }, 242 - workspace = { 243 - -- make language server aware of runtime files 244 - library = { 245 - [vim.fn.expand("$VIMRUNTIME/lua")] = true, 246 - [vim.fn.stdpath("config") .. "/lua"] = true, 194 + diagnostics = { 195 + globals = { "vim" }, 196 + }, 197 + workspace = { 198 + library = { 199 + [vim.fn.expand("$VIMRUNTIME/lua")] = true, 200 + [vim.fn.stdpath("config") .. "/lua"] = true, 201 + }, 247 202 }, 248 203 }, 249 204 }, 250 - }, 251 - }) 252 - 253 - lspconfig["lemminx"].setup({ 254 - capabilities = capabilities, 255 - on_attach = on_attach, 256 - settings = { 257 - xml = { 258 - server = { 259 - workDir = "~/.cache/lemminx", 205 + }}, 206 + { "lemminx", { 207 + capabilities = capabilities, 208 + on_attach = on_attach, 209 + settings = { 210 + xml = { 211 + server = { 212 + workDir = "~/.cache/lemminx", 213 + } 260 214 } 261 215 } 262 - } 263 - }) 216 + }}, 217 + { "bashls", { 218 + capabilities = capabilities, 219 + on_attach = on_attach, 220 + }}, 221 + { "jdtls", { 222 + capabilities = capabilities, 223 + on_attach = on_attach, 224 + root_dir = vim.fs.root(0, {'gradlew', '.git', 'mvnw', 'pom.xml', 'build.gradle', 'build.sbt', 'build.sc'}), 225 + }}, 226 + } 264 227 265 - lspconfig["bashls"].setup({ 266 - capabilities = capabilities, 267 - on_attach = on_attach, 268 - }) 269 - 270 - -- lspconfig["ruby_lsp"].setup({ 271 - -- capabilities = capabilities, 272 - -- on_attach = on_attach, 273 - -- }) 274 - 275 - --java setup 276 - local project_files = {'gradlew', '.git', 'mvnw', 'pom.xml', 'build.gradle', 'build.sbt', 'build.sc'} 277 - local root_dir = require('lspconfig/util').root_pattern(unpack(project_files)) 278 - 279 - lspconfig['jdtls'].setup({ 280 - capabilities = capabilities, 281 - on_attach = on_attach, 282 - root_dir = root_dir, 283 - --on_attach = function(client, bufnr) 284 - -- on_attach(client, bufnr) 285 - 286 - -- --TODO: not yet correct? root_dir need to be set? 287 - -- --also file types need to be added (?): 288 - -- --util.root_pattern("build.sbt", "build.sc", "build.gradle", "pom.xml") 289 - 290 - -- root_dir = vim.fs.dirname(vim.fs.find({'gradlew', '.git', 'mvnw'}, { upward = true })[1]) 291 - --end 292 - }) 228 + -- Configure all servers using the new vim.lsp.config API 229 + -- They will be automatically enabled when you open a matching filetype 230 + for _, server in ipairs(servers) do 231 + local name, config = server[1], server[2] 232 + vim.lsp.config(name, config) 233 + -- Note: vim.lsp.enable() is NOT called here 234 + -- Servers will auto-start when opening matching filetypes 235 + end 293 236 294 237 end, 295 238
-5
nvim/.config/nvim/lua/sspaeti/plugins/lsp/mason.lua
··· 30 30 ensure_installed = { 31 31 "html", 32 32 "cssls", 33 - "tailwindcss", 34 - -- "svelte", 35 33 "lua_ls", 36 - "graphql", 37 - "emmet_ls", -- { "html", "typescriptreact", "javascriptreact", "css", "sass", "scss", "less", "svelte" } --> See lspconfig.lua 38 - -- "prismals", 39 34 "pyright", 40 35 }, 41 36 -- auto-install configured servers (with lspconfig)
+3
nvim/.config/nvim/lua/sspaeti/set.lua
··· 100 100 -- Automatically set activated virtual environment for Python 101 101 vim.g.python3_host_prog = vim.fn.expand("$HOME/.venvs/nvim/bin/python3") 102 102 103 + -- Disable Perl provider (not used) 104 + vim.g.loaded_perl_provider = 0 105 + 103 106 -- Register a command in Neovim to format JSON using jq 104 107 vim.api.nvim_create_user_command('Formatj', function() 105 108 vim.cmd('%!jq .')