refactor: gigantic refactor
This commit is contained in:
1 parent
d1e2bde503
commit
0474f7bbb4
50 files changed
+232
-207
No files matched your search
@@ -0,0 +1,45 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
opts.formatexpr = "v:lua.require'conform'.formatexpr()";
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
key = "<leader>f";
|
||||
action.__raw = ''
|
||||
function() require 'conform'.format { async = true } end
|
||||
'';
|
||||
options.desc = "Format Buffer";
|
||||
}
|
||||
];
|
||||
|
||||
plugins.conform-nvim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_format_opts.lsp_format = "fallback";
|
||||
format_on_save = {
|
||||
lsp_format = "fallback";
|
||||
timeout_ms = 500;
|
||||
};
|
||||
|
||||
formatters_by_ft = {
|
||||
c = [ "clang-format" ];
|
||||
lua = [ "stylua" ];
|
||||
nix = [ "nixfmt" ];
|
||||
python = [ "ruff_format" ];
|
||||
};
|
||||
|
||||
formatters.clang-format.prepend_args = [
|
||||
"--style=file"
|
||||
"--fallback-style=LLVM"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
stylua
|
||||
nixfmt
|
||||
ruff
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user