mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 08:41:43 +05:30
neovim(python): Use basedpyright for LSP & ruff for linting &
formatting
This commit is contained in:
@@ -1,7 +0,0 @@
|
|||||||
return {
|
|
||||||
cmd = { "pylsp" },
|
|
||||||
filetypes = { "python" },
|
|
||||||
settings = {
|
|
||||||
pylsp = {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -6,6 +6,7 @@
|
|||||||
-- Step 4: Return a lua table containing required lsp config in it
|
-- Step 4: Return a lua table containing required lsp config in it
|
||||||
-- NOTE: Only LSPs here, NOT linters or formatter
|
-- NOTE: Only LSPs here, NOT linters or formatter
|
||||||
vim.lsp.enable({
|
vim.lsp.enable({
|
||||||
|
"basedpyright",
|
||||||
"bashls",
|
"bashls",
|
||||||
"cssls",
|
"cssls",
|
||||||
"docker_compose_language_service",
|
"docker_compose_language_service",
|
||||||
@@ -14,7 +15,6 @@ vim.lsp.enable({
|
|||||||
"jsonls",
|
"jsonls",
|
||||||
"lua_ls",
|
"lua_ls",
|
||||||
"marksman",
|
"marksman",
|
||||||
"pylsp",
|
|
||||||
"taplo",
|
"taplo",
|
||||||
"trivy",
|
"trivy",
|
||||||
"ts_ls",
|
"ts_ls",
|
||||||
|
|||||||
@@ -21,11 +21,12 @@ return {
|
|||||||
|
|
||||||
lua = { "stylua" },
|
lua = { "stylua" },
|
||||||
markdown = { "markdownlint" },
|
markdown = { "markdownlint" },
|
||||||
python = { "black" },
|
python = { "ruff_fix", "ruff_format", "ruff_organize_imports" },
|
||||||
rust = { "rustfmt" },
|
|
||||||
xml = { "xmllint" },
|
xml = { "xmllint" },
|
||||||
yaml = { "yamlfmt" },
|
yaml = { "yamlfmt" },
|
||||||
|
|
||||||
|
rust = { "rustfmt" },
|
||||||
|
|
||||||
["_"] = { "trim_whitespace" },
|
["_"] = { "trim_whitespace" },
|
||||||
},
|
},
|
||||||
format_on_save = {
|
format_on_save = {
|
||||||
|
|||||||
@@ -8,11 +8,11 @@ return {
|
|||||||
|
|
||||||
-- Linters are only required for dynamically typed languages
|
-- Linters are only required for dynamically typed languages
|
||||||
lint.linters_by_ft = {
|
lint.linters_by_ft = {
|
||||||
python = { "pylint" },
|
|
||||||
markdown = { "markdownlint" },
|
|
||||||
yaml = { "yamllint", "trivy" },
|
|
||||||
dockerfile = { "hadolint", "trivy" },
|
dockerfile = { "hadolint", "trivy" },
|
||||||
|
markdown = { "markdownlint" },
|
||||||
|
python = { "ruff" },
|
||||||
terraform = { "trivy" },
|
terraform = { "trivy" },
|
||||||
|
yaml = { "yamllint", "trivy" },
|
||||||
|
|
||||||
["*"] = { "codespell" },
|
["*"] = { "codespell" },
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ neovim
|
|||||||
prettierd
|
prettierd
|
||||||
python-lsp-server
|
python-lsp-server
|
||||||
python@3.12
|
python@3.12
|
||||||
|
basedpyright
|
||||||
rclone
|
rclone
|
||||||
sccache
|
sccache
|
||||||
shodan
|
shodan
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ node
|
|||||||
nodejs-bash-language-server
|
nodejs-bash-language-server
|
||||||
npm
|
npm
|
||||||
podman
|
podman
|
||||||
pylint
|
|
||||||
python3
|
python3
|
||||||
python3-pip
|
python3-pip
|
||||||
ripgrep
|
ripgrep
|
||||||
|
ruff
|
||||||
sccache
|
sccache
|
||||||
shellcheck
|
shellcheck
|
||||||
shfmt
|
shfmt
|
||||||
|
|||||||
Reference in New Issue
Block a user