File tree Expand file tree Collapse file tree 2 files changed +25
-14
lines changed
modules/utility/telescope Expand file tree Collapse file tree 2 files changed +25
-14
lines changed Original file line number Diff line number Diff line change 5
5
...
6
6
} : let
7
7
inherit ( lib ) addDescriptionsToMappings mkIf mkMerge mkSetBinding nvim ;
8
+ inherit ( nvim . lua ) listToLuaTable ;
8
9
9
10
cfg = config . vim . telescope ;
10
- self = import ./telescope.nix { inherit lib ; } ;
11
+ self = import ./telescope.nix { inherit pkgs lib ; } ;
11
12
mappingDefinitions = self . options . vim . telescope . mappings ;
12
13
13
14
mappings = addDescriptionsToMappings cfg . mappings mappingDefinitions ;
56
57
local telescope = require('telescope')
57
58
telescope.setup {
58
59
defaults = {
59
- vimgrep_arguments = {
60
- "${ pkgs . ripgrep } /bin/rg",
61
- "--color=never",
62
- "--no-heading",
63
- "--with-filename",
64
- "--line-number",
65
- "--column",
66
- "--smart-case",
67
- "--hidden",
68
- "--no-ignore",
69
- },
60
+ vimgrep_arguments = ${ listToLuaTable cfg . vimgrep_arguments } ,
70
61
pickers = {
71
62
find_command = {
72
63
"${ pkgs . fd } /bin/fd",
Original file line number Diff line number Diff line change 1
- { lib , ...} : let
2
- inherit ( lib ) mkMappingOption mkEnableOption ;
1
+ {
2
+ pkgs ,
3
+ lib ,
4
+ ...
5
+ } : let
6
+ inherit ( lib ) mkMappingOption mkEnableOption mkOption types ;
3
7
in {
4
8
options . vim . telescope = {
5
9
mappings = {
29
33
} ;
30
34
31
35
enable = mkEnableOption "telescope.nvim: multi-purpose search and picker utility" ;
36
+
37
+ vimgrep_arguments = mkOption {
38
+ description = "Arguments to use for the grep command" ;
39
+ type = types . listOf types . str ;
40
+ default = [
41
+ "${ pkgs . ripgrep } /bin/rg"
42
+ "--color=never"
43
+ "--no-heading"
44
+ "--with-filename"
45
+ "--line-number"
46
+ "--column"
47
+ "--smart-case"
48
+ "--hidden"
49
+ "--no-ignore"
50
+ ] ;
51
+ } ;
32
52
} ;
33
53
}
You can’t perform that action at this time.
0 commit comments