Improved Python handling

This commit is contained in:
Leonora Tindall 2025-11-25 15:46:50 -06:00
parent c3f4bc16de
commit b7f8f3c424
3 changed files with 10 additions and 9 deletions

View File

@ -5,13 +5,9 @@
(python3.withPackages (ps: with ps; [
python-lsp-server
python-lsp-jsonrpc
python-lsp-black
python-lsp-ruff
pyls-isort
pyls-flake8
flake8
isort
black
jedi-language-server
ruff
]))
];
}

View File

@ -37,7 +37,6 @@ vim.keymap.set('n', '<leader>fh', tbuiltin.help_tags, {})
vim.keymap.set('n', '<leader>fs', tbuiltin.spell_suggest, {})
-- General LSP settings
vim.lsp.enable('pylsp')
-- LSP diagnostic signs
vim.diagnostic.config({
@ -62,13 +61,20 @@ vim.diagnostic.config({
}
})
vim.keymap.set('n', '<leader><leader>d', '<cmd>lua vim.diagnostic.open_float()<CR>', { noremap = true, silent = true })
vim.keymap.set('n', '<leader><leader>d', '<cmd>lua vim.diagnostic.open_float()<CR>',
{ noremap = true, silent = true })
vim.keymap.set('n', '<leader><leader>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>',
{ noremap = true, silent = true })
vim.cmd([[
set signcolumn=yes
autocmd CursorHold * lua vim.diagnostic.open_float(nil, { focusable = false })
]])
-- Python-specific lspconfig
vim.lsp.enable('pylsp')
vim.lsp.enable('jedi_language_server')
-- Rust tools for Rust-specific LSP
local rt = require("rust-tools")
rt.setup({

View File

@ -16,7 +16,6 @@
nvim-treesitter-parsers.lua
nvim-treesitter-parsers.toml
nvim-treesitter-parsers.python
jedi-vim
nvim-lspconfig
nvim-lsputils
fzf-vim