Compare commits

...
3 Commits
3 changed files with 15 additions and 28 deletions
+3 -5
View File
@@ -7,13 +7,11 @@
]; ];
plugins = { plugins = {
lspkind = { lspkind.enable = true;
enable = true;
settings.mode = "symbol";
};
cmp = { cmp = {
enable = true; enable = true;
autoEnableSources = true; autoEnableSources = true;
settings = { settings = {
@@ -21,7 +19,7 @@
formatting.fields = [ formatting.fields = [
"abbr" "abbr"
"kind" "icon"
"menu" "menu"
]; ];
+11 -16
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_format" ];
}; };
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"
];
};
}; };
}; };
}; };