diff options
| author | adalessa <dalessandro.ariel@gmail.com> | 2023-02-23 09:04:41 +0100 |
|---|---|---|
| committer | adalessa <dalessandro.ariel@gmail.com> | 2023-02-23 09:04:41 +0100 |
| commit | 914ba277c332532fac161f9f3e5a00bc250590e6 (patch) | |
| tree | 3942c55a131a7958db516094b2840bc569a04e4a /lua/alpha/lsp/setups.lua | |
| parent | e5f14dce3b58c374b5445252577c450afe61c759 (diff) | |
| download | nvim-conf-914ba277c332532fac161f9f3e5a00bc250590e6.tar.gz nvim-conf-914ba277c332532fac161f9f3e5a00bc250590e6.zip | |
feat: refactor lsp structure to support global install of servers
Diffstat (limited to 'lua/alpha/lsp/setups.lua')
| -rw-r--r-- | lua/alpha/lsp/setups.lua | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/lua/alpha/lsp/setups.lua b/lua/alpha/lsp/setups.lua deleted file mode 100644 index 34d3dd8..0000000 --- a/lua/alpha/lsp/setups.lua +++ /dev/null @@ -1,78 +0,0 @@ -local lsp_attach = require "alpha.lsp.attach" - -local lsp_flags = { - debounce_text_changes = 150, -} - -return setmetatable({ - rust_analyzer = function() - return { - on_attach = lsp_attach, - flags = lsp_flags, - settings = { - ["rust-analyzer"] = { - checkOnSave = { - allFeatures = true, - overrideCommand = { - "cargo", - "clippy", - "--workspace", - "--message-format=json", - "--all-targets", - "--all-features", - }, - }, - }, - }, - } - end, - phpactor = function() - return { - on_attach = lsp_attach, - flags = lsp_flags, - filetypes = { "php", "cucumber" }, - } - end, - emmet_ls = function() - local capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities()) - - return { - on_attach = lsp_attach, - flags = lsp_flags, - capabilities = capabilities, - filetypes = { "html", "typescriptreact", "javascriptreact", "css", "sass", "scss", "less", "blade", "vue" }, - } - end, - lua_ls = function() - return { - on_attach = lsp_attach, - flags = lsp_flags, - settings = { - Lua = { - runtime = { - version = "LuaJIT", - }, - diagnostics = { - globals = { "vim" }, - }, - workspace = { - library = vim.api.nvim_get_runtime_file("", true), - checkThirdParty = false, - }, - telemetry = { - enable = false, - }, - }, - }, - } - end, -}, { - __index = function() - return function() - return { - on_attach = lsp_attach, - flags = lsp_flags, - } - end - end, -}) |