diff options
Diffstat (limited to '.config/nvim/lua/getchoo/lsp/config/lsp_config.lua')
| -rw-r--r-- | .config/nvim/lua/getchoo/lsp/config/lsp_config.lua | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/.config/nvim/lua/getchoo/lsp/config/lsp_config.lua b/.config/nvim/lua/getchoo/lsp/config/lsp_config.lua new file mode 100644 index 0000000..4bf69e4 --- /dev/null +++ b/.config/nvim/lua/getchoo/lsp/config/lsp_config.lua @@ -0,0 +1,42 @@ +local cmp = require("getchoo.lsp.config.cmp") +local sources = require("getchoo.lsp.config.sources") + +local M = {} + +local on_attach = function(client, bufnr) + cmp.on_attach(client, bufnr) +end + +local all_config = { + on_attach = on_attach, + capabilities = cmp.capabilities, +} + +local servers = {} +for _, server in ipairs(sources.lsp_servers) do + servers[server] = all_config +end + +servers["sumneko_lua"] = { + on_attach = on_attach, + settings = { + Lua = { + runtime = { + version = "LuaJIT", + }, + diagnostics = { + globals = { "vim" }, + }, + workspace = { + library = vim.api.nvim_get_runtime_file("", true), + }, + telemetry = { + enable = false, + }, + }, + }, +} + +M.servers = servers + +return M |
