-
Notifications
You must be signed in to change notification settings - Fork 28
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
afa5dc7
commit 56b80f3
Showing
9 changed files
with
151 additions
and
26 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,22 @@ jobs: | |
- uses: actions/[email protected] | ||
- name: Set up dependencies | ||
run: | | ||
# ripgrep is a telescope dependency | ||
which rg || { | ||
sudo apt-get install ripgrep | ||
} | ||
# ripgrep is a dependency of telescope and fzf-lua | ||
sudo apt-get install ripgrep | ||
rg --version | ||
# fd is a dependency of telescope and fzf-lua | ||
# https://github.com/sharkdp/fd?tab=readme-ov-file#on-ubuntu | ||
# make sure it's available as `fd` - there seems to be some conflict in Ubuntu | ||
sudo apt-get install fd-find | ||
sudo ln -s $(which fdfind) /usr/local/bin/fd | ||
fd --version | ||
# install fzf | ||
sudo apt install fzf | ||
fzf --version | ||
# realpath is used to resolve relative paths | ||
# 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