neovim(python): Use basedpyright for LSP & ruff for linting &

formatting
This commit is contained in:
Pratik Tripathy
2025-10-20 16:56:12 +05:30
parent b92617e518
commit 8bcea5312e
6 changed files with 9 additions and 14 deletions

View File

@@ -1,7 +0,0 @@
return {
cmd = { "pylsp" },
filetypes = { "python" },
settings = {
pylsp = {},
},
}

View File

@@ -6,6 +6,7 @@
-- Step 4: Return a lua table containing required lsp config in it
-- NOTE: Only LSPs here, NOT linters or formatter
vim.lsp.enable({
"basedpyright",
"bashls",
"cssls",
"docker_compose_language_service",
@@ -14,7 +15,6 @@ vim.lsp.enable({
"jsonls",
"lua_ls",
"marksman",
"pylsp",
"taplo",
"trivy",
"ts_ls",

View File

@@ -21,11 +21,12 @@ return {
lua = { "stylua" },
markdown = { "markdownlint" },
python = { "black" },
rust = { "rustfmt" },
python = { "ruff_fix", "ruff_format", "ruff_organize_imports" },
xml = { "xmllint" },
yaml = { "yamlfmt" },
rust = { "rustfmt" },
["_"] = { "trim_whitespace" },
},
format_on_save = {

View File

@@ -8,11 +8,11 @@ return {
-- Linters are only required for dynamically typed languages
lint.linters_by_ft = {
python = { "pylint" },
markdown = { "markdownlint" },
yaml = { "yamllint", "trivy" },
dockerfile = { "hadolint", "trivy" },
markdown = { "markdownlint" },
python = { "ruff" },
terraform = { "trivy" },
yaml = { "yamllint", "trivy" },
["*"] = { "codespell" },
}

View File

@@ -20,6 +20,7 @@ neovim
prettierd
python-lsp-server
python@3.12
basedpyright
rclone
sccache
shodan

View File

@@ -21,10 +21,10 @@ node
nodejs-bash-language-server
npm
podman
pylint
python3
python3-pip
ripgrep
ruff
sccache
shellcheck
shfmt