feat(neovim): replace vim-kitty-navigator with nvim-kitty-navigator
This commit is contained in:
parent
f11982427b
commit
9d12f12a98
17
flake.lock
17
flake.lock
|
@ -84,6 +84,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nvim-kitty-navigator": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1648739869,
|
||||||
|
"narHash": "sha256-dgu9ug0R9dbu5QyuNXJ6E/Gv2ruoYsefPc23iWI6eVc=",
|
||||||
|
"owner": "hermitmaster",
|
||||||
|
"repo": "nvim-kitty-navigator",
|
||||||
|
"rev": "16574acb6e5d8b47f0da535dc391cac541163e87",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hermitmaster",
|
||||||
|
"repo": "nvim-kitty-navigator",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nvim-lspfuzzy": {
|
"nvim-lspfuzzy": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -130,6 +146,7 @@
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
|
"nvim-kitty-navigator": "nvim-kitty-navigator",
|
||||||
"nvim-lspfuzzy": "nvim-lspfuzzy",
|
"nvim-lspfuzzy": "nvim-lspfuzzy",
|
||||||
"pre-commit-hooks": "pre-commit-hooks"
|
"pre-commit-hooks": "pre-commit-hooks"
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,8 +30,13 @@
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
inputs.nvim-kitty-navigator = {
|
||||||
|
url = "github:hermitmaster/nvim-kitty-navigator";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, nixos-hardware, flake-utils, home-manager, nur
|
outputs = { self, nixpkgs, nixos-hardware, flake-utils, home-manager, nur
|
||||||
, pre-commit-hooks, nvim-lspfuzzy }@inputs:
|
, pre-commit-hooks, nvim-lspfuzzy, nvim-kitty-navigator }@inputs:
|
||||||
let
|
let
|
||||||
overlays = {
|
overlays = {
|
||||||
neovim = self: super:
|
neovim = self: super:
|
||||||
|
@ -46,6 +51,8 @@
|
||||||
in {
|
in {
|
||||||
vimPlugins = super.vimPlugins // {
|
vimPlugins = super.vimPlugins // {
|
||||||
nvim-lspfuzzy = buildVimPlugin "nvim-lspfuzzy" nvim-lspfuzzy;
|
nvim-lspfuzzy = buildVimPlugin "nvim-lspfuzzy" nvim-lspfuzzy;
|
||||||
|
nvim-kitty-navigator =
|
||||||
|
buildVimPlugin "nvim-kitty-navigator" nvim-kitty-navigator;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
deconz = self: super: {
|
deconz = self: super: {
|
||||||
|
|
|
@ -34,6 +34,7 @@ in {
|
||||||
nvim-autopairs
|
nvim-autopairs
|
||||||
camelcasemotion
|
camelcasemotion
|
||||||
luasnip
|
luasnip
|
||||||
|
nvim-kitty-navigator
|
||||||
|
|
||||||
nvim-cmp
|
nvim-cmp
|
||||||
cmp-path
|
cmp-path
|
||||||
|
|
|
@ -1,29 +1,30 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
with pkgs;
|
with pkgs;
|
||||||
with lib;
|
with lib; {
|
||||||
let
|
# kitty
|
||||||
yamlToJSON = path:
|
|
||||||
runCommand "yaml.json" { nativeBuildInputs = [ pkgs.ruby ]; } ''
|
|
||||||
ruby -rjson -ryaml -e "puts YAML.load(ARGF).to_json" < ${path} > $out
|
|
||||||
'';
|
|
||||||
in {
|
|
||||||
programs.kitty = {
|
programs.kitty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
keybindings = {
|
keybindings = let
|
||||||
"ctrl+j" = "kitten pass_keys.py neighboring_window bottom ctrl+j";
|
vimKittyBinding = bind:
|
||||||
"ctrl+k" = "kitten pass_keys.py neighboring_window top ctrl+k";
|
''kitten pass_keys.py neighboring_window ${bind} "^.* - nvim$"'';
|
||||||
"ctrl+h" = "kitten pass_keys.py neighboring_window left ctrl+h";
|
in {
|
||||||
"ctrl+l" = "kitten pass_keys.py neighboring_window right ctrl+l";
|
"ctrl+h" = vimKittyBinding "left ctrl+h";
|
||||||
|
"ctrl+j" = vimKittyBinding "bottom ctrl+j";
|
||||||
|
"ctrl+k" = vimKittyBinding "top ctrl+k";
|
||||||
|
"ctrl+l" = vimKittyBinding "right ctrl+l";
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
|
allow_remote_control = "yes";
|
||||||
|
# single_instance = "yes";
|
||||||
|
listen_on = "unix:@mykitty";
|
||||||
scrollback_pager = ''
|
scrollback_pager = ''
|
||||||
nvim -u NONE -c "syntax on" -c 'set ft=man nonumber nolist showtabline=0 foldcolumn=0 laststatus=0' -c "autocmd VimEnter * normal G" -c "map q :qa!<CR>" -c "set clipboard+=unnamedplus" -'';
|
nvim -u NONE -c "syntax on" -c 'set ft=man nonumber nolist showtabline=0 foldcolumn=0 laststatus=0' -c "autocmd VimEnter * normal G" -c "map q :qa!<CR>" -c "set clipboard+=unnamedplus" -'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.configFile."kitty/pass_keys.py".source =
|
xdg.configFile."kitty/pass_keys.py".source =
|
||||||
"${vimPlugins.vim-kitty-navigator}/pass_keys.py";
|
"${vimPlugins.nvim-kitty-navigator}/kitty/pass_keys.py";
|
||||||
xdg.configFile."kitty/neighboring_window.py".source =
|
xdg.configFile."kitty/neighboring_window.py".source =
|
||||||
"${vimPlugins.vim-kitty-navigator}/neighboring_window.py";
|
"${vimPlugins.nvim-kitty-navigator}/kitty/neighboring_window.py";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue