diff options
author | Soispha <soispha@vhack.eu> | 2023-08-26 13:18:16 +0200 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2023-08-26 13:18:47 +0200 |
commit | fc10340dcb5e0e3ed77e0ca741df900fb5e9659b (patch) | |
tree | dbf6201ce49d6b08277014e104c3dc71b945b164 /home-manager/soispha/config/neovim/nixvim/plugins/goto-preview/default.nix | |
parent | Fix(hm/conf/neovim/plugins/lsp-progress): Disable as its quite distracting (diff) | |
download | nixos-config-fc10340dcb5e0e3ed77e0ca741df900fb5e9659b.zip |
Feat(hm/conf/neovim/plugins/goto-preview): Init
Diffstat (limited to 'home-manager/soispha/config/neovim/nixvim/plugins/goto-preview/default.nix')
-rw-r--r-- | home-manager/soispha/config/neovim/nixvim/plugins/goto-preview/default.nix | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/home-manager/soispha/config/neovim/nixvim/plugins/goto-preview/default.nix b/home-manager/soispha/config/neovim/nixvim/plugins/goto-preview/default.nix new file mode 100644 index 00000000..ea89b045 --- /dev/null +++ b/home-manager/soispha/config/neovim/nixvim/plugins/goto-preview/default.nix @@ -0,0 +1,42 @@ +{ + pkgs, + lib, + ... +}: { + programs.nixvim = { + # TODO package goto-preview though a module + extraConfigLuaPost = '' + ${lib.strings.fileContents ./lua/goto-preview.lua} + ''; + extraPlugins = [ + pkgs.vimExtraPlugins.goto-preview + ]; + maps.normal = { + "<space>gd" = { + action = "require('goto-preview').goto_preview_definition"; + lua = true; + desc = "[G]oto [D]efinition"; + }; + "<space>gtd" = { + action = "require('goto-preview').goto_preview_type_definition"; + lua = true; + desc = "[G]oto the [t]ype [D]efinition"; + }; + "<space>gi" = { + action = "require('goto-preview').goto_preview_implementation"; + lua = true; + desc = "[G]oto [I]mplementations"; + }; + "<space>gr" = { + action = "require('goto-preview').goto_preview_references"; + lua = true; + desc = "[G]o to all [R]eferences of the symbol"; + }; + "\\<space>" = { + action = "require('goto-preview').close_all_win"; + lua = true; + desc = "close all preview windows"; + }; + }; + }; +} |