uf0.2.0

Type to search every page and heading. Page titles only, while the full index loads.

All pages

Editors

JetBrains IDEs

WebStorm and IntelliJ IDEA Ultimate parse and check JavaScript themselves, and no language server can take that away. What you can do is set the IDE's JavaScript to Flow, turn its TypeScript service off, and add uf's diagnostics and formatting through the LSP4IJ plugin. This page says which parts of that are verified and which are not.

What you will be able to do: get uf's diagnostics, hover, definitions, completion, quick fixes and formatting in a JetBrains IDE, and know which of the IDE's own warnings will remain.

What you need first: uf installed, a project with a uf.config.js, and a JetBrains IDE with JavaScript support: WebStorm, or IntelliJ IDEA Ultimate.

1. Add uf's server through LSP4IJ

JetBrains' own language server API is only for plugins, and there is no JetBrains plugin for uf. LSP4IJ, Red Hat's LSP client plugin, runs any server:

  1. Settings → Plugins: install LSP4IJ.
  2. Settings → Languages & Frameworks → Language Servers → +, then Template → Import from custom template…, and select the template directory. uf editor install jetbrains writes it to ~/.local/share/uf/editors/jetbrains/lsp4ij-template, and a uf checkout has it at editors/jetbrains/lsp4ij-template.
  3. It fills in uf lsp --cwd $PROJECT_DIR$ for *.js, *.mjs and *.cjs (as javascript) and *.jsx (as javascriptreact). The README has the same values to type by hand, and the command for a project-pinned uf.

LSP4IJ keeps its servers in IDE-wide settings, not in the project, so each person does this once per IDE. It cannot be committed.

2. Set the IDE's JavaScript to Flow

Settings → Languages & Frameworks → JavaScript → JavaScript language version: Flow. This makes the IDE's parser accept Flow's type annotations. The IDE stores the choice in the project's .idea/misc.xml, under the JavaScriptSettings component's languageLevel, so it can be committed if you commit .idea/.

On the same page, leave Flow package or executable empty and Use Flow server for unchecked. Those options run Meta's flow server, which needs a .flowconfig and flow-bin. In a uf project, uf is the Flow server.

3. Turn the TypeScript service off

Settings → Languages & Frameworks → TypeScript: uncheck TypeScript language service. This is per project.

What is not verified

The JavaScript plugin is closed source, and no JetBrains IDE runs in this repository's CI. These points come from JetBrains' documentation (2026.2) and were not checked in an IDE:

  • the exact languageLevel value the Flow choice writes;
  • whether turning off the TypeScript language service also silences it for .js files, not only .ts;
  • whether the IDE's Flow parser accepts component, hook, match and renders. If it does not, the IDE marks those lines as syntax errors itself. Those errors are the IDE's, and uf's diagnostics appear beside them rather than in place of them.

What is tested is the server behind LSP4IJ: tests/library/lsp.test.js drives uf lsp over the protocol, including --cwd.

Check that it worked

Open the LSP console (View → Tool Windows → Language Servers). uf should be running for the project. A Flow file's problems should include entries from uf. Run Reformat Code, then uf fmt --check in a terminal: they agree when the server read the project's uf.config.js. After editing uf.config.js, restart the server from its context menu in the console.

Edit this pagedocs/app/guide/editors/jetbrains/$page.mdx