diff options
| author | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2023-01-30 09:01:20 +0100 |
|---|---|---|
| committer | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2023-01-30 09:01:20 +0100 |
| commit | 75c20b732ab7a154841871c75f7fb54f016d82dc (patch) | |
| tree | d7f83e4a614b9f18ae87cfb64aacac0d0180dd07 /lua/alpha | |
| parent | 0f1176e2e4d780aa3ed4e8e4e424ffd7a3e168f6 (diff) | |
| download | nvim-conf-75c20b732ab7a154841871c75f7fb54f016d82dc.tar.gz nvim-conf-75c20b732ab7a154841871c75f7fb54f016d82dc.zip | |
feat: update cargo lsp, add todo, update laravel config
Diffstat (limited to 'lua/alpha')
| -rw-r--r-- | lua/alpha/lsp/setups.lua | 120 |
1 files changed, 64 insertions, 56 deletions
diff --git a/lua/alpha/lsp/setups.lua b/lua/alpha/lsp/setups.lua index 8744e67..15ef064 100644 --- a/lua/alpha/lsp/setups.lua +++ b/lua/alpha/lsp/setups.lua @@ -1,66 +1,74 @@ local lsp_attach = require("alpha.lsp.attach") local lsp_flags = { - debounce_text_changes = 150, + debounce_text_changes = 150, } return setmetatable({ - rust_analyzer = function() - return { - on_attach = lsp_attach, - flags = lsp_flags, - settings = { - ["rust-analyzer"] = {}, - }, - } - 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()) + 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, - sumneko_lua = 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), + return { + on_attach = lsp_attach, + flags = lsp_flags, + capabilities = capabilities, + filetypes = { "html", "typescriptreact", "javascriptreact", "css", "sass", "scss", "less", "blade", "vue" }, + } + end, + sumneko_lua = 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, + }, + telemetry = { + enable = false, + }, + }, + }, + } + end, }, { - __index = function() - return function () - return { - on_attach = lsp_attach, - flags = lsp_flags, - } - end - end, + __index = function() + return function() + return { + on_attach = lsp_attach, + flags = lsp_flags, + } + end + end, }) |