Skip to content

Deprecate the 'semantic_tokens' config option in favor of 'augmentsSyntaxTokens' #2527

@Techatrix

Description

@Techatrix

See my initial PR #2350 which revealed some problems when using with CoC or the builtin LSP in Neovim:

Vim defines preferred highlighting groups to share group names between many languages. The conventions that have been established by many syntax highlighting configurations are incompatible with LSP semantic highlighting and will result in poor highlighting when mixed together.

The only LSP that I know of which uses augmentsSyntaxTokens is rust-analyzer. And the rust-lang/rust.vim plugin has some relatively unique choices where it maps a lot more keywords to the Keyword highlighting group compared to other languages. That may explain why rust doesn't suffer from the same issue. This needs some more thorough research.

Possible solutions:

  1. do nothing
  2. document that augmentsSyntaxTokens should be manually disabled by the user with ZLS + NeoVim/CoC
  3. ignore the augmentsSyntaxTokens capability when used with Neovim or CoC
  4. get Neovim and CoC to adjust how they handle augmentsSyntaxTokens or just disable it (unless tree-sitter is used)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions