mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 00:29:43 -04:00
LSP Config
This commit is contained in:
parent
86f2c8f9b5
commit
c2c25e636f
1 changed files with 20 additions and 0 deletions
|
|
@ -33,3 +33,23 @@
|
|||
enable = true,
|
||||
},
|
||||
}
|
||||
|
||||
-- Load LSP's
|
||||
local nvim_lsp = require('lspconfig')
|
||||
|
||||
local function on_attach(client, bufnr)
|
||||
client.resolved_capabilities.document_formatting = false
|
||||
require('lsp_signature').on_attach()
|
||||
end
|
||||
|
||||
local servers = {
|
||||
tsserver = { cmd = { "tsserver", "--stdio" } },
|
||||
pyright = { cmd = { "pyright-langserver", "--stdio" } },
|
||||
}
|
||||
|
||||
for lsp, config in pairs(servers) do
|
||||
nvim_lsp[lsp].setup {
|
||||
cmd = config.cmd,
|
||||
on_attach = on_attach,
|
||||
}
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue