-
Notifications
You must be signed in to change notification settings - Fork 65
[#1339] add preference to enable content assist trigger on semicolon #1340
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
base: main
Are you sure you want to change the base?
Conversation
|
JDT has "trigger chars" which allow users to configure more than 1 character in a freetext field. Could we mimic it for this use case? |
|
I wonder whether those "excluded" strings should instead be configured by language server. For example, what about |
Sure. I can replace the check box with a free text field to allow users to specify other, language specific, characters.
I think this is a little complicated. It was my first idea as well and I posted a clangd issue. But this response pushed it back to the editor side. In C++ it is allowed to write a new statement after |
|
A text box would invert the logic: |
|
I'm genuinely wondering how users would like (or not) get get |
|
That's exactly what the on-type-formatting does. But that's a different story. |
I think it's the same story, but not on the same stage. |
|
Please take look of the original cdt-lsp issue eclipse-cdt/cdt-lsp#550. There is a GIF that explains the problem during typing. The on-type-formatting kicks in after the new line has been applied. But there is no new line applied after pressing the enter key. Instead, the proposal i being applied which is not wanted at that point. |
|
On a different track, In eclipse-cdt/cdt-lsp#550 you mention than VS built a workaround. Since the code is open source, did you checked what that workaround could be? Maybe we could use that as inspiration. |
The onTypeFormatting notification could probably kick it anytime. Could the Language Server trigger it on pressing |
|
The LSP is a bit vague in the definition of the onTypeFormatting. See this comment. The current LSP4E implementation of onTypeFormatting checks the document changes. If there is a trigger character found (clangd triggers on Why should a onTypeFormatting being triggered/send when the user types The problem here is, that the proposal get triggered/opened by Instead of: we get (b is on top of the proposals) when pressing enter: |
|
My main concern is that hardcoding ';' is a language-sepecific feature, so would be hardocding That's why I'm wondering whether it would be interesting to get the LS (clangd here) enable onTypeFormatting for end line (eg |

fixes #1339