Skip to content

Commit

Permalink
Add python specific lsp settings
Browse files Browse the repository at this point in the history
  • Loading branch information
erichlf committed Jun 19, 2024
1 parent 6fabe49 commit daa7440
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions config/lvim/lua/user/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,31 @@ table.insert(lvim.builtin.alpha.dashboard.section.buttons.entries,

-- LSP
require("lvim.lsp.null-ls.formatters").setup {
{ name = "black" },
{ name = "black",
args = {"-l", "99"}
},
{ name = "clang-format",
filetype = { "c", "cpp", "cs", "java" },
extra_args = { "--style", "file" }
},
{ name = "isort" },
{ name = "isort",
args = {
"-l", "99",
"--profile", "black"
}
},
{ name = "yamlfmt" },
}

require("lvim.lsp.null-ls.linters").setup {
{ name = "cmakelint" },
{ name = "cpptools" },
{ name = "flake8" },
{ name = "flake8"
args = {
"--max-line-length", "99",
"--extend-ignore", "B902,C816,D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404,I202"
}
},
{ name = "markdownlint" },
{ name = "pylint" },
{ name = "yamllint" },
Expand All @@ -100,3 +112,5 @@ require("lvim.lsp.null-ls.linters").setup {
lvim.lsp.null_ls.setup.on_init = function(new_client, _)
new_client.offset_encoding = "utf-8"
end

lvim.format_on_save.enabled = true

0 comments on commit daa7440

Please sign in to comment.