Compare commits
3
Commits
c7f94ebbd6
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
24584e6c9a | ||
|
|
f5b6d10721 | ||
|
|
c30060c08c |
@@ -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"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -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"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -51,13 +51,7 @@
|
|||||||
installCargo = false;
|
installCargo = false;
|
||||||
installRustc = false;
|
installRustc = false;
|
||||||
};
|
};
|
||||||
qmlls = {
|
clangd.enable = true;
|
||||||
enable = true;
|
|
||||||
cmd = [
|
|
||||||
"qmlls"
|
|
||||||
"-E"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user