Add Python LSP pylsp

This commit is contained in:
Leonora Tindall 2025-07-07 20:42:08 -05:00
parent 688ff9ed45
commit bd31c47355
2 changed files with 12 additions and 1 deletions

View File

@ -2,5 +2,16 @@
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
uv uv
(python3.withPackages (ps: with ps; [
python-lsp-server
python-lsp-jsonrpc
python-lsp-black
python-lsp-ruff
pyls-isort
pyls-flake8
flake8
isort
black
]))
]; ];
} }

View File

@ -50,7 +50,6 @@ require("mason").setup({
require("mason-lspconfig").setup() require("mason-lspconfig").setup()
-- General LSP settings -- General LSP settings
-- from https://rsdlt.github.io/posts/rust-nvim-ide-guide-walkthrough-development-debug/
local sign = function(opts) local sign = function(opts)
vim.fn.sign_define(opts.name, { vim.fn.sign_define(opts.name, {
texthl = opts.name, texthl = opts.name,
@ -63,6 +62,7 @@ sign({name = 'DiagnosticSignError', text = '🛑'})
sign({name = 'DiagnosticSignWarn', text = '⚠️'}) sign({name = 'DiagnosticSignWarn', text = '⚠️'})
sign({name = 'DiagnosticSignHint', text = '💭'}) sign({name = 'DiagnosticSignHint', text = '💭'})
sign({name = 'DiagnosticSignInfo', text = '🗒️'}) sign({name = 'DiagnosticSignInfo', text = '🗒️'})
vim.lsp.enable('pylsp')
vim.diagnostic.config({ vim.diagnostic.config({
virtual_text = false, virtual_text = false,