Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gotofile does not work "Project" #136

Open
nippyin opened this issue May 29, 2023 · 1 comment
Open

gotofile does not work "Project" #136

nippyin opened this issue May 29, 2023 · 1 comment

Comments

@nippyin
Copy link

nippyin commented May 29, 2023

I have following mapping to search the word under cursor which works just fine, only if I first cd into the directory where these files names exist.
map('n', 'gf', [[<CMD>lua require'telescope.builtin'.find_files({find_command={'fd','-L', '-H', '-p', vim.fn.expand("<cword>"), vim.fn.getcwd()}})<cr>]], {})

When I select a project from picker it changes the current working directory to that project location. but now if I try to search the word under cursor it does not search that. I am not quite getting what I am missing here.

@nippyin
Copy link
Author

nippyin commented May 30, 2023

Another thing to notice is if I enter manually the path of the project then it works.

In the following test case, I select the project from the telescope picker and entered into the project, then selected a file. now from that file I want to search keyword name under my cursor using goto. the expected behaviour is I should see popup with all the files it has found with that name.

Working
lua require'telescope.builtin'.find_files({find_command={'fd','-L', '-H', '-p', vim.fn.expand("<cword>"), '/Users/userName/folder1/folder2'}})

Not Working
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant