Skip to content
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

Intellisense Completion doesn't respect space after equal sign (.html file) #29353

Closed
tralston opened this issue Jun 23, 2017 · 6 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug suggest IntelliSense, Auto Complete under-discussion Issue is under discussion for relevance, priority, approach verified Verification succeeded
Milestone

Comments

@tralston
Copy link

  • VSCode Version: Code 1.13.1 (379d2ef, 2017-06-14T18:21:47.485Z)
  • OS Version: Windows_NT ia32 6.1.7601
  • Extensions:
Extension Author Version
path-intellisense christian-kohler 1.4.2
prettier-vscode esbenp 0.19.1
beautify HookyQR 1.1.1
ftp-simple humy2833 0.5.0
Theme-MaterialKit ms-vscode 0.1.4
material-icon-theme PKief 2.0.9
remote-vscode rafaelmaiolla 1.0.1
JavaScriptSnippets xabikos 1.4.0
Material-theme zhuangtongfa 2.8.9
html-css-class-completion Zignd 1.7.0

Steps to Reproduce:

  1. In a .html file, within a script tag
  2. Declare a variable, say const abc = 5;
  3. On another line, type const def =. Intellisense will pop up. Press the space key to place a space after the equal sign.
  4. Start typing ab to filter the list to the abc variable from the previous line. Press Enter or Tab to select that item.
  5. The space after the equal sign disappeared, and it now reads const def =abc. Ideally even if you didn't put a space after the equal, it should for you, but that's a stylistic issue.

Notes: I tried the same thing in a (.js) file and it did not happen.

@vscodebot vscodebot bot added new release bug Issue identified by VS Code Team member as probable bug javascript JavaScript support issues labels Jun 23, 2017
@tralston
Copy link
Author

Update: same thing if typing - (minus sign) then using intellisense. It doesn't do it with a + (plus sign) or some other operators though. With the plus sign, intellisense pops up not after I type + or space, but after I type the first letter of the next word. But the equal sign and minus sign pop up intellisense immediately. Maybe this is only an issue with operators that immediately launch intellisense (as opposed to typing another word or value).

@aeschli
Copy link
Contributor

aeschli commented Jun 26, 2017

@jrieken This looks like a bug in code assist:

<script>
const abc = 5;
const def =
  • code assist after = brings up a list of proposals
  • entering a space does not filter any proposals, all seem to be still valid, no new request is made against to Language server
  • applying the proposal will insert it without space.

html-codeassist

@aeschli
Copy link
Contributor

aeschli commented Jun 26, 2017

I checked that this issue is also present in 1.13.1.

@jrieken
Copy link
Member

jrieken commented Jun 26, 2017

Hm, that came in when fixing #26096 which was about ignore whitespace in some cases...

@jrieken jrieken added suggest IntelliSense, Auto Complete and removed javascript JavaScript support issues labels Jun 26, 2017
@jrieken jrieken added this to the June 2017 milestone Jun 26, 2017
@jrieken jrieken added the under-discussion Issue is under discussion for relevance, priority, approach label Jun 26, 2017
@jrieken
Copy link
Member

jrieken commented Jun 26, 2017

Also a little unhappy because when having requested intellisense explicit via Ctrl+Space we don't hide the box when nothing matches anymore. So, even after fixing the filtering you will see the exact same behaviour. This issue is actually half as-designed and half a bug. Not sure what to do

@jrieken
Copy link
Member

jrieken commented Jun 28, 2017

I have pushed changes to cancel intellisense when non-word characters are being typed when otherwise go to the frozen state. That fixes this issue, the IntelliSense window closes after typing space.

@jrieken jrieken closed this as completed Jun 28, 2017
@roblourens roblourens added the verified Verification succeeded label Jun 30, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug suggest IntelliSense, Auto Complete under-discussion Issue is under discussion for relevance, priority, approach verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants