diff --git a/config/plugins/utils/neoclip.nix b/config/plugins/utils/neoclip.nix new file mode 100644 index 0000000..ff81c2f --- /dev/null +++ b/config/plugins/utils/neoclip.nix @@ -0,0 +1,18 @@ +{ pkgs, ... }: + +{ + extraPlugins = [(pkgs.vimUtils.buildVimPlugin { + name = "neoclip"; + src = pkgs.fetchFromGitHub { + owner = "AckslD"; + repo = "nvim-neoclip.lua"; + rev = "709c97f"; + hash = "sha256-8ZPmxVM4dzjJxAYUHRMCiAQBxZEGHtsgSCNlCZBRBWo="; + }; + })]; + + extraConfigLua = "require('neoclip').setup({ + default_register = {'\"', '+'} + })"; +} + diff --git a/config/plugins/utils/software-licenses.nix b/config/plugins/utils/software-licenses.nix new file mode 100644 index 0000000..c3784ce --- /dev/null +++ b/config/plugins/utils/software-licenses.nix @@ -0,0 +1,14 @@ +{ pkgs, ... }: + +{ + extraPlugins = [(pkgs.vimUtils.buildVimPlugin { + name = "software-licenses"; + src = pkgs.fetchFromGitHub { + owner = "chip"; + repo = "telescope-software-licenses.nvim"; + rev = "fb5fc33"; + hash = "sha256-luyCjkZSm1F6qoRpP5hHRAx4632u6JFuX2s7m2s8y60="; + }; + })]; +} + diff --git a/config/plugins/utils/telescope.nix b/config/plugins/utils/telescope.nix index 745263b..f261d60 100644 --- a/config/plugins/utils/telescope.nix +++ b/config/plugins/utils/telescope.nix @@ -1,17 +1,63 @@ { ... }: { + imports = [ + ./neoclip.nix # Persistent clipboard. + ./software-licenses.nix # View common software licenses. + ]; + plugins.telescope = { enable = true; + # Install some telescope extensions. + extensions = { + # Enable native fuzzy finder. + fzf-native = { + enable = true; + }; + }; + + # Configure our telescope keymaps. keymaps = { "ff" = { action = "find_files"; - options.desc = "Find Files"; + options = { + desc = "Find project files"; + }; }; "fb" = { action = "buffers"; - options.desc = "Buffers"; + options = { + desc = "Find open buffers"; + }; + }; + "/" = { + action = "live_grep"; + options = { + desc = "Grep (root dir)"; + }; + }; + ":" = { + action = "command_history"; + options = { + desc = "Command History"; + }; + }; + "p" = { + action = "neoclip"; + options.desc = "Persistent Clipboard"; + }; + "sc" = { + action = "commands"; + options = { + desc = "Search Commands"; + }; + }; + "sl" = { + action = "software-licenses find"; + options = { + desc = "Search Software Licenses"; + }; }; }; };