-
Notifications
You must be signed in to change notification settings - Fork 33
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
Can not override methods from parent class #72
Comments
I don't think there is much for me to do for this: #7 I can leave this open a little bit to see if I get some time to investigate later. I cannot guarantee anything though as I am pretty sure this is just the server not following the spec (as it unfortunately doesn't do for several things) |
Thank you very much! |
Could you check dotnet/roslyn#76141 (comment) when you have time? I've tried implementing the command in lsp_commands similar to how it's done for "roslyn.client.nestedCodeAction", following the linked vscode implementation, but I still get the exception mentioned in the issue so it doesn't get to execute. Not sure if something else is required so that the command doesn't get sent to the server (if that's why the exception is happening) |
Yeah, from initial testing I am also getting the same thing, and the handler is not even being called🤷♂️ |
Seems like a neovim issue. After looking through neovim 0.10.X code it seems that it's impossible for this custom command to trigger as In latest neovim nightly it seems that some custom handling for commands was done in lsp -> completion.lua, but I'm still trying to figure why it still doesn't work. |
Hmm, I tested the PR that should close the linked issue you created in neovim. I got curious since it seemed to be for the completion part of neovim itself, therefore having nothing to do with The PR seems to trigger the command (I didn't implement it yet), but it (of course) still doesn't trigger when using EDIT: I think I found out. Especially for |
It seems the issue was closed only with the mentioned problem for the native completion implementation, but the core issue was not adressed. I was thinking that LSP requests for executeCommand should first check if there is a client command no matter what, but they didn't adress this part :) So currently all completion plugins need to do it on their own. I'm also using nvim-cmp, but I'm thinking of migrating to blink as nvim-cmp seems to be kinda "unmaintained" for quite a while now. For blink.cmp I see that this was added recently But it's missing the part where it checks for the custom commands. I will most likely open a PR there after I migrate my config if nobody does it by then. |
Okay yeah thanks! I have also been thinking about moving to blink.cmp lately, but have wanted for it to get more mature first. Anyways, thanks a lot! If you wouldn't mind, could you link this issue or just send a message here or something if you some day open a PR about that in blink? If I switch, I might also look into this, but don't know yet if/when I might do that |
Saghen/blink.cmp#1255 Got merged. According to Saghen/blink.cmp#1203 v0.12 should be the last release with breaking changes until 1.0 Caveats:
I've found that increasing blink's resolve_timeout_ms to 1000 ms in the newest version always works for me.
public override void _Dro // accept _DropData(Vector2 atPosition, Variant data) public override void _DropData(Vector2 atPosition, Variant data)
{
base._DropData(atPosition, data);
}() // extra brackets here
Which would result in neovim in something like public override void Notification(int what)
{
base._Notification(what);
}
^M I'll open a draft PR with fixes for the last two issues and it would be good if someone tests it more extensively (especially on something else than Windows) |
Thanks a lot🙌 I will see if I can setup blink.cmp again and test this out a bit. If anyone else sees this, I hope they can also test it if interested😅 |
It works for me on linux. List<int> list = [];
x. // select this[] completion item from completion list
x[] // selection result |
There are problems with the brackets using the PR above? If so, can you please provide an example that doesn't work for you? |
Initially I wrote about the problem with parentheses without using the code from PR.
|
Thanks, I didn't have expression bodied methods enabled and forgot about this case. I've updated the PR. The cursor will be here though
I guess it makes the most sense for the cursor the be here
But depending on what this complex edit is used for, it might not be feasible to do without treesitter. If it's used only for override completions it should be easy to do without. |
I've found another problem with the autobrackets that somehow i can only trigger with ToString
The current line text before the command executes it
and the result becomes public override s()ing ToString()
{
return base.ToString();
} this is not solvable, it's most likely a bug in blink EDIT: Actually this is the completion item
The server response is incorrect, so Roslyn is at fault. I've also tested in VSCode and it's not working there either (obivously somehow here it works like half the time) 20250219-0925-42.6827148.mp4 |
Interesting🤔 will try to look at the PR today or tomorrow.
I actually think it makes sense to have it as the first example you had🤷♂️ |
When I try to override the methods from parent class, nothing happened.


The methods are still showed on cmp, but I can't generate code for that. Pls help!
The text was updated successfully, but these errors were encountered: