feat(neovim): simplify formatting, add clang lsp and fmt, remove qml lsp

This commit is contained in:
2026-09-21 10:25:26 +02:00
parent c30060c08c
commit f5b6d10721
2 changed files with 11 additions and 22 deletions
+10 -15
View File
@@ -21,27 +21,22 @@
};
settings = {
default_format_opts.lsp_format = "fallback";
format_on_save = ''
function(bufnr)
local disable_filetypes = { c = true, cpp = true }
local lsp_format_opt
if disable_filetypes[vim.bo[bufnr].filetype] then
lsp_format_opt = 'never'
else
lsp_format_opt = 'fallback'
end
return {
timeout_ms = 500,
lsp_format = lsp_format_opt,
}
end
'';
format_on_save = {
lsp_format = "fallback";
timeout_ms = 500;
};
formatters_by_ft = {
c = [ "clang-format" ];
lua = [ "stylua" ];
nix = [ "nixfmt" ];
python = [ "ruff" ];
};
formatters.clang-format.prepend_args = [
"--style=file"
"--fallback-style=LLVM"
];
};
};