refactor(nvim): update for new lspconfig

This commit is contained in:
stitchy 2025-10-11 01:42:21 -07:00
parent bfca019cbb
commit 74c5ae1ba9
Signed by: stitchy
SSH key fingerprint: SHA256:yz2SoxdnY67tfY5Jzb0f2v8f5W3o/IF359kbcquWip8

View file

@ -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,