Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/davesnx/styled-ppx/llms.txt

Use this file to discover all available pages before exploring further.

One of the trade-offs of embedding CSS directly inside ReScript or OCaml source files is that editors cannot apply CSS syntax highlighting out of the box. To close that gap, styled-ppx provides editor extensions that bring full CSS syntax highlighting to the PPX notation in ReScript, Reason, and OCaml files.

VSCode Extension

Install the VSCode Extension directly from the Visual Studio Marketplace, or run the following command from any terminal:
ext install davesnx.vscode-styled-ppx
The extension activates automatically for .res, .resi, .re, .rei, and .ml/.mli files and highlights CSS inside all styled-ppx extension nodes (%styled.*, %cx, %css, and [%styled.*]).

Vim Plugin

The vim plugin is hosted at ahrefs/vim-styled-ppx. Choose the installation method that matches your plugin manager:
Add the following line to your ~/.vimrc:
Plug 'ahrefs/vim-styled-ppx'
Then reload your config and run :PlugInstall inside Vim.
Interested in support for another editor? File an issue on GitHub and the community will take a look.

Build docs developers (and LLMs) love