Commit Graph
80 Commits
Author SHA1 Message Date
Dominik Jain a3322719f1 Add explicit docs page on privacy policy 2026-09-21 13:43:23 +02:00
maxwang 4b726894d0 docs: correct configuration key names and typos 2026-09-21 13:24:58 +02:00
Dominik Jain 18fa47bfcc Merge branch 'gpl' 2026-09-14 21:35:06 +02:00
Dominik Jain 6707cd9b7e Introduce component-based licensing: Serena GPL-3.0-or-later, SolidLSP MIT
The repository is licensed per component. SolidLSP (src/solidlsp,
test/solidlsp, test/resources) remains MIT-licensed and independently
reusable; the Serena application (src/serena, src/interprompt, scripts,
test/serena, docs) is licensed under GPL-3.0-or-later starting with the v2
licensing transition. The change is not retroactive: all releases and
commits up to v1.7.0 / 74c38a65 (tag mit-final) remain available under MIT.

Since MIT is GPL-compatible, a distribution combining both (such as the
serena-agent package) is as a whole subject to GPL-3.0-or-later, while the
SolidLSP files themselves stay MIT and can be extracted and used separately
under MIT terms. The distribution metadata therefore declares
GPL-3.0-or-later, with both license texts shipped alongside it.

Serena originally began under the GPL (v2) and was switched to MIT in
May 2025 following community requests. We consider that change a mistake;
the substantial changes in v2 make this the appropriate time to revert it.
We want the best version of Serena to remain free.

Changes:
* LICENSE is now the licensing overview; canonical license texts live in
  LICENSES/ (MIT.txt is the previous LICENSE verbatim, GPL-3.0-or-later.txt
  is the unmodified FSF text)
