microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.62k stars 28.67k forks source link

[🔥Theme] semanticTokenColors does not work correctly #107117

Closed thisVioletHydra closed 3 years ago

thisVioletHydra commented 4 years ago

Version: 1.49.0 (system setup) Commit: e790b931385d72cf5669fcefc51cdf65990efa5d Date: 2020-09-10T13:22:08.892Z Electron: 9.2.1 Chrome: 83.0.4103.122 Node.js: 12.14.1 V8: 8.3.110.13-electron.0 OS: Windows_NT x64 10.0.19041

Steps to Reproduce:

  1. setup theme : https://marketplace.visualstudio.com/items?itemName=Roman.ayu-next
  2. open any free project, javascript, and try type console.log('asdasd')
  3. see problem, console.log not have highlighting image
  4. Let's see the settings of the theme I'm using image
  5. Now I launch the project in the debugger and see that everything works, what am I doing wrong? image

Does this issue occur when all extensions are disabled?: Yes

aeschli commented 3 years ago

You can see in the scope inspect tool that console did not get the defaultLibrary modifier. Can you do a goto definition on console?

thisVioletHydra commented 3 years ago

defaultLibrary

image this ??

aeschli commented 3 years ago
thisVioletHydra commented 3 years ago
  • what path does the d.ts file have that contains the declaration

i have it: C:\Users\Anna\AppData\Local\Microsoft\TypeScript\4.0\node_modules\@types\node\console.d.ts image

and this: C:\Users\Anna\AppData\Local\Microsoft\TypeScript\4.0\node_modules\@types\node\globals.d.ts image

thisVioletHydra commented 3 years ago

hmm... The most interesting thing is that when I check the goto definition in debugger, the library is connected there lib.dom.d.ts: C:\Program Files\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\lib.dom.d.ts image

thisVioletHydra commented 3 years ago
  • put the cursor on console and invoke F12 (Goto Definition).
  • in the editor or peek that show, what path does the d.ts file have that contains the declaration image

if i kill this file: jsconfig.json, the semantic work hm...

image

if you know, help me fix config:

{
  "title": "JSON schema for the TypeScript compiler's configuration file",
  "description": "config for VS CODE",
  "compilerOptions": {
    "lib": ["ESNext"],
    "noEmit": true,
    "rootDir": ".",
    "module": "ESNext",
    "target": "ESNext",
    "baseUrl": ".",
    "paths": {
      "~/*": ["./*"],
      "@/*": ["./*"],
      "~~/*": ["./*"],
      "@@/*": ["./*"],
      "@root": ["."],
      "@access": ["./.access"],
      "@webpack": ["./webpack.config.js"],
      "@models": ["./src/models"],
      "@app": ["./src/app"]
    }
  },

 "compileOnSave": false,
 "include": ["**/*"],
 "exclude": ["node_modules/*", ".nuxt", "dist", "assets"],

  "eslint.enable": true,
  "files.exclude": {
    "node_modules": true,
    ".npm-offline-cache": true
  },
  "editor.formatOnSave": true,
  "[javascript]": {
    "editor.formatOnSave": true
  }
}
thisVioletHydra commented 3 years ago

"lib": ["dom", "dom.iterable", "esnext"], I helped myself 🤔