Skip to content

Commit b45f051

Browse files
authored
Merge pull request #828 from horriblename/blink-cmdline
blink: fix unusable cmdline completion
2 parents d3a0e70 + 195d39c commit b45f051

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

modules/plugins/completion/blink-cmp/blink-cmp.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ in {
4848
cmdline = {
4949
sources = mkOption {
5050
type = nullOr (listOf str);
51-
default = [];
51+
default = null;
5252
description = "List of sources to enable for cmdline. Null means use default source list.";
5353
};
5454

modules/plugins/completion/blink-cmp/config.nix

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,21 @@ in {
122122
"fallback"
123123
];
124124
};
125+
126+
# cmdline is not enabled by default, we're just providing keymaps in
127+
# case the user enables them
128+
cmdline.keymap = {
129+
${mappings.complete} = ["show" "fallback"];
130+
${mappings.close} = ["hide" "fallback"];
131+
${mappings.scrollDocsUp} = ["scroll_documentation_up" "fallback"];
132+
${mappings.scrollDocsDown} = ["scroll_documentation_down" "fallback"];
133+
# NOTE: mappings.confirm is skipped because our default, <CR> would
134+
# lead to accidental triggers of blink.accept instead of executing
135+
# the cmd
136+
137+
${mappings.next} = ["select_next" "show" "fallback"];
138+
${mappings.previous} = ["select_prev" "fallback"];
139+
};
125140
};
126141
};
127142
};

0 commit comments

Comments
 (0)