When writing JSX props in typescript, this is what it normally looks like for me, works as expected:
However, if I let VsCode autocomplete the style (or another) tag like this:
then I get into a weird mode where the space between the braces has a gray background:
In this mode, autocomplete does not work (you can see that the first line of the popup is not highlighted). Pressing return produces a newline instead of accepting the first suggestion.
When adding new lines, it looks like this:
My questions are:
What is this strange mode supposed to do?
Is this intended or a bug?
What is it called?
Can I disable it?
VsCode 1.75.0 on Windows 10
Related
I'm having an issue with VS Code autocomplete (intellisense?) that seems completely illogical, but I can't figure out how to disable it (partly because I've no idea what to actually search for this.)
My most recent example is illustrated in the screenshot below. I am typing out a media query #media (min-width: 768px)
I then follow this up with and to continue the query, yet VS Code has for some reason decided I must want to insert a random unrelated variable here. It doesn't even have the string and anywhere in the variable names suggested.
I am fine with suggestions - they are useful when I want. But the second I hit the space bar, it automatically replaces my text. It is replacing my text despite me doing nothing other than typing what I want to type.
So many times I have been caught out because my correctly typed code is being replaced without any interaction whatsoever on my part. How do I prevent this happening?
Thanks for any help.
Intellisense does not autocomplete on space, and this is not part of its default config either. Therefore this is either a bug (which could be the case), or a misconfiguration caused by an extension or changes to settings.json.
One solution for it would be to disable autocomplete on commit character altogether with "editor.acceptSuggestionOnCommitCharacter": false in settings.json. If "editor.acceptSuggestionOnEnter": "on" is left untouched, autocomplete will then only be triggered on tab/enter.
The current behaviour of VScode (V1.64.0) is to throw intellisense popups at me as soon as I start typing. For instance, type the letter a, and you get:
I only want this window to pop up when I tell it to (e.g. when I type a macro). How can this be done?
So far, I've tried disabling suggestions and all other options that seem related... I also tried unticking all intellisense categories, but this just disables it entirely.
N.B. I'm coding in Python, so Pylance might have something to do with this behaviour.
I cannot get Sublime auto complete to work properly for custom syntaxes. For example, this is what happens when the syntax is set to Javascript:
When the syntax is set to my custom syntax, these types of suggestions never show up. Custom snippets show up just fine, but variables found in the file do not show up properly. When I click [CTRL+SPACE], this is what I get:
For some reason, single characters will show up, but not whole words. For the syntax, I copied the Completion Rules.tmPreferences, Symbol List.tmPreferences, etc. directly from here so that all should be fine (although messing around with them didn't seem to do anything).
I have tried adding the syntax to auto_complete_selector in settings, but it does not work. I use the package All Autocomplete, and deleting this did not change anything.
i use visual studio code to create my flutter app, but since 1 month ago, i detected as if the editor have a double autocomplete.
When i write for example: "Container" i have the autocomplete while i'm writing, but if i press Enter it won't add the brackets at the end (before, it did!)
And, if i write: "child" i have the autocomplete while i'm writing, but if i press Enter, the cursor will be with a selection, and there is no autocomplete until i click in somewhere to remove the auto-selection, or i write the command completely without autocomplete.
It's like if there were a double autocomplete in conflict, that select the words after i press enter.
Autocomplete working:
Strange auto-selection and then no-autocomplete:
Furthermore, if i write "setState" and press Enter to autocomplete the function, i get the whole function selected and tabbed of 4 tabulation on the right. Same for initState.
I tried to disable every extension and restart, but i had same problem.
I'm so slow now to write flutter code, because i have to remember every CamelCase word and property and write them in every single char, or click in somewhere to make autocomplete works.
Fixed!
In setting i had to disable LSP.
"dart.previewLsp": false
I've the same issue, after some research I found this:
https://github.com/Dart-Code/Dart-Code/issues/2823#issuecomment-725630953
I'm not sure this is the right way because I didn't have try yet but the problem on GitHub issues seams the same you describe, apparently this solution works with LSP enabled
a serious limitation for my workflow with vs code is the fact that while typing html everything gets turned into an html tag when pressing tab at the beginning of a line.
entering:
alsdjflkasjdfk + Tab
leads to:
<alsdjflkasjdfk> </alsdjflkasjdfk>
this is a problem since I want to integrate Django html snipptes and they end up not working. Does someone know how to turn this off? I rather just want defined HTML Snipptes than simply everything turning into one.
Try setting:
"emmet.triggerExpansionOnTab": false
This should disable this feature. We are also investigating a different flow for emmet with VSCode 1.12: https://github.com/Microsoft/vscode/issues/21943