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 = { settings = {
default_format_opts.lsp_format = "fallback"; default_format_opts.lsp_format = "fallback";
format_on_save = '' format_on_save = {
function(bufnr) lsp_format = "fallback";
local disable_filetypes = { c = true, cpp = true } timeout_ms = 500;
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
'';
formatters_by_ft = { formatters_by_ft = {
c = [ "clang-format" ];
lua = [ "stylua" ]; lua = [ "stylua" ];
nix = [ "nixfmt" ]; nix = [ "nixfmt" ];
python = [ "ruff" ]; python = [ "ruff" ];
}; };
formatters.clang-format.prepend_args = [
"--style=file"
"--fallback-style=LLVM"
];
}; };
}; };
+1 -7
View File
@@ -51,13 +51,7 @@
installCargo = false; installCargo = false;
installRustc = false; installRustc = false;
}; };
qmlls = { clangd.enable = true;
enable = true;
cmd = [
"qmlls"
"-E"
];
};
}; };
}; };
}; };