Save
This commit is contained in:
@@ -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,
|
||||
})
|
||||
|
Reference in New Issue
Block a user