Replies: 2 comments 6 replies
-
The support for ts-context is somewhat of a hack as it’s not supported upstream (no cooperation) and has no official API. Regardless, we can try as it should work automatically if enabled in your config:
|
Beta Was this translation helpful? Give feedback.
2 replies
-
This feature work well for me (on linux). Ensure you are using fzf-lua on latest commit (main branch)? Apply the diff (cd to fzf-lua repo, Then run diff --git a/scripts/init.lua b/scripts/init.lua
index 99f7023..e65b3b1 100644
--- a/scripts/init.lua
+++ b/scripts/init.lua
@@ -5,7 +5,12 @@ vim.cmd("set packpath+=" .. packpath)
vim.o.termguicolors = true
-require "fzf-lua".setup { defaults = { git_icons = false } }
+require("treesitter-context").setup({})
+require "fzf-lua".setup {}
+
+vim.defer_fn(function()
+ require("fzf-lua").live_grep({ search = "## Dependencies -- *.md", no_esc = true })
+end, 100)
vim.api.nvim_set_keymap("n", "<C-\\>", [[<Cmd>lua require"fzf-lua".buffers()<CR>]], {})
vim.api.nvim_set_keymap("n", "<C-k>", [[<Cmd>lua require"fzf-lua".builtin()<CR>]], {})
diff --git a/scripts/mini.sh b/scripts/mini.sh
index 1f3bd48..ab67fb7 100755
--- a/scripts/mini.sh
+++ b/scripts/mini.sh
@@ -36,6 +36,8 @@ if [ "${1:-}" = "reset" ]; then
fi
download_plugin "nvim-tree" "nvim-web-devicons"
+download_plugin "nvim-treesitter" "nvim-treesitter-context"
+# download_plugin "nvim-treesitter" "nvim-treesitter"
# if exists, link to local folder so we can test local changes
if [ -d "${plug_dir}" ]; then
@@ -46,6 +48,6 @@ else
fi
# Run neovim
-HOME=${TEMPDIR} PACKPATH=${packpath} ${nvim_bin} -u ${tmp_rtp}/${plug_name}/scripts/init.lua
+NVIM_APPNAME=fzf-lua HOME=${TEMPDIR} PACKPATH=${packpath} ${nvim_bin} -u ${tmp_rtp}/${plug_name}/scripts/init.lua
echo "\nDone." |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Not sure if this is a bug or user error so posting it in the discussions first.
I can't get treesitter-context to show up in the preview. Tried using F7 as well as launching fzflua via
:FzfLua live_grep previewer.treesitter.context=true
.Beta Was this translation helpful? Give feedback.
All reactions