Add keymaps and settings for nixvim plugins

- Add Conform auto-format document keymap in conform.nix
- Enable and configure Oil plugin settings in oil.nix
- Update Telescope keymaps definition in telescope.nix
This commit is contained in:
Sam 2024-11-12 18:21:15 +00:00
parent 2d78446105
commit cdc75090ff
3 changed files with 17 additions and 1 deletions

View File

@ -38,4 +38,16 @@
} }
''; '';
programs.nixvim.keymaps = [
# format document with Conform
{
mode = ["n"];
key = "<leader>cf";
action = "<CMD>Format<CR>";
options = {
silent = true;
desc = "Conform auto-format document";
};
}
];
} }

View File

@ -1,5 +1,9 @@
{ {
programs.nixvim.plugins.oil = { programs.nixvim.plugins.oil = {
enable = true; enable = true;
settings = {
columns = ["icon"];
view_options.show_hidden = true;
};
}; };
} }

View File

@ -3,7 +3,7 @@
enable = true; enable = true;
extensions.fzy-native.enable = true; extensions.fzy-native.enable = true;
}; };
keymaps = [ programs.nixvim.keymaps = [
{ {
# find files # find files
mode = ["n"]; mode = ["n"];