diff options
Diffstat (limited to 'lua/plugins/lsp.lua')
| -rw-r--r-- | lua/plugins/lsp.lua | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 3570a98..bf9f771 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -8,11 +8,6 @@ local custom_attach = function(client, bufnr) -- Enable completion triggered by <c-x><c-o> vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') -local status, saga = pcall(require, "lspsaga") -if not status then - return -end - -- Mappings. local map = function(mode, l, r, opts) opts = opts or {} @@ -211,24 +206,28 @@ if utils.executable("lua-language-server") then }) end ---lspconfig.sumneko_lua.setup({ --- single_file_support = true, --- on_attach = function(client, bufnr) --- print('hello') --- lspconfig.util.default_config.on_attach(client, bufnr) --- end ---}) -require('lspconfig')['rust_analyzer'].setup{ + +if utils.executable("rust-language-server") then +require("lspconfig").rust_analyzer.setup{ + cmd = { "rustup", "run", "nightly", "rust-analyzer" }, on_attach = custom_attach, flags = { debounce_text_changes = 500, }, - - -- Server-specific settings... + --[[ settings = { - ["rust-analyzer"] = {} + rust = { + unstable_features = true, + build_on_save = false, + all_features = true, + }, } + --]] } +end + + + -- Global config for diagnostic vim.diagnostic.config({ underline = false, |
