docs/01-about/020_programming-languages.md
Serena provides a set of versatile code querying and editing functionalities based on symbolic understanding of the code. 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:
You can choose either of these backends depending on your preferences and requirements.
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.
@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/[email protected] supports hover, completion, definition,
semantic tokens, and validation; document symbols, workspace symbols, references, and rename
are not supported by this version)csharp), requiring .NET v10+ and, on Windows, pwsh (PowerShell 7+);
set language to csharp_omnisharp to use OmiSharp instead)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.)pip install fortls)gopls)GROOVY_LS_JAR_PATH or configuration)hlsl); automatically downloaded;
on macOS, requires Rust toolchain for building from source;
note: reference search is not supported by this language server)typescript for both JavaScript and TypeScript)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)markdown, primarily useful for documentation-heavy projects)PP and FPCDIR environment variables for source navigation)php), set INTELEPHENSE_LICENSE_KEY environment variable for premium features;
we also support Phpactor (language php_phpactor), which requires PHP 8.1+)languageserver R package)ruby); use language ruby_solargraph to use Solargraph instead.)@nomicfoundation/solidity-language-server;
works best with a foundry.toml or hardhat.config.js in the project root)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.
As an alternative to language servers, 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, including IntelliJ IDEA, PyCharm, Android Studio, WebStorm, PhpStorm, RubyMine, GoLand, and potentially others (Rider and CLion are unsupported though).
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. This approach offers several key advantages:
Even if you prefer to work in a different code editor, you can still benefit from the JetBrains plugin by running a JetBrains IDE instance (most have free community editions) alongside your preferred editor with your project opened and indexed. Serena will connect to the IDE for code analysis while you continue working in your editor of choice.
<p>
<a href="https://plugins.jetbrains.com/plugin/28946-serena/">
</a>
</p>
See the JetBrains Plugin documentation for usage details.