nushell / vscode-nushell-lang

A Nushell grammar for Visual Studio Code with IDE support
https://www.nushell.sh/
MIT License
122 stars 27 forks source link

`<command> <subcommand>` is inserted even when `<command>` is already typed #120

Open EmilyGraceSeville7cf opened 1 year ago

EmilyGraceSeville7cf commented 1 year ago

What can be done:

Nu:

0.79.0

VS Code:

Version: 1.77.3
Commit: 704ed70d4fd1c6bd6342c436f1ede30d1cff4710
Date: 2023-04-12T09:16:52.732Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Linux x64 5.15.0-71-generic
Sandboxed: No

OS:

Linux 22.04 Ubuntu
fdncred commented 1 year ago

ya, i think this is a bug. we may have to change nushell's complete functionality, or manipulate it's return on the typescript side.

fdncred commented 1 year ago

I can't reproduce this on Windows. That seems weird.

complete

EmilyGraceSeville7cf commented 1 year ago

I use Ubuntu 22.04 LTS (MATE desktop environment).

fdncred commented 1 year ago

I uploaded a gif, does it look like i'm doing what you described?

EmilyGraceSeville7cf commented 1 year ago

To reproduce issue you should trigger autocomplete for into <something> when into<space> is written on the same line.

fdncred commented 1 year ago

I see what you mean. If you let the auto-completer launch itself, you get proper completions. If you ignore that prompt and ctrl+space yourself, you get into into completions.

I tested like this 'str' | int<auto_magic_complete> and it works fine but 'str | into <ctrl+space> I get into into whatever I chose. In the second form, where the problem is, i have to cancel the auto_magic_complete popup in order to make it fail.

EmilyGraceSeville7cf commented 1 year ago

auto_magic_complete - where this setting can be found?

fdncred commented 1 year ago

auto_magic_complete - where this setting can be found?

LOL. I just mean that when i typed int, before i could get to the o in into, the completions pop up without me triggering them.