-
-
Notifications
You must be signed in to change notification settings - Fork 18
Pressing .
automatically chooses the selected completion suggestion
#160
Comments
This is actually a "feature" of the language server the extension uses and language server protocol. I also find this a bit annoying - I'll investigate if there's a way to override the default. |
I will also add that pressing comma ( An example: I type: It seems over-eager to chose completions that aren't even a very close match, like matching |
We've heard a couple of reports about this from other users in Nova as well. @apexskier, if there's anything we need or could do from our side to make things better for the LSP extension, please let us know! |
Huge +1 on this. Super annoying when the autocomplete re-prompts even after editing my mistake (then I proceed to have the autocomplete win 2-3 more times before I can type what I want). Any update on overriding the default? |
I wasn't able to find a way to override through It looks like the original reason for this was to match VSCode behavior which still exists. I played around a bit and it appears that VSCode does the same thing as nova with respect to replacing with the chosen suggestion. The actual issue might be that the ordering of suggestions is a lot worse in Nova/this extension. The extension doesn't have any control over autocomplete, so there could be an issue in Nova's LSP client side or typescript-language-server's side. VSCode code.movNova nova.mov |
After a quick scan, I don't see any sorting logic in vscode or the language server. |
I'm doing some more digging, and it also seems like the filtering logic is different from VSCode. |
@logancollins Does Nova do a full |
@apexskier just want to say thanks for digging in to this and keep up the good work! Happy hunting! |
@apexskier Correct, Nova does not currently support the resolve request in the Language Server Protocol. We hope to look into adding support for this at some point. I can see if we can try and schedule this for the next feature milestone. So far, we haven't encountered (or heard encounter of) any LSPs actually using it, but clearly it would be required for full tsserver support. I would imagine the item ordering algorithm used by Nova is not exactly the same as VSCode. Nova uses an n-gram sorting algorithm that allows for fuzzy-matching. I am aware that the LSP completion items can optionally provide a string override for use when sorting, but Nova currently ignores it. It may be worth it for us to revisit this and see if there's a better way we can ensure that items returned from a language server can maintain their ordering relative to each other, while still applying fuzzy matching and allowing the rest of Nova's completion providers to inter-sort properly. I am not offhand sure what they might be doing, as I generally tend to avoid reading the VSCode source to avoid any reverse engineering legal issues from our perspective. (Call me paranoid, I guess. 😄) |
From what I saw in VSCode source, they're using the |
The latest Nova update (7.0, released yesterday) fixes the problem for me. Great job! |
@abelespana interesting. I still see |
I have the same problem, when I use. " or "," I do the self-tasting, I had to deactivate the section of Completions so that the problem does not happen, unfortunately, remove several increasing when programming Nova version: 7.4 |
I will say I've also found this to be quite problematic, and just generally felt the auto-complete in Nova was wonky to the point of generating multiple bug reports but it's hard to tell at times whether it's Nova or this extension the root cause is in. Curious at this point if there is anything planned or further work that could be done on improving this particular issue (happy to try and help), or is it still on Nova to fix it? I still have this behavior in Nova 8.1 and when I emailed them about it, they referred to the extension. Nova version: 8.1 |
You will all likely be very happy to hear that we've added an explicit preference to the upcoming Nova 9 to disable completion trigger characters defined by language servers. This should prevent characters like |
@logancollins this is great news, is there a way to get access to the Nova 9 version as a tester? Unfortunately in my projects, this particular issue makes Nova 8 unusable. The "." key randomly inserts characters as I type Kenny-.2022-02-03.at.09.07.29.mp4 |
Nova 9 has been released |
A clear and concise description of what the bug is.
Pressing
.
automatically chooses the selected completion suggestion. This frequently results in undesirable behavior—for example,console.log
is often transformed intoConsole.log
. When not using this extension, Nova keeps whatever was typed unless e.g.tab
was pressed.To reproduce
Steps to reproduce the behavior:
.
Expected behavior
The typed text is unaltered.
Screenshots
Environment
Status Running
Typescript Version Version...
Extension console output
No Typescript-related output generated when problem occurs.
Additional context
I have experienced this issue since Nova was in beta.
The text was updated successfully, but these errors were encountered: