neoclide / coc-tsserver

Tsserver extension for coc.nvim that provide rich features like VSCode for javascript & typescript
MIT License
1.05k stars 68 forks source link

Javascript Support #375

Closed ghost closed 2 years ago

ghost commented 2 years ago

Highlighting is not working as expected with Javascript.

I originally noticed this trying to edit javascriptreact files, and then realised that it is a general problem with Javascript.

I even tried creating a jsconfig.json file, to no effect.

Should this just work with coc-tsserver, or should I need an additional plugin?

chemzqm commented 2 years ago

This extension doesn't provide syntax highlight

ghost commented 2 years ago

I'm not sure I understand what you mean.

[Trace - 19:18:06.709] Response received: documentHighlights (11). Request took 2 ms. Success: true Result: [
    {
        "file": "/Users/alexi/doot/pages/index.js",
        "highlightSpans": [
            {
                "start": {
                    "line": 15,
                    "offset": 8
                },
                "end": {
                    "line": 15,
                    "offset": 14
                },
                "kind": "none"
            },
            {
                "start": {
                    "line": 33,
                    "offset": 9
                },
                "end": {
                    "line": 33,
                    "offset": 15
                },
                "kind": "none"
            }
        ]
    }
]

This is the output from :CocCommand workspace.showOutput.

What extension is providing syntax highlight then, if it's not coc?

Can you just tell me how to fix this?

chemzqm commented 2 years ago

It's highlights for same word under cursor. There're many, or use the one provided by vim itself