-
Notifications
You must be signed in to change notification settings - Fork 46
Missing method parameter completion #30
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
Comments
Hi @GroundCombo ! I suspect you are Missing lsp textDocument/signatureHelp implementation which is missing on csharp-ls now. I am working on this when I get spare time and this is the next thing on my queue |
Oh, that's good to know and explains a lot. I also tried omnisharp with lsp and it seems to offer the signatureHelp capability, but . is not in the trigger characters and the other triggers result in errors... so I'll just use omnisharp-mode for now. Thanks! |
I have released https://www.nuget.org/packages/csharp-ls/0.5.0 which has please check if this works for you -- not 100% this is how it should work, but it apparently works ok for me on emacs FYI @vytautassurvila |
Ok, I think now I understand your problem. Not sure if this can be fixed with lsp though, in order to behave like omnisharp-emacs.. Signature help appears when you open parens after fn name and is triggered by "(" and "," chars. So this is probably too late as you want to see arg list already on the autocomplete Dropdown. I will check if I can make the full fn signature available on autocomplete list and if it is readable. But the part with "tabbing" between args is probably responsibility of lsp-mode and I'm not sure it provides that atm. |
I'm not familiar with lsp-mode's internals, but I believe it supports yasnippet for parameter placeholders, so it shouuuld work if the server provides the placeholder information. |
I was looking into how omnisharp-roslyn does this and it is somewhat complicated, it seems roslyn does not provide proper apis to do this easily (or did not provide it at the time omnisharp-roslyn completion service was written).. so I will keep this on my mind for a while until i figure what is the easiest way to provide this info.. currently i am thinking about doing a simple hack there and if the completion is requested after a '.' symbol then i can do a lookup for object type that goes before the dot and query actual method params for this -- but this will require me coding something that is supposedly already in roslyn, will be bug-prone and i am not particularly wiling to go that route yet.. |
I think I might be able to do something about this after all, after browsing omnisharp-roslyn and roslyn codebase.. things are a bit complicated, but this should be implementable once I understand the APIs I started my work in #47 |
Apologies if this doesn't belong to csharp-ls, but I have no idea where to start looking and would appreciate any hints.
I'm trying to get Unity projects to work with Emacs and LSP, and I've gotten to a point where csharp-ls is starting, clearly understands the project and offers type information and references. However, I'm only getting completions for method names. So, instead of tabbable variable placeholders such as (typing "foo.")
foo.MyMethod(int bar)
it only offers
foo.MyMethod
The full method signature is shown in the echo area when I move over it, so the issue seems to be on the completion side.
The good old obsolete omnisharp-mode has been working perfectly in the same project. I'm testing this with Emacs 28.1, csharp-ls 0.4.3 and the latest lsp-mode from MELPA. lsp-mode is using the default :capf as the completion provider.
The text was updated successfully, but these errors were encountered: