This commit is contained in:
2025-08-31 17:59:46 +02:00
parent 6d16c65e7b
commit 8b330e7f4a
8 changed files with 76 additions and 45 deletions

View File

@@ -18,8 +18,8 @@ return {
"shfmt", -- Shell formatter
"checkmake", -- linter for Makefiles
"ruff", -- Python linter and formatter
"clangd",
"ocamlformat",
"clangd", -- c/cpp formatter and linter
"ocamlformat", -- ocaml formatter
},
automatic_installation = true,
})
@@ -35,6 +35,25 @@ return {
}),
require("none-ls.formatting.ruff_format"),
formatting.clang_format,
formatting.ocamlformat,
-- require("none-ls.formatting.ocamlformat").with({
-- extra_args = {
-- "--if-then-else",
-- "vertical",
-- "--break-cases",
-- "fit-or-vertical",
-- "--type-decl",
-- "sparse",
-- "--type-decl-indent",
-- "4",
-- "--function-indent",
-- "4",
-- "--match-indent",
-- "4",
-- "--let-binding-indent",
-- "4",
-- },
-- }),
}
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
@@ -49,6 +68,7 @@ return {
group = augroup,
buffer = bufnr,
callback = function()
print("test")
vim.lsp.buf.format({ async = false })
end,
})