vuejs / vetur

Vue tooling for VS Code.

Home Page:https://vuejs.github.io/vetur/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Weird arrow function color in latest VSCode + lang="ts"

rockmandash opened this issue · comments

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ
  • I have tried restarting VS Code or running Vetur: Restart VLS

Info

  • Platform: macOS
  • Vetur version: 0.36.0
  • VS Code version: 1.70.1

Problem

Weird arrow function color in latest VSCode + lang="ts"

Every theme produced same result, so theme is fine, I'm using default dark theme here:

image
image

Reproducible Case

  1. Upgrade to latest VSCode and vetur
  2. Paste following example code to a new file
<script lang="ts">
export default {
  methods: {
    cool() {
      return () => {};
    },
  },
};
</script>
  1. Problem occurs

microsoft/vscode#157322 I believe it's an issue with VS Code and its bracket pairing.

As mentioned in vuejs/language-tools#1677 (comment), adding the following to settings.json can be used as a temporary workaround:

"editor.language.colorizedBracketPairs": [
["{", "}"],
["[", "]"],
["(", ")"]
]