about summary refs log tree commit diff stats
path: root/modules/by-name/nv/nvim/plgs/telescope/extensions/symbols/default.nix
blob: adbb466a89d9e92458dd69ec9faad42156237784 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{
  pkgs,
  config,
  lib,
  ...
}: let
  cfg = config.soispha.programs.nvim;
in {
  home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable {
    extraPlugins = [
      # Source of symbols for telescope symbols
      pkgs.vimPlugins.telescope-symbols-nvim
    ];
    keymaps = [
      {
        key = "<space>il";
        mode = "n";
        action.__raw = ''
          function()
            require('telescope.builtin').symbols{ sources = {
              'latex'
            }}
          end
        '';
        options.desc = "[i]nsert a [l]atex symbol";
      }
      {
        key = "<space>ie";
        mode = "n";
        action.__raw = ''
          function()
            require('telescope.builtin').symbols{ sources = {
                'emoji',
            }}
          end
        '';
        options.desc = "[i]nsert a [e]moji";
      }
      {
        key = "<space>is";
        mode = "n";
        action.__raw = ''
          function()
            require('telescope.builtin').symbols{ sources = {
                'emoji',
                'gitmoji',
                'julia',
                'kaomoji',
                'latex',
                'math',
                'nerd',
            }}
          end
        '';
        options.desc = "[i]nsert a [s]ymbol (like emojis)";
      }
    ];
  };
}