refactor(homeModules/cli): idomaticity
This commit is contained in:
parent
feff604e8f
commit
84bacb23f0
7 changed files with 22 additions and 25 deletions
20
modules/home/cli/editor/nvf/default.nix
Normal file
20
modules/home/cli/editor/nvf/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config = lib.mkIf (config.cli.editor == "nvf") {
|
||||
home.sessionVariables.EDITOR = "nvim";
|
||||
programs.nvf = {
|
||||
enable = true;
|
||||
settings.vim = {
|
||||
keymaps = import ./keymaps.nix;
|
||||
utility.yazi-nvim = {
|
||||
enable = true;
|
||||
mappings = {
|
||||
openYazi = "t";
|
||||
openYaziDir = "T";
|
||||
};
|
||||
setupOpts.open_for_directories = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
9
modules/home/cli/editor/nvf/keymaps.nix
Normal file
9
modules/home/cli/editor/nvf/keymaps.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
[
|
||||
{
|
||||
desc = "Open the file path under the cursor, making the file if it doesn't exist.";
|
||||
key = "gf";
|
||||
mode = "n";
|
||||
action = ":cd %:p:h<CR>:e <cfile><CR>";
|
||||
silent = true;
|
||||
}
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue