refactor(nvim): update for new lspconfig
This commit is contained in:
parent
bfca019cbb
commit
74c5ae1ba9
1 changed files with 22 additions and 23 deletions
|
@ -1,24 +1,6 @@
|
|||
-- This will need some refactoring as it is mostly a
|
||||
-- copy and paste from the previous single-file .vim config
|
||||
|
||||
require'lspconfig'.pylsp.setup{
|
||||
settings = {
|
||||
formatCommand = {"black"},
|
||||
pylsp = {
|
||||
plugins = {
|
||||
jedai_completion = {
|
||||
fuzzy = true
|
||||
},
|
||||
pyflakes = {
|
||||
enabled = true
|
||||
},
|
||||
pylsp_mypy = {
|
||||
enabled = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
ensure_installed = { },
|
||||
auto_install = false,
|
||||
|
@ -31,12 +13,11 @@ require'nvim-treesitter.configs'.setup {
|
|||
-- Add additional capabilities supported by nvim-cmp
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
local lspconfig = require('lspconfig')
|
||||
|
||||
-- Enable some language servers with the additional completion capabilities offered by nvim-cmp
|
||||
local servers = { 'clangd', 'glsl_analyzer', 'nixd', 'rust_analyzer', 'texlab', 'tinymist', 'verible', 'vhdl_ls', 'vtsls' }
|
||||
local servers = { 'clangd', 'glsl_analyzer', 'nixd', 'pylsp', 'rust_analyzer', 'texlab', 'tinymist', 'verible', 'vhdl_ls', 'vtsls' }
|
||||
for _, lsp in ipairs(servers) do
|
||||
lspconfig[lsp].setup {
|
||||
vim.lsp.enable(lsp)
|
||||
vim.lsp.config(lsp, {
|
||||
-- on_attach = my_custom_on_attach,
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
|
@ -44,9 +25,26 @@ for _, lsp in ipairs(servers) do
|
|||
cargo = {
|
||||
allFeatures = true;
|
||||
}
|
||||
},
|
||||
['pylsp'] = {
|
||||
formatCommand = {"black"},
|
||||
pylsp = {
|
||||
plugins = {
|
||||
jedai_completion = {
|
||||
fuzzy = true
|
||||
},
|
||||
pyflakes = {
|
||||
enabled = true
|
||||
},
|
||||
pylsp_mypy = {
|
||||
enabled = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
-- luasnip setup
|
||||
|
@ -172,6 +170,7 @@ require("spaceman").setup({
|
|||
"~/Documents/Classes",
|
||||
"~/Documents/Repos",
|
||||
"~/Documents/Repos/ExtremeHeatTransfer",
|
||||
"~/Documents/Repos/SemiconductorLab",
|
||||
"/opt/docker-containers/",
|
||||
},
|
||||
use_default_keymaps = true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue