aboutsummaryrefslogtreecommitdiff
path: root/lua/plugins/lsp.lua
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2022-10-14 23:43:14 +0200
committersrdusr <trevorgray@srdusr.com>2022-10-14 23:43:14 +0200
commit2d2c18e3b61a1883190fcd3c9dd9ab86002ddeab (patch)
tree614ed8e17635606d70f198c916591f5011d36155 /lua/plugins/lsp.lua
parent86628d459cabd0c29f0cdbb699e2e18807b958ed (diff)
downloaddotfiles-2d2c18e3b61a1883190fcd3c9dd9ab86002ddeab.tar.gz
dotfiles-2d2c18e3b61a1883190fcd3c9dd9ab86002ddeab.zip
Updated nvim-cmp & lsp: config/saga
Diffstat (limited to 'lua/plugins/lsp.lua')
-rw-r--r--lua/plugins/lsp.lua31
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,