dotfiles/home/common/nvim/lsp.lua

44 lines
937 B
Lua
Raw Normal View History

2024-10-06 23:00:01 +02:00
local lspconfig = require("lspconfig")
local servers = {
cssls = {},
gopls = {},
html = {},
jsonls = {},
superhtml = {},
ts_ls = {},
2024-10-06 23:00:01 +02:00
lua_ls = {
settings = {
Lua = {
runtime = {
version = "LuaJIT",
path = vim.split(package.path, ";"),
},
diagnostics = { globals = { "vim", "hs" } },
workspace = {
library = {
[vim.fn.expand("$VIMRUNTIME/lua")] = true,
[vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true,
},
},
},
2024-11-09 10:09:10 +01:00
},
},
2024-10-06 23:00:01 +02:00
nixd = {
cmd = { "nixd" },
settings = {
nixd = {
nixpkgs = { expr = "import <nixpkgs> { }" },
formatting = { command = { "nixfmt" } },
options = {},
2024-11-09 10:09:10 +01:00
},
},
},
}
for server, config in pairs(servers) do
config.capabilities = require('blink.cmp').get_lsp_capabilities(config.capabilities)
lspconfig[server].setup(config)
end