# Stylus

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/go/llms.txt).

> **TL;DR**
> Required plugins:
>
>
>
> `Stylus`:   install the plugin on the Settings | Plugins page.
>
>
>
> `File Watchers`:   the plugin is bundled with GoLand and enabled by default.

GoLand lets you translate your [Stylus](http://stylus-lang.com/) code into CSS on the fly.

## Before you start

Procedure:

1. Make sure you have [Node.js](http://nodejs.org/)  on your computer.

2. Install and enable the Stylus plugin on the Settings | Plugins page, as described in [Installing plugins from
JetBrains Marketplace](managing-plugins.html#install_plugin_from_repo).

3. Make sure the  File Watchers plugin is enabled in the settings.  Press `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Comma` (VSCode), `⌘ Comma` (VSCode (macOS)) to open settings and then select `Plugins`.  In the search field, type File Watchers. For more information about plugins, refer to [Managing plugins](managing-plugins.html).

## Install Stylus

Procedure:

* In your command-line shell or in the embedded Terminal (`Alt+F12` (Windows), `⌥ F12` (macOS), `⌥ F12` (IntelliJ IDEA Classic (macOS)), `⌘ ⌃ T` (macOS System Shortcuts), `Alt+F12` (XWin), `Alt+F12` (GNOME), `Alt+F12` (KDE), `Alt+F12` (Emacs), `Alt+F12` (Sublime Text), `⌥ F12` (Sublime Text (macOS)), `Ctrl+`` (VSCode), `⌃ `` (VSCode (macOS))) , type:

`npm install --global stylus`

Learn more from the [Stylus official website](http://stylus-lang.com/#get-styling-with-stylus).

## Compile the Stylus code

To compile your code automatically, you need to install a compiler and configure a [Stylus File Watcher](#stylus_create_file_watcher) which will track changes to your files and run the compiler.

When you open a file, GoLand checks whether an applicable File Watcher is available in the current project. If such File Watcher is configured but disabled, GoLand displays a popup that informs you about the configured File Watcher and suggests to enable it.

If an applicable File Watcher is configured and enabled in the current project, GoLand starts the compiler automatically upon the event specified in the [New Watcher dialog](new-watcher-dialog.html).

* If the Auto-save edited files to trigger the watcher checkbox is selected, the File Watcher is invoked as soon as any changes are made to the source code.

* If the Auto-save edited files to trigger the watcher checkbox is cleared, the File Watcher is started upon save (`File | Save All`, `Ctrl+S` (Windows), `⌘ S` (macOS), `⌘ S` (IntelliJ IDEA Classic (macOS)), `⌘ S` (macOS System Shortcuts), `Ctrl+S` (XWin), `Ctrl+S` (GNOME), `Ctrl+S` (KDE), `Ctrl+X, Ctrl+S` (Emacs), `Ctrl+S` (Sublime Text), `⌘ S` (Sublime Text (macOS)), `Ctrl+K, S` (VSCode), `⌘ ⌥ S` (VSCode (macOS))) or when you move focus from GoLand (upon frame deactivation).

Learn more from [File Watchers](using-file-watchers.html).

GoLand creates a separate file with the generated output. The file has the name of the source Stylus file and the extension `.css`. The location of the generated files is defined in the Output paths to refresh field of the [New Watcher dialog](new-watcher-dialog.html). However, in the Project Tree, they are shown under the source file which is now displayed as a node.

Procedure: Create a File Watcher

1. In the Settings dialog (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Comma` (VSCode), `⌘ Comma` (VSCode (macOS))), click File Watchers under Tools. The [File Watchers page](settings-tools-file-watchers.html) that opens shows the list of already configured File Watchers.

2. Click the ![Add button](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.add.svg) or press `Alt+Insert` (Windows), `⌘ N` (macOS), `⌃ N` (IntelliJ IDEA Classic (macOS)), `⌘ N` (macOS System Shortcuts), `Alt+Insert` (XWin), `Alt+Insert` (GNOME), `Alt+Insert` (KDE), `Alt+Insert` (Emacs), `Ctrl+N` (Sublime Text), `⌘ N` (Sublime Text (macOS)), `Alt+Insert` (VSCode), `⌃ ⏎` (VSCode (macOS)) and choose the Stylus predefined template from the list.

3. In the Program field, specify the path to the executable file:

* `stylus` for macOS and Unix.

* `stylus.bat` for Windows.

Type the path manually or click ![the Browse button](https://resources.jetbrains.com/help/img/idea/2026.3/app.general.ellipsis.svg) and choose the file location in the dialog that opens.

4. Proceed as described in [File Watchers](using-file-watchers.html).

## Configure syntax highlighting

You can configure Stylus-aware syntax highlighting according to your preferences and habits.

Procedure:

1. In the Settings dialog (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Comma` (VSCode), `⌘ Comma` (VSCode (macOS))), go to `Editor | Color Scheme | Stylus`.

2. Select the color scheme, accept the highlighting settings inherited from the defaults or customize them as described in [Colors and fonts](configuring-colors-and-fonts.html).

## Configure code style

Procedure:

1. Press `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Comma` (VSCode), `⌘ Comma` (VSCode (macOS)) to open settings and then select `Editor | Code Style | Style Sheets | Stylus`.

2. Use the controls  to configure code style in Stylus files.

## See also

### Procedures

[File Watchers](using-file-watchers.html) [Minifying CSS](compressing-css.html) [Sass, SCSS, Less, and PostCSS](transpiling-sass-less-and-scss-to-css.html) [Sass and SCSS in Compass applications](transpiling-compass-to-css.html)

### Reference

[File Watchers](settings-tools-file-watchers.html) [New Watcher Dialog](new-watcher-dialog.html)

### External Links

