fallenwood / syntax-highlighter

Syntax Highlighter extension for Visual Studio Code (VSCode). Based on Tree-sitter.
https://marketplace.visualstudio.com/items?itemName=fallenwood.syntax-highlighter-ng
MIT License
8 stars 1 forks source link

[Feat] Better integration with LSPs #6

Open fallenwood opened 1 year ago

fallenwood commented 1 year ago

Background

As we know, LSP has also provided good syntax based highlighting, and may conflict with the hard-encoded rules in this extension. I believe it already happened, for example, Typescript. This extension should work like an improvement for LSP, if LSP is working, and work in full-power mode if LSP not enabled.

Proposal

  1. Change the JSON rule to 2 parts, the improvement mode, and full powered mode
  2. Detect if LSP is enabled for current langauge
    1. Enabled: work with improvement mode
    2. Disabled, work with full powered mode
    3. Full powered mode should be a superset of improvement mode, there should be no conflicts
    4. Rebuild the rules that existing but conflict with LSPs
fallenwood commented 1 year ago

8 WIP