Closed MrOneTwo closed 2 years ago
plug "andreyorst/fzf.kak" config %{ map global normal
': fzf-mode ' } defer "fzf" %{ set-option global fzf_grep_command 'rg' set-option global fzf_file_command "find . ( -path '/.svn' -o -path '/.git' -o -path '/.cache' -o -path '/.mypy_cache' ) -prune -o -type f -print" set-option global fzf_preview false } None of those get set when Kakoune is run but running this works:
set-option global fzf_preview false
This is because fzf_file_command is not defined in the fzf module but in the fzf-file module, so you need to use defer fzf-file around this set-option block. Same for fzf_grep_command. Please see the readme for where the options are defined, and please see plug.kak's readme on how to use the defer keyword.
@andreyorst Ohhhh... that actually helps me to understand how the plugins are structured. Thank you and sorry for bothering you with my misunderstanding of the subject.
no problem!
For anyone else with the same issue, here is the corrected config:
plug "andreyorst/fzf.kak" config %{
map global normal <c-p> ': fzf-mode<ret>'
} defer "fzf-file" %{
set-option global fzf_grep_command 'rg'
set-option global fzf_file_command "find . \( -path '*/.svn*' -o
-path '*/.git*' -o
-path '*/.cache*' -o
-path '*/.mypy_cache*' \) -prune -o -type f -print"
set-option global fzf_preview false
}
Notice that the fzf-file
module is what needed to be deferred, not the fzf
module. You can tell which module to use for fzf from the README. It lists the module to use for each configuration setting (the fzf_grep_command
, fzf_file_command
, and fzf_preview
settings in this example).
Hello, it seems my fzf config isn't read. This is my kakrc.
None of those get set when Kakoune is run but running this works:
Setting any of those options manually works but not from kakrc.
Kakoune ver: v2021.11.08-1-ge7100dc8
The debug buffer just after booting Kakoune: