-
Notifications
You must be signed in to change notification settings - Fork 60
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
paths relative to the working directory #21
Comments
I second this. I always use project.nvim to set my cwd to the git repo. Since the program which will read the filepaths are going to look for them in the project dir, not that specific source file dir, it makes sense to have an option for paths relative to cwd. |
I'd gladly use your edit if you upload it to your github as a fork. If your edit works well, you could open a PR and maybe get it merged without @hrsh7th doing all the work. |
I can merge the above API. |
How is this issue getting along. I may be wrong, but it does not seem as if above change has been made. |
I thoughts someone create the PR the above design. |
I thought something like that. As it is now, it will always lookup the current buffer name and use fs_stat now. If I've understood it correctly, the above API allow you to exchange the If that is the case, I will gladly implement it and open a PR. Thanks so much for this plugin. |
Hi, How should I define |
This should work. get_cwd = function(params)
return vim.fn.getcwd()
end, I've also created a small fork to have both cwd and the path of the buffer file. |
Hi,
I think the relative paths work relative to the parent directory of the file I'm currently editing.
Generally I want paths relative to the project the file belongs to, which I usually setup as my vim working directory.
For me it would be fine if both the parent dir and the cwd are used initially until only a unique match exists.
Or if it is an option to choose either one or the other would also be fine for me.
Or something else you come up with.. (lsp root dir might also be a good candidate)
For now I've made a small edit locally in the plugin source so I get the relative path to my cwd, so no pressure :)
Thank you so much for all this stuff, just starting to migrate nvim with lua based plugins and built in lsp since I have holidays, I'm enjoying myself very much, and I'm amazed by cmp, great work!
The text was updated successfully, but these errors were encountered: