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

Plugin clobbers the path variable, breaking fuzzy finding #54

Open
SamTebbs33 opened this issue May 16, 2021 · 5 comments
Open

Plugin clobbers the path variable, breaking fuzzy finding #54

SamTebbs33 opened this issue May 16, 2021 · 5 comments

Comments

@SamTebbs33
Copy link

After opening a .zig file, line 40 of fplugin/zig.vim clobbers the path variable causing the vim fuzzy finder (:find) to start looking in the std lib directory instead of the cwd.

@haze
Copy link
Contributor

haze commented May 19, 2021

Seems like @LemonBoy added this behavior. I want to ask them what their intention was before thinking about removing it

@LemonBoy
Copy link
Contributor

I only added some more error checking around that logic, I guess whoever added that wanted gf to work on import statements.

@matu3ba
Copy link

matu3ba commented Nov 3, 2021

@SamTebbs33 Did you try swapping, ie to write in ftplugin/zig.vim

let &l:path= &l:path . ',' . json_decode(s:env)['std_dir']

Vim/Neovim should then first look in the current path.

@atemmel
Copy link

atemmel commented Jan 20, 2022

For anyone else impacted by this, you can fix it by altering line 47 in ftplugin/zig.vim (just swap the path priority)

Change it from:

let &l:path = g:zig_std_dir . ',' . &l:path

To:

let &l:path = &l:path . ',' . g:zig_std_dir

@matu3ba
Copy link

matu3ba commented Jan 14, 2024

I think this should be closed, since the issue author gave no feedback, if the suggested solution worked or clarify why not.

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

5 participants