Language Support

Language Support#

Serena provides a set of versatile code querying and editing functionalities based on symbolic understanding of the code across a wide range of programming languages. Equipped with these capabilities, Serena discovers and edits code just like a seasoned developer making use of an IDE’s capabilities would. Serena can efficiently find the right context and do the right thing even in very large and complex projects!

There are two alternative technologies powering these capabilities:

  • Language servers implementing the language server Protocol (LSP) — the free/open-source alternative.

  • The Serena JetBrains Plugin, which leverages the powerful code analysis and editing capabilities of your JetBrains IDE.

See the Features section for a detailed comparison of the capabilities provided by the JetBrains Plugin vs. language servers.

Language Servers#

Serena incorporates a powerful abstraction layer for the integration of language servers that implement the language server protocol (LSP). It even supports multiple language servers in parallel to support polyglot projects.

The language servers themselves are typically open-source projects (like Serena) or at least freely available for use.

We currently provide direct, out-of-the-box support for the programming languages listed below. Some languages require additional installations or setup steps, as noted.

  • AL

  • Angular
    (experimental; requires Node.js + npm, plus npm install having been run in the project root so that @angular/core is resolvable — without it, template-aware features silently return empty; subsumes typescript and html for .ts/.html files, so do not also list those)

  • Ansible
    (experimental; requires Node.js and npm; automatically installs @ansible/ansible-language-server; must be explicitly specified in the languages entry in the project.yml; requires ansible in PATH for full functionality) the upstream @ansible/ansible-language-server@1.2.3 supports hover, completion, definition, semantic tokens, and validation; document symbols, workspace symbols, references, and rename are not supported by this version)

  • Bash

  • C#
    (by default, uses the Roslyn language server (language csharp), requiring .NET v10+ and, on Windows, pwsh (PowerShell 7+); set language to csharp_omnisharp to use OmiSharp instead)

  • C/C++
    (by default, uses the clangd language server (language cpp) but we also support ccls (language cpp_ccls); for best results, provide a compile_commands.json at the repository root; see the C/C++ Setup Guide for details.)

  • Clojure

  • Crystal
    (requires Crystalline language server to be installed and available on PATH; note: Crystalline has limited go-to-definition support and does not support find-references)

  • Dart

  • Elixir
    (requires Elixir installation; Expert language server is downloaded automatically)

  • Elm
    (requires Elm compiler)

  • Erlang
    (requires installation of beam and erlang_ls; experimental, might be slow or hang)

  • F#
    (requires .NET v8.0+; uses FsAutoComplete/Ionide, which is auto-installed; for Homebrew .NET on macOS, set DOTNET_ROOT in your environment)

  • Fortran
    (requires installation of fortls: pip install fortls)

  • Go
    (requires installation of gopls)

  • Groovy
    (requires local groovy-language-server.jar setup via GROOVY_LS_JAR_PATH or configuration)

  • Haskell
    (automatically locates HLS via ghcup, stack, or system PATH; supports Stack and Cabal projects)

  • Haxe (requires Haxe compiler 3.4.0+ and Node.js; uses the vshaxe language server; automatically downloaded from Open VSX, or discovered from the vshaxe VSCode extension)

  • HLSL / GLSL / WGSL (uses shader-language-server (language hlsl); automatically downloaded; on macOS, requires Rust toolchain for building from source; note: reference search is not supported by this language server)

  • HTML (experimental; requires Node.js + npm)

  • Java

  • JavaScript
    (supported via the TypeScript language server, i.e. use language typescript for both JavaScript and TypeScript)

  • Julia

  • Kotlin
    (uses the pre-alpha official kotlin LS, some issues may appear)

  • Lean 4
    (requires lean and lake installed via elan; uses the built-in Lean 4 LSP; the project must be a Lake project with lake build run before use)

  • Lua

  • Luau

  • Markdown
    (must explicitly enable language markdown, primarily useful for documentation-heavy projects)

  • mSL (mIRC Scripting Language)
    (auto-installed; no external dependencies required — uses a custom pygls-based LSP server shipped with Serena; supports document symbols, workspace symbols, references, and go-to-definition for aliases, events, menus, dialogs, and CTCP handlers in .mrc files)

  • Nix
    (requires nixd installation)

  • OCaml (requires opam and ocaml-lsp-server to be installed manually; see the OCaml Setup Guide)

  • Pascal
    (uses Pascal/Lazarus, which is automatically downloaded; set PP and FPCDIR environment variables for source navigation)

  • Perl
    (requires installation of Perl::LanguageServer)

  • PHP
    (by default, uses the Intelephense language server (language php), set INTELEPHENSE_LICENSE_KEY environment variable for premium features; we also support Phpactor (language php_phpactor), which requires PHP 8.1+)

  • Python

  • R
    (requires installation of the languageserver R package)

  • Ruby
    (by default, uses ruby-lsp (language ruby); use language ruby_solargraph to use Solargraph instead.)

  • Rust
    (requires rustup - uses rust-analyzer from your toolchain)

  • Scala
    (requires some manual setup; uses Metals LSP)

  • SCSS / Sass / CSS (experimental; requires Node.js + npm; uses some-sass-language-server to handle .scss, .sass, and .css)

  • Solidity
    (experimental; requires Node.js and npm; automatically installs @nomicfoundation/solidity-language-server; works best with a foundry.toml or hardhat.config.js in the project root)

  • Swift

  • TypeScript

  • Vue
    (3.x with TypeScript; requires Node.js v18+ and npm; supports .vue Single File Components with monorepo detection)

  • YAML

  • JSON
    (experimental; must be explicitly added to the languages list; requires Node.js and npm)

  • Zig
    (requires installation of ZLS - Zig Language Server)

Support for further languages can easily be added by providing a shallow adapter for a new language server implementation, see Serena’s memory on that.

The Serena JetBrains Plugin#

The Serena JetBrains Plugin leverages the powerful code analysis capabilities of JetBrains IDEs. The plugin naturally supports all programming languages and frameworks that are supported by JetBrains IDEs.

When using the plugin, Serena connects to an instance of your JetBrains IDE via the plugin. For users who already work in a JetBrains IDE, this means Serena seamlessly integrates with the IDE instance you typically have open anyway, requiring no additional setup or configuration beyond the plugin itself.

  • See the JetBrains Plugin documentation for a high-level overview of its benefits and usage details.

  • See the Features section for a detailed comparison of the capabilities provided by the JetBrains Plugin vs. language servers.