From b7f8f3c4242bbdcc8b52ed59e0d70b917f1eed91 Mon Sep 17 00:00:00 2001 From: Leonora Tindall Date: Tue, 25 Nov 2025 15:46:50 -0600 Subject: [PATCH] Improved Python handling --- python.nix | 8 ++------ rcfiles/neovim.lua | 10 ++++++++-- vim.nix | 1 - 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/python.nix b/python.nix index 1f3ba5b..d0d36fc 100644 --- a/python.nix +++ b/python.nix @@ -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 ])) ]; } diff --git a/rcfiles/neovim.lua b/rcfiles/neovim.lua index b5f5b8f..b7e1d51 100644 --- a/rcfiles/neovim.lua +++ b/rcfiles/neovim.lua @@ -37,7 +37,6 @@ vim.keymap.set('n', 'fh', tbuiltin.help_tags, {}) vim.keymap.set('n', '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', 'd', 'lua vim.diagnostic.open_float()', { noremap = true, silent = true }) +vim.keymap.set('n', 'd', 'lua vim.diagnostic.open_float()', + { noremap = true, silent = true }) +vim.keymap.set('n', 'ca', 'lua vim.lsp.buf.code_action()', + { 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({ diff --git a/vim.nix b/vim.nix index 30a7440..315716a 100644 --- a/vim.nix +++ b/vim.nix @@ -16,7 +16,6 @@ nvim-treesitter-parsers.lua nvim-treesitter-parsers.toml nvim-treesitter-parsers.python - jedi-vim nvim-lspconfig nvim-lsputils fzf-vim