-
Notifications
You must be signed in to change notification settings - Fork 115
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
GoTo Definition for marked template type not working as expected #307
Comments
The Language Server Protocol currently only accepts a single position as input for the go-to-definition request, not a range. Assuming you've selected the range Clangd then needs to decide whether to use the I agree this behaviour is suboptimal. Hopefully, LSP can add support for sending the entire range in microsoft/language-server-protocol#1029. |
I don't think MS is likely to fix this. Last time i thought about this i got stuck on the idea that this might not be fixed for an editor (e.g. vim mode for VSCode) or even vary over time (modal editing). But this is probably perfect-as-enemy-of-the-good. |
I'm all for making the clangd-only fix you describe, but I'm also curious why you don't think this will be fixed in LSP. Range inputs seem useful independent of this specific issue; are you expecting resistance to them for a particular reason, rather than just being a matter of someone doing the work of a fleshed-out proposal with spec and vscode client changes? |
I am wondering how CLion does this, since AFAIK they also use clang. There, the Go to Definition works as intuitevly expected. |
I have encountered similiar problems. Thanks for @HighCommander4 's explanation, I have found the reason and known how to a workaround it.
For me, the "go to definition" doesn't work correctly since I have a habit of double clicking on the |
In the term
std::optional<types::nr_rrc::BandList>
, I markBandList
and hit Go to Definition.I would expect that this jumps to
types::nr_rrc::BandList
, but it jumps tostd::optional
.Do I miss something here?
The text was updated successfully, but these errors were encountered: