diff options
Diffstat (limited to 'neovim/.config/nvim/lua/plugins/lsp.lua')
| -rw-r--r-- | neovim/.config/nvim/lua/plugins/lsp.lua | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/neovim/.config/nvim/lua/plugins/lsp.lua b/neovim/.config/nvim/lua/plugins/lsp.lua new file mode 100644 index 0000000..0463dde --- /dev/null +++ b/neovim/.config/nvim/lua/plugins/lsp.lua | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | return { | ||
| 2 | "mason-org/mason-lspconfig.nvim", | ||
| 3 | dependencies = { | ||
| 4 | { "mason-org/mason.nvim", opts = {} }, | ||
| 5 | "neovim/nvim-lspconfig", | ||
| 6 | "saghen/blink.cmp", | ||
| 7 | }, | ||
| 8 | opts = { | ||
| 9 | ensure_installed = { | ||
| 10 | "pyright", | ||
| 11 | "lua_ls", | ||
| 12 | "bashls", | ||
| 13 | "terraformls", | ||
| 14 | "yamlls", | ||
| 15 | "ts_ls", | ||
| 16 | "cssls", | ||
| 17 | "html", | ||
| 18 | }, | ||
| 19 | -- default true: auto-calls vim.lsp.enable() for every Mason-installed | ||
| 20 | -- server as it finishes installing. | ||
| 21 | }, | ||
| 22 | config = function(_, opts) | ||
| 23 | -- Merge blink.cmp's LSP capabilities into every server's default config | ||
| 24 | -- (Mason-managed or not) before any server gets enabled. | ||
| 25 | vim.lsp.config("*", { | ||
| 26 | capabilities = require("blink.cmp").get_lsp_capabilities(), | ||
| 27 | }) | ||
| 28 | |||
| 29 | require("mason-lspconfig").setup(opts) | ||
| 30 | |||
| 31 | -- clangd ships with Xcode Command Line Tools already, so it's not | ||
| 32 | -- Mason-managed — nvim-lspconfig provides its default config, we just | ||
| 33 | -- need to turn it on. | ||
| 34 | vim.lsp.enable("clangd") | ||
| 35 | end, | ||
| 36 | } | ||
