How to disable IntelliSense in comments in Visual Studio code?

I use Visual Studio code mainly for working with PHP. Every time I click ., IntelliSense launches and offers me PHP globals and functions starting from $_COOKIE. I usually know which global or function I want, so this is a little annoying. This happens even when I'm in the comment block ( /* ... */or // ...), which is much more annoying. Most of my time is spent returning and removing $_COOKIE.

Example (not PHP, but you get the idea): An animation example from the official documentation

I tried disabling it as suggested in the docs :

// Controls if quick suggestions should show up while typing
"editor.quickSuggestions": false,

// Controls if suggestions should be accepted with "Enter" - in addition to "Tab". Helps to avoid ambiguity between inserting new lines and accepting suggestions.
"editor.acceptSuggestionOnEnter": true,

// Controls the delay in ms after which quick suggestions will show up.
"editor.quickSuggestionsDelay": 10000,

// Enable word based suggestions
"editor.wordBasedSuggestions": true

... . , . 100 1000 .

  • IntelliSense ?
  • IntelliSense . , Ctrl + Space? (. 2 ).
  • IntelliSense, PHP?

: , :

// Controls if suggestions should automatically show up when typing trigger characters
"editor.suggestOnTriggerCharacters": false

, , .

2: ., keybindings.json:

{
    "key": ".",
    "command": "x",
}

, : "" x ". null command, , . , , -, :

"command": "-^acceptSelectedSuggestion"

"command": "-acceptSelectedSuggestion"

acceptSelectedSuggesdtion , , ., , , :

"command": "-editor.action.triggerSuggest"

.

+4
2

2017 , , . :

"editor.quickSuggestions": {
  "other": true,
  "comments": false,
  "strings": false
},

, PHP , global. . ( , .) $COOKIE , /, .

Aha, global., ENTER global.$COOKIE ( , ). :

"editor.acceptSuggestionOnEnter": "off",

, , "" . . . "editor.suggestOnTriggerCharacters": false, .

, .

"[php]":  {
  "editor.suggestOnTriggerCharacters": false,
},
+1

, editor.quickSuggestions , - (. GitHub). , . , , , editor.quickSuggestions; "" , , editor.quickSuggestions.

, , " " (, , ), :

"editor.suggestOnTriggerCharacters": false

- , , , , , , .

, , - , , , .., - editor.quickSuggestions, editor.suggestOnTriggerCharacters.

0

Source: https://habr.com/ru/post/1663709/


All Articles