From 8a6c60c3916e6543e25289910ac3ca27e7238601 Mon Sep 17 00:00:00 2001 From: Soispha Date: Fri, 25 Aug 2023 23:07:01 +0200 Subject: Feat(hm/conf/neovim/plugins/telescope/extensions/symbols): Init --- .../telescope/extensions/symbols/default.nix | 63 ++++++++++++++++------ 1 file changed, 47 insertions(+), 16 deletions(-) (limited to 'home-manager') diff --git a/home-manager/soispha/config/neovim/nixvim/plugins/telescope/extensions/symbols/default.nix b/home-manager/soispha/config/neovim/nixvim/plugins/telescope/extensions/symbols/default.nix index bbe19fb6..1a679776 100644 --- a/home-manager/soispha/config/neovim/nixvim/plugins/telescope/extensions/symbols/default.nix +++ b/home-manager/soispha/config/neovim/nixvim/plugins/telescope/extensions/symbols/default.nix @@ -1,20 +1,51 @@ -{...}: { - programs.nixvim.maps = { - normal = { - "gff" = { - action = "function() require('telescope').extensions.frecency.frecency() end"; - lua = true; - desc = "activate the frecency file selection"; +{pkgs, ...}: { + programs.nixvim = { + extraPlugins = [ + # Source of symbols for telescope symbols + pkgs.vimExtraPlugins.telescope-symbols-nvim + ]; + maps = { + normal = { + "il" = { + action = '' + function() + require('telescope.builtin').symbols{ sources = { + 'latex' + }} + end + ''; + lua = true; + desc = "[i]nsert a [l]atex symbol"; + }; + "ie" = { + action = '' + function() + require('telescope.builtin').symbols{ sources = { + 'emoji', + }} + end + ''; + lua = true; + desc = "[i]nsert a [e]moji"; + }; + "is" = { + action = '' + function() + require('telescope.builtin').symbols{ sources = { + 'emoji', + 'gitmoji', + 'julia', + 'kaomoji', + 'latex', + 'math', + 'nerd', + }} + end + ''; + lua = true; + desc = "[i]nsert a [s]ymbol (like emojis)"; + }; }; }; }; - programs.nixvim.plugins.telescope = { - extensions.frecency = { - enable = true; - showUnindexed = true; - showScores = true; - # TODO add this: - #db_safe_mode = true; - }; - }; } -- cgit 1.4.1