There is no syntax highlighting for .mdx file format?

OK, so I’m trying to edit Foo.stories.mdx file which is used by StoryBook. But I don’t know which LSP I should install to enable syntax highlighting for it. (or do we have a language server for it?)

Thanks in advance.

You need to install a syntax plugin for that. LSP doesn’t provide syntax highlighting.

I can find https://github.com/findango/vim-mdx.

LSP can provide syntax highlighting through “semantic highlighting tokens” (corrected as per mjlbach), but it’s best used as an adjunct to a traditional syntax plugin, not as a replacement for it.

This is used for example in nvim-idris2, which is built around the Idris 2 language server, because Idris 2 code benefits significantly from semantic highlighting generated by the compiler. I believe several other language servers also support semantic highlighting, e.g. Clangd.

Small clarification in that language servers support semantic tokens, which can be used for highlighting.