-
Notifications
You must be signed in to change notification settings - Fork 5
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
behaving even more like vanilla tagfunc? #2
Comments
I don't think this straight approach is the right idea. This would basically remove all the smartness of the language server. Just imagine a variable with a typical name or which you just declare several times in the same file. Or an overload implementation, ... This would mean that Maybe I got your approach wrongly. I was thinking for a long time about your words to interpret them. And I read again through the help of the tags command to see if we could make both approaches work in parallel. But I don't see it. Please elaborate again if I got you wrong.
Where did you added the user data? Do you wanna open a PR to fix this single part? Thanks for your intensive interest into this plugin. |
Thanks for your input!
Totally understand if this plugin doesn't fit your current workflow and vision. I can always leverage your work as a great starting point.
This is a really good point which I trivialized. You're right- the plugin would probably need to apply some smart ordering logic on top of the LSP and it's not clear if this is even possible based on the information given in the LSP response. I was also not aware it isn't well supported by some language servers. I'll have think on this some more.
I think this must be a fifth "kind," of workspace Symbol. The logic here is if the user types ":tag foo" they really mean get me everything named foo without reference to a starting location or type (decl, defn, etc). Normally in vim, typing
Sure, I'll hack on this a bit and open one.
Interesting, what would previewfunc do exactly? Do you mean this feature would replace vim's old |
(Neo-)Vim has this feature of a preview window. It is a specific window, with a special option and there is only one of it at the time. It is for example used for PS: Sorry for the long and rude text. 🙈 |
Ah, got it now. Thanks for explaining. I'll just mention in the chance you haven't seen it, that there is a setting For tags only, another potential option you have is to use a ex command callback like With respect to modifying neovim C code base, you may find it easier to add lua callbacks or hooks rather than adding a new option, which is scrutinized lately. I am aware of nvim's LSP "handlers" but this seems rather different than what you're proposing. If you are so inclined, feel free to link to any prior mentions about your ideas and requirements on github/gitter. PS unfortunately I most likely won't have much free time to do any substantial development, but I'm interested in tracking developments. |
Hey!
First of all, this is a great plugin. I love the concept of a small plugin which integrates neovim's lsp with tagfunc and just gets it right. I wonder though, can we go even further? In particular;
How about if the user types
:tag foo
, usingworkspace/symbol
to search along the word foo? This seems roughly similar, but smarter than using a tagfile.The other use-case I have in mind is when the user types just
:tag
. In vanilla vim, this is supposed to jump to a newer entry in the tagstack. I tried this out a bit with the plugin and I'm not sure what is happening right now. It's a bit tricky because we need to store enough information to actually recall the tag. This is one reason I added "user_data," for bookkeeping.I am almost certain it's possible to get LSP sourced tags near vanilla-like. I tried hard to take care of this when I modernized and got the tagfunc patch merged into vim.
The text was updated successfully, but these errors were encountered: