mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 16:53:00 +00:00
40 lines
1.1 KiB
Lua
40 lines
1.1 KiB
Lua
return {
|
|
"neovim/nvim-lspconfig",
|
|
dependencies = { "saghen/blink.cmp" },
|
|
event = {
|
|
"BufReadPost",
|
|
"BufWritePost",
|
|
"BufNewFile",
|
|
},
|
|
|
|
-- example using `opts` for defining servers
|
|
opts = {
|
|
servers = {
|
|
lua_ls = {},
|
|
bashls = {},
|
|
clangd = {},
|
|
eslint = {}, -- JavaScript
|
|
gopls = {}, -- Go
|
|
jsonls = {}, -- JSON
|
|
markdown_oxide = {}, -- Markdown
|
|
omnisharp = {}, -- C# & F#
|
|
powershell_es = {}, -- PowerShell
|
|
pyright = {}, -- Python
|
|
taplo = {}, -- TOML
|
|
rust_analyzer = {}, -- Rust
|
|
ts_ls = {}, -- TypeScript
|
|
vimls = {}, -- vimscript
|
|
yamlls = {}, -- YAML
|
|
beancount = {}, -- Beancount
|
|
},
|
|
},
|
|
config = function(_, opts)
|
|
local lspconfig = require("lspconfig")
|
|
for server, config in pairs(opts.servers) do
|
|
-- passing config.capabilities to blink.cmp merges with the capabilities in your
|
|
-- `opts[server].capabilities, if you've defined it
|
|
config.capabilities = require("blink.cmp").get_lsp_capabilities(config.capabilities)
|
|
lspconfig[server].setup(config)
|
|
end
|
|
end,
|
|
|