-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add fzf-lua integration for grepping in files and dirs
Previously, it was only possible to use Telescope to grep (search for text) in files and directories. This commit adds support for using fzf-lua.nvim. The default continues to be Telescope, but users can now set the following values to opt into using fzf-lua: ```lua ---@type YaziConfig { -- ... other settings integrations = { grep_in_directory = "fzf-lua", grep_in_selected_files = "fzf-lua", }, } ```
- Loading branch information
1 parent
6ea5bea
commit 21d5a81
Showing
9 changed files
with
147 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,12 +18,21 @@ jobs: | |
- uses: actions/[email protected] | ||
- name: Set up dependencies | ||
run: | | ||
# ripgrep is a telescope dependency | ||
# ripgrep is a dependency of telescope and fzf-lua | ||
which rg || { | ||
sudo apt-get install ripgrep | ||
} | ||
# realpath is used to resolve relative paths | ||
# fd is a dependency of telescope and fzf-lua | ||
# https://github.com/sharkdp/fd?tab=readme-ov-file#on-ubuntu | ||
sudo apt-get install fd-find | ||
# make sure it's available as `fd` - there seems to be some conflict in Ubuntu | ||
which fd || { | ||
sudo ln -s $(which fdfind) /usr/local/bin/fd | ||
} | ||
# realpath is used to resolve relative paths in yazi.nvim | ||
which realpath || { | ||
# just fail with an error message if realpath is not found | ||
echo "realpath is not installed, but it should be part of GNU coreutils and included in Ubuntu" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
integration-tests/test-environment/config-modifications/modify_yazi_config_use_fzf_lua.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
---@module "yazi" | ||
|
||
require("yazi").setup( | ||
---@type YaziConfig | ||
{ | ||
integrations = { | ||
grep_in_selected_files = "fzf-lua", | ||
grep_in_directory = "fzf-lua", | ||
}, | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters