mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 16:41:43 +05:30
neovim(python): Use basedpyright for LSP & ruff for linting &
formatting
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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" },
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user