* pyproject.toml declares the PEP 639 license expression
  "GPL-3.0-or-later" and bundles LICENSE and LICENSES/* as license files;
  the deprecated MIT classifier is dropped and flake.nix declares gpl3Plus;
  README has per-component license badges and a License section
* SPDX-License-Identifier headers in all Python sources under src/ and
  scripts/, added by the new idempotent scripts/add_spdx_headers.py, which
  gen_prompt_factory.py also uses to keep the header on the generated
  module; existing third-party notices are preserved
* CLA.md: Contributor License Agreement (contributor retains copyright;
  grants a perpetual, irrevocable license including relicensing under any
  terms, incl. proprietary/commercial; patent grant; authority
  representations), to be enforced repository-wide via cla-assistant.io
* CONTRIBUTING.md, PR template and a new docs page explain the licensing
  boundary and the CLA workflow
2026-09-14 21:33:18 +02:00
Dominik Jain 283140e7ae Refactor external language server registration
* Apply object-oriented design
* Establish common interface via protocol LanguageServerIdLike
* Move all registration concerns to LanguageServerRegistry
2026-09-12 15:15:34 +02:00
Vitaly Ruhl 6000f16680 feat(solidlsp): prototype registrable language server adapters 2026-09-05 12:36:53 +02:00
Johan Larsson 25631db556 feat(solidlsp): add Fatou support
Refs #1931
2026-09-03 14:43:25 +02:00
1b459899ca Add Wolfram Language support via official LSPServer paclet (#1108)
Adds support for Wolfram Language (.wl, .wls files) using the official
WolframResearch LSPServer paclet, which communicates via stdio.
Requires Wolfram Mathematica 13.0+ or Wolfram Engine 12.1+.
The WolframKernel is located via WOLFRAM_PATH, the system PATH, common
install locations, or ls_path in ls_specific_settings.

Includes language server implementation, test repo, test suite
(skipped gracefully when WolframKernel is unavailable), and
documentation updates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-08-09 13:31:30 +02:00
weiconghe 1d44e9cfab feat: add Gleam language support via the Gleam compiler's bundled gleam lsp (#1765) 2026-08-08 19:44:27 +02:00
Evangelos Karatzas 76b94f3274 Add Nextflow language server support (#1815)
The Nextflow language server schedules a debounced (1s) AST update on every
didOpen/didChange, and LanguageService.references is the only request that does
not await it -- documentSymbol, codeLens, documentLink and semanticTokensFull
all do. A references request issued inside that window races the recompile of
the file it asks about and can return an empty list, which is what the macOS CI
runner hit. Send a documentSymbol request for the same file first, which blocks
server-side until the pending update has been applied.

Also compare reference paths using the platform separator in the tests, since
relativePath is OS-native and the hardcoded forward slashes failed on Windows.
2026-08-08 18:58:46 +02:00
Michael Panchenko 27d7d0e0ec Merge pull request #1778 from shiersa/feat/deno-language-server
feat: add Deno language server support
2026-08-08 18:50:38 +02:00
Merlin Hughes 600d3b2fad Scala: answer Metals' build-import prompt (#1769)
* scala: answer Metals' build-import prompt

Metals asks, via window/showMessageRequest, whether to import a workspace it
has not seen before. Serena registered no handler, so the request came back
`method 'window/showMessageRequest' not handled on client` and Metals logged
"Unexpected error initializing server" and gave up. No build server, no build
target, and every cross-file query answered by the fallback presentation
compiler — which cannot see past the file it is given.

A client cannot decline the question instead: Metals' `disableShowMessageRequest`
is server-side configuration, and its no-op fallback answers "Not now", which
imports nothing either. Answering is the only route to a build.

So answer the three prompts that lead to a build server, and dismiss anything
else with `null` — a prompt we do not recognise is one whose consequences we
cannot judge, and two of Metals' others offer to kill a process and to open a
window. "Don't show again" is never chosen; Metals persists that in the
project's own state.

Since answering yes lets Metals run the project's build tool,
`ls_specific_settings.scala.auto_import_build: false` declines instead.

* scala: name the build-tool choice as a gap, and test the setting

`Messages.ChooseBuildTool` ("Multiple build definitions found. Which would
you like to use?") offers the build tools' own executable names, and precedes
the import prompt wherever a workspace holds more than one kind of build. It
is dismissed like anything else unrecognised, so such a workspace is still
not imported — a deliberate choice, since picking one is a guess of a
different order, but one the comment and the setup guide should admit to
rather than claim every prompt on the path is answered.

Also: cover the route from `ls_specific_settings` to `auto_import_build`,
which nothing exercised, and correct the `ImportBuildChanges` message in the
fixtures, which had the notification variant's trailing full stop rather than
the request's own text.
2026-08-08 16:28:04 +02:00
shiersa 7a870878b8 feat: add Deno language server support
Add a Deno language server backed by the Deno CLI's built-in `deno lsp`,
serving TypeScript/JavaScript in Deno projects. Unlike the plain
typescript-language-server it understands Deno module resolution
(npm:/jsr:/https: imports) and the `Deno.*` global namespace.

It is experimental and must be selected explicitly via
`language_servers: [deno]`; it overlaps the TypeScript server on file
extensions, so it is not auto-detected. Requires the `deno` CLI on PATH.

Tests run in CI: the `deno` marker joins the other-langs batch, which now
installs Deno via denoland/setup-deno. Off-CI and wherever the CLI is
absent they skip through the central conftest guard, following the existing
pattern for toolchain-gated language servers. Hover is covered explicitly,
including hover on a `Deno.*` global, which is the capability this server
adds over the TypeScript one.
2026-08-06 23:21:42 +08:00
Ivan 29d07d4f6b fix(erlang): address functions by name/arity without the name path separator
Erlang LS identifies functions, types and parameterised macros as
`name/arity`, but `/` separates the components of a Serena name path, so
`create_user/4` was parsed as "symbol `4` nested inside `create_user`" and
could never match -- not even via the name path Serena itself reported for
the symbol. Browsing still worked, but find_referencing_symbols,
replace_symbol_body and insert_after_symbol were unusable on Erlang
functions.

Normalize the name to `create_user#4` instead. `#` cannot occur in an
unquoted Erlang atom, so it can never collide with a real name, unlike `@`.
The arity is kept rather than stripped because it is part of a function's
identity in Erlang: create_order/3 and create_order/2 are different
functions and may coexist in one module.

Also document the "no `/` in symbol names" rule on _normalize_symbol_name,
which is what the next backend for such a language needs to know.
2026-08-03 01:37:36 +02:00
xormania 7d08146436 Docs: add the language servers missing from the supported-language lists
Several backends that are registered and tested were absent from the
user-facing lists: six from the README (pascal, qml, rego, systemverilog,
terraform, vue), six from the Language Support docs page (matlab,
powershell, rego, systemverilog, terraform, toml), and two from the
commented language-server list in the project template
(python_basedpyright, qml).

The drift is long-standing and runs in both directions: matlab,
powershell and toml reached the README but never the docs page; pascal,
vue and qml reached the docs page but never the README; terraform, rego
and systemverilog reached neither, the oldest of them since 2025-07-06.
The two template omissions are the most recent, from #1705 and #1635.
The guide's Documentation step does ask for the README and the docs page,
so most of this was missed rather than unspecified; it does not mention
the project template at all.

The setup notes on the new docs-page entries name the versions Serena
actually pins, taken from the corresponding language-server modules:
MATLAB extension 1.3.9, PowerShell Editor Services 4.4.0 and
PSScriptAnalyzer 1.25.0, Verible v0.0-4051-g9fdb4057, terraform-ls
0.36.5, and Taplo 0.10.0. The PowerShell entry mentions both automatic
installations, since enabling that backend also runs Save-Module against
the user's configured PowerShell repository.

The new Regal link points at open-policy-agent/regal, the current
canonical repository; StyraInc/regal still redirects there, and the
adapter and the CI workflow have not been changed.

The template block is refreshed from scripts/print_language_list.py,
which is why its column widths change: python_basedpyright is longer than
any identifier the previous list contained. The pointer directly below it
still named the Language enum, renamed to LanguageServerId in d2cf18dd.
2026-07-26 11:40:23 +02:00
Tyce Herrman 96ee9b65e2 Add BasedPyright as alternative LSP for Python (#1705) 2026-07-21 20:11:32 +02:00
weiconghe 9825316c23 feat: add QML language support via Qt's qmlls (#1635) 2026-07-13 13:54:23 +02:00
wangzhe 6e7f0e648d Add pyrefly as alternative lsp for python 2026-06-28 20:53:39 +08:00
Fabio Capucci 91a18eb465 add phpantom lsp for php (#1554) 2026-06-28 14:46:27 +02:00
PETRO YAKOVYSHYN 3975a91bfe Add Unreal Engine 5 specific ignores, raises, docs and tests for C/C++ (#1564) 2026-06-25 11:23:25 +02:00
BBPandKoscheiiB 5d44d017c8 feat(solidlsp): add LaTeX language server via texlab (#1600)
Register the LATEX language (.tex/.bib/.sty/.cls) backed by texlab,
downloaded as a sha256-verified single-binary from GitHub Releases
(v5.25.1) across macOS/Linux/Windows. Document symbols expose the
sectioning hierarchy; definitions/references cover labels and citations.

Includes a smoke-test fixture repo and basic document-symbol tests.

Co-authored-by: KoscheiiB <KoscheiiB@users.noreply.github.com>
2026-06-25 11:21:39 +02:00
Edward Muller ffd5dfd3e7 Add CUE language support via cue lsp (#1474) 2026-05-18 22:12:40 +02:00
Eduardo Magalhães 04630c1abb Add Svelte support (#1457)
Uses svelte LS and typescript LS as companion server
2026-05-14 12:52:34 +02:00
Erik M JacobsandClaude Sonnet 4.6 1ab1c460cb feat: add GDScript (Godot Engine) language server support
Closes #1446. Adds Language.GDSCRIPT backed by a new TCPLanguageServer
that extends LanguageServerInterface directly — no intermediate transport
abstraction layer.

Changes:
- ls_process.py: adds TCPConnectionInfo dataclass and TCPLanguageServer,
  a LanguageServerInterface subclass that manages a TCP socket directly
  (mirroring how StdioLanguageServer manages a subprocess). Stop order
  closes the socket before the BufferedReader wrapper to avoid a deadlock
  where BufferedReader.close() blocks on its internal read lock while
  readline() holds it waiting for data.
- ls_config.py: adds Language.GDSCRIPT with .gd/.gdscript file matcher.
- language_servers/godot_language_server.py: GodotLanguageServer connects
  to the Godot editor's TCP LSP (port 6008, same for Godot 3 and 4),
  registers Godot-specific notification handlers, and performs the
  initialize/initialized handshake. Godot version is auto-detected from
  config_version in project.godot.
- docs: adds GDScript to the language support list and a dedicated setup
  guide covering prerequisites, setup steps, performance characteristics
  (no workspace/symbol support → first full scan is slow, disk cache
  persists across sessions), and known limitations.

Tested against Godot 4.6.1 on Linux (Fedora 41): TCP connection,
initialize handshake, textDocument/documentSymbol returning full symbol
tree, and clean shutdown in <1s.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 16:20:54 -04:00
Данилов Роман fb9c822178 feat: add BSL (1C:Enterprise) language server support (#1430)
Required bumping of java to 21 in CI
2026-05-11 10:09:51 +02:00
Vitalijs Kuprins 249f6b07f9 Add Ada / SPARK language support via AdaCore Ada Language Server (#1461)
Introduces Language.ADA backed by AdaCore's Ada Language Server (ALS),
the standard LSP-compliant server for Ada — and SPARK, since both share
the .ads/.adb file extensions and ALS distinguishes SPARK by source-level
pragmas/aspects rather than by file type.

ALS is auto-downloaded from AdaCore's GitHub releases (linux-x64/arm64,
darwin-x64/arm64, win32-x64) using the LanguageServerDependencyProviderSinglePath
pattern, with SHA256 verification per-platform. Users can override the
downloaded binary by setting ls_specific_settings.ada.ls_path to a
pre-installed ada_language_server (e.g. from Alire, GNAT Studio, or the
VS Code Ada extension).

Test repo is a minimal multi-file GNAT project (default.gpr, helper.ads,
helper.adb, main.adb). Tests modelled on test_php_basic.py: ls_running,
find_definition (within/across), find_references (within/across),
find_symbol, document_symbols, hierarchical document symbols,
bare-symbol-name sanity check.
2026-05-09 17:49:12 +02:00
3122384822 feat: Add Angular, HTML, and SCSS / Sass language servers (#1439)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Pavlo Basanets <Pavlo_Basanets@epam.com>
2026-05-05 14:33:51 +02:00
e4da2db1d7 feat: add JSON language server support via vscode-json-languageserver (#1404)
* feat: add JSON language server support via vscode-json-languageserver (fixes #1391)

Add support for JSON files using the `vscode-json-languageserver` npm package
from Microsoft. This provides document symbol navigation and hover information
for JSON files.

The implementation follows the existing YAML language server pattern:
- Auto-installs `vscode-json-languageserver` via npm on first use
- Requires Node.js and npm
- Marked as experimental (must be explicitly specified)

Co-Authored-By: Octopus <liyuan851277048@icloud.com>
Co-authored-by: octo-patch <octo-patch@github.com>
Co-authored-by: Michael Panchenko <35432522+MischaPanch@users.noreply.github.com>
2026-04-24 11:41:50 +02:00
Dominik Jain 2d767e2fa9 Remove obsolete docs file 040_comparison-to-other-agents 2026-04-20 14:17:04 +02:00
ab67ecab3b feat: add mSL (mIRC Scripting Language) support (#1315)
* feat: add mSL (mIRC Scripting Language) support

Add language server support for mIRC Scripting Language (.mrc files).
mSL is used in mIRC and AdiIRC IRC clients for scripting bots, games,
and automation.

The implementation uses a custom Python-based LSP server (pygls) that
parses aliases, events, menus, dialogs, and CTCP handlers. Dependencies
(pygls, lsprotocol) are installed in an isolated venv on first use.

Includes test repo, integration tests, and documentation updates.

* style: apply ruff formatting to msl_language_server.py

* fix: remove INITIALIZE handler that crashes pygls 2.x

pygls 2.x handles the initialize request internally. Overriding
it via @server.feature(lsp.INITIALIZE) causes the LSP subprocess
to crash. Removing the handler lets pygls auto-advertise capabilities
based on registered features (document_symbol, workspace_symbol).

* fix: update embedded LSP script for pygls 2.x

pygls 2.x moved LanguageServer from pygls.server to pygls.lsp.server.
Update import and bump requirement from pygls>=1.3.0 to pygls>=2.0.0.

* refactor: ship mSL LSP as package module, not runtime disk write

Per maintainer feedback: the mSL LSP is a Python script, so it should
ship as a module inside the package rather than being written to disk
at runtime.

Changes:
- Extract embedded LSP script to msl_lsp_server.py (proper module)
- Simplify MslLanguageServer: remove venv creation, disk writes,
  _create_msl_lsp_files(). DependencyProvider now just returns
  sys.executable and launches the sibling module directly.
- Add pygls>=2.0.0 and lsprotocol>=2023.0.0 to pyproject.toml deps

* fix: regenerate uv.lock after upstream v1.1.0 merge

* feat(msl): add references, definitions, and expand test coverage

- Add textDocument/references handler for cross-file alias reference finding
- Add textDocument/definition handler for go-to-definition support
- Handle $ prefix on cursor position for mSL identifiers
- Fix pre-existing mypy error in agent.py (dict[str, object] -> dict[str, str | int])
- Add MSL to _LANGUAGE_PYTEST_MARKERS in conftest.py
- Add MSL parametrized cases to test_find_symbol_stable and test_find_symbol_references_stable
- Expand test repo with cross-file reference examples (main.mrc <-> utils.mrc)
- Add within-file and cross-file reference tests to test_msl_basic.py
- Update docs and CHANGELOG to reflect expanded capabilities

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* style: apply ruff formatting to msl_lsp_server.py

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(msl): add hover handler, fix cross-file references via filesystem scan

Root causes of 4 CI test failures:
- textDocument/hover was not implemented (test_find_symbol_stable needs it)
- references/workspace_symbol/definition only searched opened documents,
  missing files not explicitly opened by the client
- pygls.uris.to_fs_path returns lowercase drive letters on Windows,
  causing URI mismatch with the framework's repository path comparison

Fixes:
- Add textDocument/hover handler returning definition snippets in Markdown
- Add _get_all_mrc_files() to scan workspace filesystem for all .mrc files
- Read workspace roots from server.workspace (pygls 2.x API) instead of
  broken monkey-patching of server.lsp
- Use pathlib.Path.resolve() to normalize drive letter casing on Windows
- Simplify __main__ to just server.start_io()

All 12 tests pass locally (10 solidlsp + 2 serena_agent integration).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* MSL language: removed unnecessary Dep. provider

* Changelog

* deps

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Michael Panchenko <michael.panchenko@oraios-ai.de>
2026-04-13 08:47:51 +02:00
Michael Panchenko 812b6e066a Merge branch 'main' into v1.1-develop
# Conflicts:
#	CHANGELOG.md
2026-04-11 15:27:38 +02:00
Tobias Jansing e9b6c0ff85 Add Haxe language support via vshaxe/haxe-language-server
Includes full setup with ls provider, tests, docs, etc.
2026-04-10 15:07:23 +02:00
Dominik Jain 9722f68796 Merge remote-tracking branch 'origin/main' into v1.1-develop 2026-04-09 15:26:35 +02:00
Dominik Jain 25f5f5095f Adjust documentation to use uv tool installation as the main way of running things
* Add installation, update, etc.
* Remove use of `<serena>` and obsolete uvx examples.
2026-04-07 17:36:44 +02:00
Jochen Seeber d8bf1365c3 Add Crystal language support 2026-04-07 17:15:09 +02:00
Dominik Jain d958f70103 Improve language server docs 2026-04-04 20:19:57 +02:00
Dominik Jain 749bb815ae Adapt docs generation to new integrated README content 2026-04-04 20:00:22 +02:00
Dominik Jain 6604efd778 Streamline 'Language Support' page, removing some overlap with other pages 2026-04-02 21:03:01 +02:00
Dominik Jain 2d78040cf9 Auto-generate docs pages from README: About & Features 2026-04-02 18:21:05 +02:00
Michael Panchenko 9f63606d7b Update README and About section with enhanced feature presentation for v1 2026-04-02 17:38:03 +02:00
Sergey Belov ff1b9057c0 Add limited Ansible language server support (#1170)
References and definition not working yet. Since ansible resolves same files as yaml LS, we will need to add disambiguation later.

Work in progress, improvements on the language server itself are being worked on, ansible support in Serena will be extended accordingly in the future.
2026-03-16 22:40:58 +01:00
Dominik Jain 7a1dcfeeda Auto-generate the tool list in the documentation 2026-03-15 17:26:20 +01:00
Vinh Tran 6d6f55308f feat(solidlsp): add Solidity language server support (#1156)
Integrates the Nomic Foundation @nomicfoundation/solidity-language-server
as a new Language.SOLIDITY backend (experimental). Supports .sol files with
go-to-definition, find references, document symbols, hover, and diagnostics.
The server is automatically installed via npm on first use.
2026-03-13 13:14:09 +01:00
StayBlue b3a6045f7e Add Luau language support (#1152) 2026-03-12 11:58:45 +01:00
Dan Rosen 09c007d1e1 Add Lean 4 language support (#1137) 2026-03-12 11:32:31 +01:00
Dominik Jain f51ba805f0 Add comment explaining that JavaScript is supported via the TypeScript LS
Resolves #1141
2026-03-09 23:29:19 +01:00
Dominik Jain e7ae10f7cd Update supported IDEs, move OCaml info to the proper place 2026-03-04 22:22:41 +01:00
DevonandClaude Opus 4.6 dbd7bf7596 Add HLSL and related languages support through shader-language-server (#1093)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 19:28:50 +01:00
Dominik Jain 736a6ed103 Update list of supported IDEs 2026-03-04 12:05:53 +01:00
Dominik Jain 9c336cc339 Update language requirements for C# and F#
[skip ci]
2026-03-02 19:29:00 +01:00