File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed
Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 1313 hdon = "hyprctl dispatch dpms on" ;
1414 ls = "eza --icons" ;
1515 } ;
16+ completion = {
17+ enable = true ;
18+ caseInsensitive = true ;
19+ } ;
1620 env = {
1721 NH_OS_FLAKE = "~/nixos-config" ;
1822 } ;
Original file line number Diff line number Diff line change 8282 description = "Initialization commands to run when completion is enabled." ;
8383 type = lib . types . lines ;
8484 } ;
85+ extraCompletions = lib . mkOption {
86+ type = lib . types . bool ;
87+ default = false ;
88+ description = "enable to add zsh-completions package, it has extra completions for other tools" ;
89+ } ;
90+ colors = lib . mkOption {
91+ type = lib . types . bool ;
92+ default = false ;
93+ description = "make the completions colorful (as if you were using ls --color)" ;
94+ } ;
95+ caseInsensitive = lib . mkOption {
96+ type = lib . types . bool ;
97+ default = true ;
98+ description = "when enabled, makes the completion case insensitive." ;
99+ } ;
100+ fuzzySearch = lib . mkEnableOption "fuzzy-completion" ;
85101 } ;
86102
87103 autoSuggestions = {
200216
201217 "# Completion"
202218 ( lib . optionalString cfg . completion . enable cfg . completion . init )
219+ ( lib . optionalString cfg . completion . caseInsensitive "zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' " )
220+ ( lib . optionalString cfg . completion . colors "zstyle ':completion:*' list-colors \" $\{ (s.:.)LS_COLORS\} \" " )
203221
204222 "#Autosuggestions"
205223 ( lib . optionalString cfg . autoSuggestions . enable ''
250268 ++ lib . optional ing . zoxide . enable ing . zoxide . package
251269 ++ lib . optional ing . oh-my-posh . enable ing . oh-my-posh . package
252270 ++ lib . optional ing . starship . enable ing . starship . package
253- ++ lib . optional cfg . completion . enable config . pkgs . nix-zsh-completions ;
271+ ++ lib . optional cfg . completion . enable config . pkgs . nix-zsh-completions
272+ ++ lib . optional cfg . completion . extraCompletions config . pkgs . zsh-completions
273+ ++ lib . optional cfg . completion . fuzzySearch config . pkgs . zsh-fzf-tab ;
254274
255275 flags = {
256276 "--histfcntllock" = true ;
You can’t perform that action at this time.
0 commit comments