Closed jrwrigh closed 2 years ago
Thanks for the PR!
This is a good addition, I'll review it more closely in the weekend.
I'd also like to ask for your use-case, couldn't you use goto-implementation
from the lsp instead of goto-definition to go directly to the implementation of the function?
Not sure what's supported for C these days, but thought I'd mention it still 😊
I'd also like to ask for your use-case, couldn't you use
goto-implementation
from the lsp instead of goto-definition to go directly to the implementation of the function?Not sure what's supported for C these days, but thought I'd mention it still blush
I have (and just now) tried to do goto-implementation
, but that doesn't seem to work for clangd. Looking at this issue, it appears that it's limited to C++ class-type overrides and such. Might suggest that they add a feature in to go to the actual function definition rather just the function signature.
Awesome, I'll test it out before merging but looks good to me so far
Just tested, works well. Merging!
I've added a boolean option
nest_floating
to chose whether to allow for multiple nested floating windows to be opened.true
is the current default behavior andfalse
changes it. Iffalse
and the current window is floating, then it will reuse the current floating window, otherwise it'll open up a floating window like normal.Use Case: I work with C quite a bit and when I initially use goto-definition, I get the function signature in a header file. 99.9% of the time, I don't care about that, so I have to use goto-definition again to get to the actual function definition. I'd like the option of not having two floating windows cluttering up the screen when I don't want to. Conversely, I would like a floating window if I've taken a preview window and moved it into a "real" window.
Code Note:
stack_floating
is better since the preview windows are nested inside each other, but just stacked.new_window
topreview_window
to reflect the fact that the preview window might not always be new with this feature addition.