rust-analyzer
This commit is contained in:
parent
02fd943224
commit
6198f8c63a
2 changed files with 13 additions and 6 deletions
|
|
@ -10,6 +10,7 @@
|
|||
vscode-langservers-extracted
|
||||
gopls
|
||||
nil
|
||||
rust-analyzer
|
||||
];
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
vim-surround
|
||||
|
|
|
|||
|
|
@ -1,20 +1,26 @@
|
|||
-- Setup language servers.
|
||||
local lspconfig = require('lspconfig')
|
||||
|
||||
lspconfig.tsserver.setup {
|
||||
on_attach = function(client)
|
||||
local on_attach = function(client)
|
||||
require'completion'.on_attach(client)
|
||||
client.server_capabilities.documentFormattingProvider = false
|
||||
end
|
||||
end
|
||||
|
||||
lspconfig.tsserver.setup {
|
||||
on_attach = on_attach
|
||||
}
|
||||
|
||||
lspconfig.eslint.setup {
|
||||
on_attach = function(client)
|
||||
client.server_capabilities.documentFormattingProvider = true
|
||||
end
|
||||
on_attach = on_attach
|
||||
}
|
||||
|
||||
lspconfig.rust_analyzer.setup {
|
||||
on_attach = on_attach
|
||||
}
|
||||
|
||||
lspconfig.gopls.setup {}
|
||||
lspconfig.nil_ls.setup {}
|
||||
lspconfig.rust_analyzer.setup {}
|
||||
|
||||
-- Use LspAttach autocommand to only map the following keys
|
||||
-- after the language server attaches to the current buffer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue