300 Commits
Author SHA1 Message Date
Dominik Jain 352b3d3fed Allow to overrride entries of initializationOptions via LS-specific settings 2026-07-03 12:49:56 +02:00
Dominik Jain 9157e25671 Improve docs 2026-07-03 12:25:18 +02:00
Dominik Jain 81b664bb32 Merge branch 'main' into ls-init-options
Conflicts:
	src/solidlsp/language_servers/typescript_language_server.py
2026-07-03 11:41:18 +02:00
bymebyu 81b1bc804d TypeScript/VTS: event-based indexing wait and no automatic typing acquisition (#1639)
* TypeScript/VTS: event-based indexing wait, no automatic typing acquisition

- Set disableAutomaticTypingAcquisition in initializationOptions (TS and VTS)
  so tsserver does not download type packages from the network during
  language server initialization.
- Replace the fixed 2-second wait before cross-file reference requests with
  $/progress-based indexing tracking: a pre-open hook arms the tracking
  (expect_indexing) before didOpen, then the request waits until indexing
  progress drains (wait_for_indexing), bounded by a configurable
  'indexing_timeout' (ls_specific_settings, default 30s). If tsserver does
  not start reporting progress within a 2-second grace period (the previous
  fixed wait), the request proceeds — so the fast path is never slower than
  before, while slow indexing is actually awaited instead of guessed at.
2026-07-03 11:38:53 +02:00
Dominik Jain c904efed5e SolidLSP: Allow workspace folders to be flexibly configured across all language servers
that use the newly introduced InitializeParamsBuilder

- Add new configuration option `ls_workspace_folders` to allow indexed source folders to be specified
  explicitly. In monorepos, this allows the set of indexed folders to be restricted to a subset of
  the repository. #1627
- Rename configuration option `additional_workspace_folders` to `ls_additional_workspace_folders`
  and support the option across all language servers that use an InitializeParamsBuilder
  (previously limited strictly to the TypeScript server).
  Moved the option from SolidLSPSettings to LanguageServerConfig, where it belongs.

Apply InitializeParamsBuilder in TypeScriptLanguageServer and its subclasses.
2026-07-03 01:05:40 +02:00
Dominik Jain 8c418dc799 Support ls_base_cmd in LanguageServerDependencyProviderBaseCommand
ls_base_cmd allows the user to override the base command with a
multi-element command (e.g. ["npx", "-y", "/my/local/package"]),
generalising ls_path, which it takes precedence over.
2026-07-02 21:59:46 +02:00
Dominik Jain 60abdd5297 Support ls_args and ls_extra_args centrally in LanguageServerDependencyProviderBaseCommand
* ls_args overrides the internal command builder, fully defining the arguments
* ls_extra_args appends additional arguments to the launch command
2026-07-02 21:59:46 +02:00
Jordan CarneyandDominik Jain dcbd8ce064 Add activation_command to project config (#1623)
Add activation_command to project config

Adds two optional fields to ProjectConfig:
- activation_command: shell command run in the project root before the
  language backend (LSP or JetBrains) initialises
- activation_command_timeout: safety backstop (default 180s); on expiry
  the process tree is killed and activation continues

The command is only executed for trusted projects (trusted_project_path_patterns).
Exit code is the primary completion signal; failures and timeouts are logged
but never abort activation (no return channel to the LLM at that point).

Closes #1606

---------

Co-authored-by: Dominik Jain <dominik.jain@oraios-ai.de>
2026-07-01 18:12:05 +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
Devin 68a4af4ac1 Add CodeBuddy agent integration (#1581) 2026-06-28 13:00:41 +02:00
PETRO YAKOVYSHYN b7e7b86dd1 Unreal Engine: reorder the setup guide, fail on an empty compile_commands.json (#1610) 2026-06-28 12:59:29 +02:00
Dominik Jain 5a867ff3fe Consider ls_specific_settings in project configurations only for trusted projects 2026-06-26 13:05:54 +02:00
Dominik Jain d7a2026656 Add notion of trusted projects #1608 2026-06-26 13:05:54 +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
Tomi P. Hakala b5b9cc4ffc Fix find_project_root hijacking git worktrees nested under a Serena project (#1550)
* Fix find_project_root hijacking git worktrees nested under a Serena project

find_project_root searched all ancestor levels for .serena/project.yml
before ever looking for .git. A git worktree whose own .git is a pointer
file, nested under a directory that is an explicit Serena project, was
resolved to the ancestor project instead of the worktree. With CLI agents
that launch via --project-from-cwd (Claude Code, Codex, Gemini), this
silently bound the server to the wrong working tree: reads returned stale
symbols and edits landed in the parent repo.

Walk up in a single pass so the nearest project boundary wins, whether it
is a .serena/project.yml or a .git (dir or worktree/submodule pointer
file). Same-level behavior is unchanged. Adds a regression test.

* Document worktree project-root fix in changelog and usage docs
2026-06-07 18:05:01 +02:00
Dominik Jain 1a3943b917 Add configuration option jetbrains_launch_command, allowing Serena to spawn IDE instances automatically
upon project activation

Serena searches for the plugin instance upon project activation, and if the instance is not found
and the setting is configured, launches a new IDE instance based on the command
2026-06-02 17:08:17 +02:00
Dominik Jain a10c3e1c5a Update additional usage pointers
* Remove obsolete/outdated content
* git-worktree:
  - Remove incorrect recommendation to copy the entire .serena folder
    in order to retain the cache (cache contains abs. paths)
  - Recommend to add the .serena folder to version control instead
    (which will not include the cache folder)

Relates to #805
2026-06-02 13:46:36 +02:00
Felix Rath 7b9fc9c5b7 fix(nix): Add Linux-support for the tray manager in AppIndicator trays
Assisted-by: gpt-5.5
2026-06-01 15:17:36 +02:00
Petr Devyaterikov 7bf30080f6 typescript_vts: add initialization_options pass-through (#1507)
* typescript_vts: add initialization_options pass-through

Extends ls_specific_settings["typescript_vts"] with an optional
initialization_options key — a dict forwarded to vtsls via all three
LSP configuration channels:

- the initialize request (initializationOptions field),
- a workspace/didChangeConfiguration notification right after initialize,
- and responses to workspace/configuration pulls, looked up per section
  (e.g. "typescript", "vtsls", "javascript", or dotted paths like
  "typescript.tsdk").

All three channels are necessary because different parts of vtsls read
settings from different places — notably typescript.tsdk, which vtsls
pulls via workspace/configuration rather than reading from
initializationOptions. Without the pull-answer, setting tsdk had no
effect.

Primary use case: Yarn Plug'n'Play projects. Running
`yarn dlx @yarnpkg/sdks vscode` in the project root generates
.yarn/sdks/typescript/lib/tsserver.js, a PnP-aware tsserver. The user
then points vtsls at it with:

    ls_specific_settings:
      typescript_vts:
        initialization_options:
          typescript:
            tsdk: "<...>/.yarn/sdks/typescript/lib"
          vtsls:
            autoUseWorkspaceTsdk: true

autoUseWorkspaceTsdk is required alongside tsdk because, in a headless
LSP context, there is no UI prompt to confirm switching to the
workspace TypeScript version. See yioneko/vtsls#169 for the recipe.

Default behaviour is unchanged — the field is optional, omitted from
the initialize params and didChangeConfiguration when unset or empty,
and workspace/configuration continues to answer empty sections.
2026-05-27 13:31:57 +02:00
Michael Panchenko d0dbed3779 Shorten command in installation instructions
--prerelease=allow is no longer necessary (pythonnet was bumped) and @latest is not needed either (same effect as without it)
2026-05-26 17:10:14 +02:00
Edward Muller ffd5dfd3e7 Add CUE language support via cue lsp (#1474) 2026-05-18 22:12:40 +02:00
Dominik Jain a59e12adaa Merge remote-tracking branch 'origin/main' into feature/rename-memory-references
Conflicts:
  src/serena/tools/file_tools.py
2026-05-16 15:28:32 +02:00
Dominik Jain 2b52dd7636 Improve memory management documentation and memory terminology
* Improve memory_maintenance memory
* Drop "routing" terminology, use "references" instead
2026-05-14 23:54:17 +02:00
Michael Panchenko 833f518c3d Changelog, minor fixes 2026-05-14 22:49:06 +02:00
Michael Panchenko 27b3622c38 Improve fuzzy memory name matching logic and UX in CLI 2026-05-14 22:49:06 +02:00
Michael Panchenko 461b7ebd4b Memory management:
* Add renaming with auto-updated references
  * More specific identifier naming (use term unmarked_memories)

Improve memory documentation:
  * Explain reference concept
  * Explain rationale

Add memory CLI commands
  * CRUD operations
2026-05-14 22:48:51 +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
Berkay Çelik c3d9aeafae Docs, minor 2026-05-14 12:36:24 +02:00
Erik M JacobsandClaude Sonnet 4.6 ef22522ee2 fix(gdscript): address review feedback — configurable port/timeout, safer version detection
- Rename LSP_PORT → DEFAULT_GODOT_LS_PORT and add DEFAULT_GODOT_REQUEST_TIMEOUT
- Make port and request_timeout overridable via ls_specific_settings["gdscript"]
  by reading self._custom_settings in _create_language_server_interface
- Move self._conn_info setup into _create_language_server_interface so it can
  consume ls_specific_settings (which requires super().__init__ to have run)
- Fix _detect_godot_version to return int | None instead of always defaulting to 4:
  use an explicit config_version→major dict; return None for unrecognized versions
  and detection failures; caller logs warning on None
- Update setup guide and configuration reference docs with new settings

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 10:03:46 -04: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
Michael Panchenko 077dba4d21 Clojure LSP: improve module resolution by parsing source path providers 2026-05-08 01:40:17 +02:00
Michael Panchenko 53d5e6e898 Merge branch 'main' into hook_extension
# Conflicts:
#	src/solidlsp/ls_config.py
2026-05-05 17:24:30 +02:00
a-simeshin ba6170bab1 feat(jdtls): surface Lombok-generated methods in document symbols, bump jdtls version (#1434)
* feat(jdtls): surface Lombok-generated methods in document symbols

JDTLS' DocumentSymbolHandler filtered out every SourceMethod where
JDTUtils.isGenerated() was true, so Lombok-synthesised methods (getX/setX,
builder(), equals/hashCode/toString, withX, fluent accessors, ...) never
reached the LSP client. As a result Serena's symbol-aware tools — find_symbol,
get_symbols_overview, replace_symbol_body, insert_before_symbol,
insert_after_symbol — could not see, address or edit any Lombok-generated
member; only search_for_pattern / replace_content (text-based) worked.

Upstream introduced an opt-in preference java.symbols.includeGeneratedCode
in eclipse-jdtls/eclipse.jdt.ls#3706 (merged 2026-02-24) and surfaced it
through redhat-developer/vscode-java#4335. First vscode-java release with
the new JDTLS build is v1.53.0 (2026-02-26). Serena was pinned to v1.42.0-561,
well before the fix existed.

Changes:
- New ls_specific_settings.java.lombok_show_generated setting (default true);
  forwarded to JDTLS as java.symbols.includeGeneratedCode in initialize
  params. Older servers ignore the unknown preference key silently.
- Bump bundled vscode-java DEFAULT 1.42.0-561 -> 1.54.0-923 (brings JRE
  21.0.10, Lombok 1.18.39 and Equinox launcher 1.7.100). INITIAL stays at
  1.42.0-561, so per the per-version install-dir convention from #1438 the
  new build lands in vscode-java-1.54.0-923/ while legacy vscode-java/
  caches and any explicit vscode_java_version: '1.42.0-561' override keep
  working.
- New VsixResourcePaths dataclass + INITIAL/DEFAULT_VSCODE_JAVA_PATHS pin
  the JRE / Lombok / launcher filenames *inside* the VSIX. Without this,
  bumping the archive would break users on legacy 1.42.0-561 because
  resource paths inside the archive change between releases. Resolution
  mirrors SHA pinning: known versions get their pinned paths; any other
  version raises SolidLSPException with a pointer to upstream-jdtls mode
  (which derives paths dynamically and needs no pinning).
- Drop dead 'static/vscode-java/...' placeholder in initialize params; the
  real runtimes[] is overwritten below from runtime_dependency_paths
  .jre_home_path, which is correct in both default-VSIX and upstream-jdtls
  modes.
- Test fixtures: Lombok provided dep in test_repo/pom.xml plus
  LombokModel / FluentLombokModel / DefaultGreeter covering @Data, @Builder
  (toBuilder=true), @With, @Delegate, @AllArgsConstructor, @NoArgsConstructor
  and @Accessors(fluent=true). Regression test in test_java_basic.py
  asserts every generated-method shape lands in document symbols.

Closes #1432
2026-05-05 15:06:04 +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
Michael Panchenko 6eb3587dcc Hooks: adjust output to work for codex, extended docs 2026-05-04 17:51:21 +02:00
Michael Panchenko 2c03fe3318 Docs, minor 2026-05-04 14:30:40 +02:00
Michael Panchenko 64e604630e Merge branch 'main' into feature/cross-package-typescript-references
# Conflicts:
#	CHANGELOG.md
#	src/solidlsp/ls.py
2026-05-04 14:26:20 +02:00
meir lixenbrg 862af5b42c Add documentation for additional_workspace_folders
- Add 'Additional Workspace Folders' section to project configuration docs
- Add cross-reference note to TypeScript LS settings section
- Include configuration example and usage notes
2026-05-04 14:22:20 +02:00
Sam CarsonandMichael Panchenko 16d1a30397 hooks: extend auto-approve to Claude Code's auto permission mode (#1445)
* hooks: extend auto-approve to Claude Code's auto permission mode

Closes #1386

---------

Co-authored-by: Michael Panchenko <35432522+MischaPanch@users.noreply.github.com>
2026-05-04 11:27:09 +02:00
Dominik Jain 3a0afadf47 Improve project creation/config docs 2026-05-02 20:53:20 +02:00
Dominik Jain dfe1c3d7d1 Revamp mode selection
* Breaking change: Projects (project.yml) can no longer override `base_modes`.
   Instead, they can define `added_modes` to add modes on top of base and default modes.
   This allows `base_modes` to be fully applied for the computation of the base toolset
   as they are no longer dynamic.
 * Serena's default configuration now uses `interactive` and `editing` as `base_modes`
   instead of as `default_modes`.
2026-04-29 18:05:38 +02:00
a-simeshin a3565ef60e Merge pull request #1415 from a-simeshin/feat/jdtls-path-override
Allows setting paths for JDTLS and Lombok, thus allowing using Serena with JDTLS without forcing downloads
2026-04-28 09:31:53 +02:00
Dominik Jain 7c50041d14 Improve Claude Code client setup documentation 2026-04-27 13:35:06 +02:00
Michael Panchenko 1a83060b05 Extended interprompt and moved cc-system-prompt-override command to prompts subcommand
Also added print-prompt-template subcommand
2026-04-26 16:25:58 +02:00
Michael Panchenko f4b035698c Docs: added explanation on system prompt override for CC 2026-04-26 12:51:26 +02:00
Dominik Jain b331183c76 Update documentation to mention JetBrains debug tool 2026-04-24 13:27:23 +02:00