Enable LSP Semantic Highlighting

Describe your feature request
Enable highlighting based on semantic tokens

What problem(s) would this feature solve?
Code is not highlighted for custom languages even with a LSP specified

Explain what you were trying to do when you came across the problem leading to this feature request
I was a little confused because the documentation makes it sounds like semantic highlighting is done by default: https://docs.replit.com/themes/syntax-highlighting

But in the forum, and seeing this post: Astro language server, highlighting, autocomplete - #4 by nightshade427 it’s evident that semantic highlighting only works for select languages.

The language server protocol supports semantic highlighting, so I think it should be enabled… Otherwise the repl code editor is basically as good as notepad.


Oh, woops. Cannot I not edit? I meant to also say that my custom LSP isn’t highlighting my language either

1 Like

You can setup custom LSPs, but LSP and code highlighting are separate things on Replit. For example, syntax highlighting breaks when doing Svelte sometimes but the LSP works perfectly.

Right, that’s what the feature request is for. You can set up code editors to use LSP for semantic code highlighting


It seems there are a few CodeMirror extensions for LSPs that supposedly support highlighting:

Apparently others have had weird issues with highlighting in CodeMirror 6 though, so I don’t know if it’s currently possible.