about summary refs log tree commit diff stats
path: root/modules/by-name/nv/nvim/plgs/telescope/extensions/symbols/default.nix
blob: 1f82523de5d7436345d3bd080fad957eb499b063 (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
60
61
62
63
64
65
66
67
68
# nixos-config - My current NixOS configuration
#
# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
# SPDX-License-Identifier: GPL-3.0-or-later
#
# This file is part of my nixos-config.
#
# You should have received a copy of the License along with this program.
# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
{
  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)";
      }
    ];
  };
}