Skip to content
CAI
Software that uses CAICheck a score

scalameta/metals

66.4

Adequate · 27 September 2026

106.1k

lines of production code

Scala

primary language

3

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a Scala language server that provides comprehensive IDE capabilities, including code completion, navigation, refactoring, and debugging for Scala and Java projects. It integrates with various build tools like SBT, Mill, Gradle, and Maven to manage project structure and dependencies while supporting modern features such as worksheets and AI agent interaction via the Model Context Protocol. The server also offers robust testing discovery across multiple frameworks and maintains detailed indexing for efficient symbol resolution and code intelligence.

How it got here

2016–2019 — Presentation compiler and indexing overhaul

62 changes.

This period focused on restructuring the language server's core infrastructure by introducing a new mtags indexing pipeline and consolidating presentation compiler interfaces. Significant work included expanding test coverage for symbol resolution, hover, and completion features, while also adding support for new capabilities like tree views, type hierarchy navigation, and symbol renaming.

2020–2022 — Scala 3 support and architecture modernization

40 changes.

This period focused on modernizing the codebase architecture by introducing unified interfaces for code actions, lenses, and test discovery, while significantly expanding Scala 3 support through new parsing, document symbols, and folding range providers. The team also overhauled the Scala 2 presentation compiler implementation and enhanced debugging, formatting, and diagnostic capabilities to improve IDE reliability and developer experience.

2023–2026 — Java support, MCP integration, and architectural refactoring

33 changes.

This period focused on expanding language support by introducing a Java presentation compiler and implementing a Model Context Protocol (MCP) server for AI agent integration. Concurrently, the codebase underwent significant architectural refactoring to modularize the language server and improve startup robustness, while extensive test suites were added to validate these new features and Scala 3 compatibility.

Features

Add Java presentation compiler support

Introduces a new presentation compiler for Java files, enabling IDE features such as code completion, go-to-definition, hover information, document highlights, references, renaming, and signature help. The implementation uses the JDK's compiler tree API to parse and analyze Java source code, providing a foundation for Java language support in the editor.

mtags-java · high confidence

Add Markdown and Plaintext docstring generators

New MarkdownGenerator and PlaintextGenerator components have been added to the docstring printing subsystem. These generators convert ScalaDoc comments into formatted Markdown and plain text respectively, enabling the IDE to render documentation in different markup styles for hover tooltips and other UI elements.

mtags/src/main/scala/scala/meta/internal/metals/docstrings/printers · high confidence

Add build-tool wrapper scripts and live-reload support

Metals now ships with built-in wrapper scripts for Gradle (gradlew/gradlew.bat), Maven (maven-wrapper.properties), and Mill (mill/mill.bat), enabling users to run builds without pre-installing these tools. The Mill launcher has been updated to support version detection from .mill-version, .config/mill-version, build.mill.yaml, and build script comments, and defaults to native binaries on Linux/macOS with JVM fallback. Additionally, a live-reload JavaScript client (livereload.js) is included to support real-time UI updates.

metals/src/main/resources · high confidence

Add internal debug adapter components for running and debugging main classes and tests

This change introduces a new set of internal classes in the debug server package to support running and debugging Scala main classes and test suites via the Debug Adapter Protocol. It adds \MainClassDebugAdapter\ to launch main classes with correct classpaths, environment variables, and JVM options, \AttachRemoteDebugAdapter\ for remote attachment, and \MetalsDebugToolsResolver\ to handle dependency resolution for expression compilation and decoding. Supporting infrastructure includes \Run.scala\ for process execution, \Logger\ and \DebugLogger\ for output handling, and testing utilities like \LoggingEventHandler\ and \FilteredLoader\ to manage test suite events and class loading during debug sessions.

metals/src/main/scala/scala/meta/internal/metals/debug/server · high confidence

Expanded Test Explorer support for JUnit, Munit, ZIO, TestNG, and Weaver

The Test Explorer now discovers tests for additional Scala testing frameworks. JUnit 4 and JUnit 5 tests are detected via their annotations, while Munit tests are found by searching for \test\ calls and helper methods defined in parent classes. New support is added for ZIO Test (parsing \spec\ and \tests\ definitions), TestNG (via the \@Test\ annotation), and Weaver Cats Effect (extending Munit logic to recognize \pureTest\ and \loggedTest\).

metals/src/main/scala/scala/meta/internal/metals/testProvider/frameworks · high confidence

Initial repository configuration and documentation setup

The repository is initialized with essential configuration files and documentation. This includes a \.scalafmt.conf\ file to enforce code formatting (version 3.11.5), \.scalafix.conf\ and \.scalafix3.conf\ for import organization and cleanup rules, and \.mergify.yml\ to automate pull request merging. Developer tooling is configured via \.coderabbit.yaml\ and \.scala-steward.conf\ for automated reviews and dependency updates. The project also introduces \AGENTS.md\ for AI assistant guidelines, \CONTRIBUTING.md\ pointing to the website, and \architecture.md\ detailing the system's design. Additionally, standard repository files like \LICENSE\ (Apache 2.0), \NOTICE.md\, \.gitignore\, \.gitattributes\, and \.jvmopts\ are added to establish the project's legal and operational baseline.

(repo-wide) · high confidence

Introduce Metals MCP server with HTTP and stdio transports

Metals now includes a Model Context Protocol (MCP) server, enabling AI coding assistants to interact with the Scala build and codebase. This change adds two server implementations: an HTTP-based server (MetalsMcpServer) that runs on a local port and manages configuration files, and a stdio-based server (MetalsMcpStdioServer) for direct process integration. The core logic is shared via the MetalsMcpTools trait, which exposes tools for importing builds, compiling projects, inspecting symbols, running tests, and querying dependencies. Supporting infrastructure includes exception handling (McpExceptions), symbol search and inspection providers (McpSymbolProvider, McpInspectProvider), test execution (McpTestRunner), and configuration management (McpTomlConfig).

metals/src/main/scala/scala/meta/internal/metals/mcp · high confidence

Introduce TestSuitesProvider for unified test discovery and UI updates

A new TestSuitesProvider component has been added to centralize test suite discovery and manage updates for both the Test Explorer and Code Lens interfaces. This change consolidates logic for finding tests across multiple frameworks (JUnit, Munit, ScalaTest, TestNG, Weaver, Zio) and ensures that test case lenses and explorer views are kept in sync with the source code, improving the reliability of running and debugging tests within the IDE.

metals/src/main/scala/scala/meta/internal/metals/testProvider · high confidence

Introduce Tree View Protocol (TVP) for project navigation

Metals now exposes a new Tree View Protocol (TVP) that allows the IDE to display a structured tree of your project's symbols, build targets, and available commands. This change introduces the \TreeViewProvider\ interface and its \MetalsTreeViewProvider\ implementation, which populates the tree with project roots, build actions (such as Import Build, Clean Compile, and Restart Build Server), and help links (including Discord and GitHub). The \IndexedSymbols\ component handles the indexing of Scala and Java symbols from source files and JARs, enabling the tree to reflect the actual code structure. This provides a native, hierarchical view of the workspace directly within the editor's sidebar.

metals/src/main/scala/scala/meta/internal/tvp · high confidence

Introduce Type Hierarchy and Supermethod Navigation

Metals now supports navigating the type hierarchy, allowing users to jump to super methods and fields via code lenses and quick pick menus. This change introduces new components in the implementation package, including \Supermethods\ for handling user selection of super methods, \InheritanceContext\ for tracking class locations, and \GlobalClassTable\ for indexing symbols in dependency sources. Users can now explore the inheritance chain of classes and methods directly within the editor.

metals/src/main/scala/scala/meta/internal/implementation · high confidence

Introduce standalone Metals entry point and dependency pre-download utility

Metals now includes a new \Main\ entry point that initializes the language server and exposes \--version\ and \--list-settings\ command-line flags for users to inspect supported Scala versions and configuration options. Additionally, a new \DownloadDependencies\ utility is provided to pre-download and cache essential artifacts (such as mtags, SemanticDB, mdoc, and the Scala 3 presentation compiler) into the Coursier cache, with an optional \--copy-to\ flag to bundle these dependencies for offline or restricted environments.

metals/src/main/scala/scala/meta/metals · high confidence

Introduce symbol renaming capability

Adds a new RenameProvider that enables users to rename symbols across the workspace. The implementation supports renaming via the Presentation Compiler for local symbols, falls back to semantic analysis for other cases, handles renamed imports, automatically backticks new names when necessary, and delays edits in closed files until the first save to avoid false compiler errors.

metals/src/main/scala/scala/meta/internal/rename · high confidence

Introduces FileWatcher interface and Noop implementation

A new FileWatcher trait and a NoopFileWatcher object have been added to the metals watcher package. This establishes the interface for file watching capabilities, with the Noop implementation providing a default no-operation behavior for scenarios where file watching is not required or supported.

metals/src/main/scala/scala/meta/internal/metals/watcher · high confidence

New JMH benchmarks for presentation compiler and indexing performance

Added a suite of JMH benchmarks in the metals-bench module to measure the performance of key language server features. This includes benchmarks for the presentation compiler (completion, definition, hover, signature help, document highlights, and semantic tokens) across Scala 2.13 and 3.3.1, as well as benchmarks for classpath indexing, symbol search, and server initialization. These benchmarks allow developers to track performance regressions in core indexing and code intelligence capabilities.

metals-bench/src · high confidence

New Scala 2 presentation compiler implementation

The Scala 2 presentation compiler has been replaced with a new implementation in the \mtags\ module. This change introduces a suite of new providers for code intelligence features, including \AutoImportsProvider\ for managing imports, \HoverProvider\ for documentation, \CompletionItemResolver\ for resolving completion details, and code action providers for \ExtractMethod\, \ConvertToNamedArguments\, and \InferredMethod\. The core compiler logic is now encapsulated in \MetalsGlobal\, which integrates with \CompileUnitsCache\ for performance and \DiagnosticsProvider\ for error reporting.

mtags/src/main/scala-2/scala/meta/internal/pc · high confidence

Standalone Metals MCP server with stdio transport support

Metals can now run as a standalone MCP server, allowing AI agents to interact with Scala projects directly without an LSP client connection. This change introduces a new \StandaloneMcpService\ that initializes core Metals components (such as the language client, status bar, and project service) specifically for MCP mode, handling workspace edits by writing directly to the filesystem and logging messages via scribe. It adds support for stdio transport in addition to HTTP, enabling low-latency communication for command-line tools, and allows specifying user configuration via CLI arguments to customize the server's behavior at startup.

metals-mcp · high confidence

Worksheet evaluation now supports Scala 2.11 and 2.12

Worksheets can now be evaluated in Scala 2.11 and 2.12 projects, in addition to the previously supported Scala 2.13. This is achieved by introducing a custom classloader that isolates the mdoc interfaces, allowing the Metals server to invoke mdoc instances from different Scala versions without classpath conflicts. The update also includes logic to handle diagnostics that lack specific line positions and strips ANSI color codes from worksheet output to ensure clean display in the editor.

metals/src/main/scala/scala/meta/internal/worksheets · high confidence

Removals

Removal of legacy language server core abstractions and transport layer

The \Connection\, \LanguageServer\, \MessageReader\, and \Server\ traits and classes in \langserver.core\ have been deleted. This removes the previous implementation of the JSON-RPC message reading loop, header parsing, and the abstract server/connection interfaces, indicating a shift away from this specific transport and interface structure in the language server.

languageserver/src/main/scala/langserver/core · high confidence

Architecture

Extracted shared mtags utilities and classpath search into mtags-shared

The \mtags-shared\ module now contains the core shared utilities previously scattered across the codebase, including the fuzzy search logic, classpath indexing, and JDK compatibility shims. This extraction removes the \scalameta\ dependency from this shared layer, allowing it to be used by other components without pulling in the full parser. Users benefit from a cleaner separation of concerns and potentially faster compilation times for modules that only need the shared search and indexing capabilities.

mtags-shared · high confidence

Presentation compiler interfaces consolidated into mtags-interfaces

The presentation compiler API has been restructured into a new \mtags-interfaces\ module, introducing a unified \PresentationCompiler\ abstract class and a \RawPresentationCompiler\ for synchronous, single-threaded execution. This change expands the public API with new capabilities including inlay hints (via \InlayHintsParams\), code actions (defined in \CodeActionId\), and enhanced symbol search (via \SymbolSearch\ and \SymbolSearchVisitor\). Configuration is now managed through \PresentationCompilerConfig\, supporting options like override definition formatting and completion details, while supporting types such as \PcSymbolInformation\ and \PcSymbolKind\ provide detailed symbol metadata for editor integrations.

mtags-interfaces · high confidence

Refactor code actions to use a unified CodeAction interface

The code actions in the \codeactions\ directory have been refactored to implement a common \CodeAction\ trait, which standardizes how actions contribute edits and handle commands. This change introduces a \CodeActionBuilder\ for constructing LSP code actions and a \CodeActionProvider\ that manages the registry of all available actions, enabling consistent behavior across features like import missing symbols, organize imports, and extract value.

metals/src/main/scala/scala/meta/internal/metals/codeactions · high confidence

Refactored BSP connection logic into a dedicated internal package

The BSP connection and configuration logic has been reorganized into the new \scala.meta.internal.bsp\ package, introducing dedicated classes for managing the connection lifecycle (\BspConnector\), server discovery and launching (\BspServers\), and BSP config file generation (\BspConfigGenerator\). This refactoring centralizes the handling of build server selection, connection establishment, and configuration file management, improving code maintainability and separation of concerns within the Metals build server integration.

metals/src/main/scala/scala/meta/internal/bsp · high confidence

Refactored build server connection logic into dedicated components

The build server connection logic has been extracted from the main server class into new dedicated components: \BloopServers\ handles the lifecycle and connection to the Bloop server, \BspStatus\ manages the display of build server status in the client UI, and \BuildTargetInfo\ provides detailed information about build targets. This refactoring improves code organization and separation of concerns within the Metals language server.

metals/src/main/scala/scala/meta/internal/metals · high confidence

Refactored language server architecture into distinct service interfaces

The internal structure of the Metals language server has been reorganized to split the monolithic \MetalsLanguageServer\ into separate, focused components: \LanguageServer\, \ScalaLspService\, \TextDocumentService\, \WorkspaceService\, \MetalsService\, and \WindowService\. This change introduces a \DelegatingScalaService\ to handle LSP4j delegation and delays the initialization of the underlying service until the \initialize\ request is received, resolving issues where services were previously created eagerly with null dependencies. For users, this architectural shift ensures more robust server startup and cleaner separation of text, workspace, and custom Metals-specific LSP methods, though it primarily affects internal implementation rather than exposing new user-facing features.

metals/src/main/scala/scala/meta/metals/lsp · high confidence

Behavioural changes

Added Scala 2.13-specific compiler compatibility layer

Introduced new Scala 2.13-specific compatibility files (\Compat.scala\ and \JrtClasspathCompat.scala\) to support the 2.13 compiler version. The \Compat\ trait provides version-specific implementations for compiler internals, including handling constant types in signatures, managing alias completions, and executing outline compilations. Additionally, \JrtClasspathCompat\ implements logic to clear corrupted \JrtClassPath\ and \CtSymClassPath\ caches, addressing issues where these caches persist incorrectly across compiler restarts.

mtags/src/main/scala-2.13 · high confidence

Added database schema for JAR type hierarchy indexing

The shared database migration now includes tables to support indexing JAR files and their type hierarchies. A new \indexed\_jar\ table stores metadata for indexed JARs using an MD5 digest as the primary key, while a \type\_hierarchy\ table records symbol relationships (such as parent classes) linked to specific JARs. This structural change enables the system to efficiently query and resolve type information within JAR dependencies.

metals/src/main/resources/shared-db · high confidence

Automatic string interpolation and SBT-to-Mill dependency conversion on paste

The formatting engine now automatically converts string literals to interpolations when a \${}\ marker is typed inside a string, and it converts pasted SBT-style dependency declarations to Mill (Scala CLI) style in build files. These changes improve developer productivity by reducing manual refactoring when adding interpolation syntax or migrating dependency definitions.

metals/src/main/scala/scala/meta/internal/metals/formatting · high confidence

Call Hierarchy now supports val/var definitions with complex patterns

The Call Hierarchy feature has been refactored to correctly handle \val\ and \var\ definitions that use complex pattern matching structures (such as tuples or extraction patterns). Previously, these definitions might not have been fully recognized in the call graph; the new implementation in \CallHierarchyHelpers\ and \IncomingCallsFinder\ traverses pattern arguments to identify the correct symbols, ensuring that calls to variables defined via destructuring are accurately included in the hierarchy.

metals/src/main/scala/scala/meta/internal/metals/callHierarchy · high confidence

Custom presentation compiler thread implementation

The Scala 2 presentation compiler now uses a custom thread implementation (MetalsGlobalThread) to manage compilation tasks. This change introduces a new GlobalProxy trait that allows hijacking the default compiler thread, ensuring the old thread is properly shut down before starting a new daemon thread. This improves reliability by preventing stale compiler instances and handling interruptions more gracefully.

mtags/src/main/scala-2/scala/tools · high confidence

Database schema expanded to support dependency sources, build server discovery, and symbol indexing

The internal database schema has been extended with seven new migration scripts to support advanced indexing and configuration features. New tables track the relationship between library dependency sources and build targets or worksheets, persist user choices for build tools and build servers, and store cached top-level symbols, type hierarchy data, and member information for indexed JARs. Additionally, a fingerprints table was added to persist file state between restarts, and existing indices were cleared to accommodate changes in how type hierarchy is indexed.

metals/src/main/resources/db · high confidence

The docstring rendering engine now uses a shared, nesting-aware parser for Scaladoc wiki-links (e.g., \[\[...\]\]), ensuring that backticks, parenthesized signatures, and type arguments are correctly handled so that go-to-definition and rendered links agree on their boundaries. Additionally, HTML content within docstrings is now converted to Markdown using Jsoup before parsing, allowing richer HTML formatting in documentation to be displayed correctly.

mtags/src/main/scala/scala/meta/internal/metals/docstrings · high confidence

Improved compiler stability with outline support and JRT cache clearing

The Scala 2.12 compiler integration now includes a compatibility layer that enables the compiler outline feature to improve signature resolution and introduces a mechanism to clear corrupted JrtClassPath caches. These changes address issues where internal caches would not reset properly during compiler restarts, helping to prevent stale or corrupted classpath data from affecting code analysis.

mtags/src/main/scala-2.12 · high confidence

Improved import positioning in Scala CLI scripts and comment-based selection ranges

The presentation compiler now more accurately determines where to insert the first import statement in Scala CLI \.sc\ files by correctly handling shebang lines and ensuring that \//\> using\ directives are not broken by auto-imports. Additionally, selection range expansion now works within comments, allowing users to select and navigate code blocks that are enclosed in comment sections.

mtags/src/main/scala/scala/meta/internal/pc · high confidence

Improved logging integration and conditional error logging

The logging subsystem now forwards messages directly to the LSP editor client via a new LanguageClientLogger, ensuring that log output is visible within the IDE. Additionally, a new logErrorWhen helper has been introduced to conditionally emit error logs only when a specific condition is met, streamlining error reporting logic.

metals/src/main/scala/scala/meta/internal/metals/logging · high confidence

Introduce dynamic documentation generation via mdoc StringModifiers

The documentation build system now uses a set of custom mdoc StringModifiers to generate content dynamically at build time. This replaces static text with live data for several areas: the User Configuration section now reflects actual server options and defaults; the Requirements section displays supported Scala versions and Java versions; the Commands section lists available client and server commands; and the Releases section shows current version and date tables. Additionally, new modifiers provide context-aware content for the Text Editor (including custom sbt launcher instructions), File Watcher (JSON configuration), Parent Lenses (VS Code vs. other editors), and Worksheets (dependency usage). This ensures the documentation stays synchronized with the current Metals release without manual updates.

metals-docs · high confidence

Introduce internal SystemProcess abstraction for external command execution

Metals now uses a new internal \SystemProcess\ abstraction in \scala.meta.internal.process\ to manage external commands. This change replaces the previous \nuprocess\ library with Scala's standard \scala.sys.Process\, introducing support for named threads, configurable output/error logging, and specific exit codes (including a new \Cancel\ code 189). Users will benefit from more reliable process management, better error handling for failed commands, and improved visibility into command output via the new logging hooks.

metals/src/main/scala/scala/meta/internal/process · high confidence

Introduce new mtags indexing infrastructure and symbol resolution logic

The mtags module has been restructured with a new set of core components to handle code indexing and symbol navigation. This includes a new \OnDemandSymbolIndex\ for efficient, low-memory indexing of source files and JARs, a \Mtags\ class to coordinate indexing for Scala and Java, and a \MtagsIndexer\ trait for extracting symbol information. New files like \DefinitionAlternatives\ provide fallback logic for 'go to definition' (e.g., mapping \apply\/\copy\ calls to class definitions), while \AtomicTrieMap\ and \InverseLegacyToken\ support internal indexing operations and error reporting. This change establishes the foundational indexing pipeline used by the language server.

mtags/src/main/scala/scala/meta/internal/mtags · high confidence

Introduces request timeout handling with user notification fallback

A new RequestRegistry utility has been added to manage language server requests with configurable timeouts. When a request exceeds its timeout, the system now attempts to show a request message to the user offering options to wait, cancel, or dismiss the notification; if the client does not support request messages, it falls back to a simple notification. This change ensures that long-running operations can be interrupted or acknowledged by the user rather than hanging indefinitely.

metals/src/main/scala/scala/meta/internal/metals/utils · high confidence

Migrate documentation site configuration to TypeScript

The Docusaurus configuration file has been converted from JavaScript to TypeScript (docusaurus.config.ts), providing type safety for the site settings. This change also introduces a GitHub icon in the website's navbar and configures the footer to display social media badges for GitHub, Discord, and Twitter.

website · high confidence

Move CompletableCancelToken to public mtags package

The CompletableCancelToken implementation has been moved from the test suite into the main mtags source tree (scala.meta.internal.async), making this cancel token implementation available for general use within the mtags module rather than being restricted to internal testing.

mtags/src/main/scala/scala/meta/internal/async · high confidence

New docstring indexing and caching implementation

The \mtags\ module now includes a new \Docstrings\ class that manages caching and retrieval of symbol documentation for both Scala (Scaladoc) and Java (Javadoc). This change introduces dedicated indexers (\ScaladocIndexer\ and \JavadocIndexer\) to extract documentation from source files, along with a \JavadocParser\ to handle Javadoc-specific syntax. The \Docstrings\ class implements a caching strategy that expires entries on file save to balance memory usage with up-to-date information, and supports falling back to parent documentation when a symbol lacks its own docs. Additionally, utility classes for text edits and testing support have been added to this location.

mtags/src/main/scala/scala/meta/internal/metals · high confidence

New file provider now detects and respects project braceless syntax style

The new file creation experience now automatically matches the indentation style (significant indentation vs. curly braces) of the existing project. A new \BracelessSyntax\ utility analyzes the first top-level type definition in the target directory to determine whether the project prefers Scala 3's optional braces. The \NewFileProvider\ uses this detection to generate new Scala files with the appropriate syntax, ensuring consistency with the surrounding codebase without requiring manual user configuration.

metals/src/main/scala/scala/meta/internal/metals/newScalaFile · high confidence

New parsing infrastructure for document symbols and folding ranges

The \metals/src/main/scala/scala/meta/internal/parsing\ module has been restructured with new components to improve code navigation and editing. A new \DocumentSymbolProvider\ now extracts hierarchical document symbols, correctly handling Scala 3 syntax (such as \enum\, \given\, and \extension\) and ensuring empty symbol names are replaced with spaces to prevent client errors. Additionally, a new \FoldingRangeProvider\ and \FoldingRangeExtractor\ implement folding ranges for both Scala and Java files, supporting features like folding consecutive comments, import groups, and braceless code blocks while respecting line-span thresholds.

metals/src/main/scala/scala/meta/internal/parsing · high confidence

New release and test automation scripts with updated Bloop configuration

The bin directory now includes several new scripts to streamline development and release workflows: merged\_prs.scala generates release notes by fetching merged pull requests from GitHub; test-release.sh validates cross-built artifacts (Metals and mtags for Scala 2.12/2.13) using Coursier; test.sh launches the Bloop CLI via Coursier and runs sbt tests with specific JVM options; update-maven-wrapper.sh and update-millw.sh automate the updating of Maven and Mill wrapper binaries. Additionally, bloop.json was added to configure Bloop's JVM memory settings (-Xmx1G, -Xss16m), replacing the previous reliance on .jvmopts for these specific Bloop daemon properties.

bin · high confidence

New sbt build infrastructure files for CI, versioning, and settings

The project directory now includes several new Scala source files that restructure the build configuration. Developers.scala defines the list of project maintainers. TestGroups.scala explicitly lists all test suites to enable sharding in CI. SemanticDbSupport.scala and Scala3NightlyVersions.scala handle dynamic resolution of supported Scala versions and SemanticDB compiler plugins. InputProperties.scala generates resource files with build context, and JavaPcSettings.scala configures the Java presentation compiler module.

project · high confidence

Prioritize stable dependency versions in completion suggestions

The completion logic for dependencies now sorts version candidates so that stable releases appear before development builds. This ensures that when users trigger completions for dependency coordinates, they see the latest stable version first, reducing the likelihood of accidentally selecting a snapshot or dev build.

mtags/src/main/scala-2/scala/meta/internal/pc/completions · high confidence

Redesigned homepage with GitHub icon and supported-by section

The website homepage has been updated to include a GitHub Octocat icon in the navigation bar that adapts to light and dark themes, and a new 'Supported by' section on the landing page displaying logos for Scala Center and VirtusLab. The landing page layout and styling have also been adjusted to support these new elements.

website/src · high confidence

Refactor code lenses into a modular trait-based architecture

The code lens system has been restructured to use a new \CodeLens\ trait, separating concerns into distinct implementations: \RunTestCodeLens\ handles run and debug lenses for main classes and tests (including Java mains and synthetic scripts), \SuperMethodCodeLens\ provides navigation to parent methods, and \WorksheetCodeLens\ adds the copy-output command for worksheets. This change improves maintainability and allows individual lens providers to be enabled or disabled independently based on client capabilities and user configuration.

metals/src/main/scala/scala/meta/internal/metals/codelenses · high confidence

Refactor language client architecture with configuration-aware delegation

The language client implementation has been restructured to introduce a \ConfiguredLanguageClient\ wrapper that delegates requests to the underlying editor client based on user configuration settings. This change centralizes how LSP notifications like \showMessageRequest\ and \logMessage\ are handled, allowing users to control whether status updates appear in the status bar, as log messages, or are suppressed entirely. It also introduces a \DelegatingLanguageClient\ base class to simplify client implementations and a \NoopLanguageClient\ to safely handle shutdown scenarios by ignoring all client requests.

metals/src/main/scala/scala/meta/internal/metals/clients · high confidence

Refactor language server message types to use enums instead of untyped constants

The language server's message definitions (such as \InitializeRequest\, \ShowMessageParams\, and \ShowMessageRequestParams\) have been refactored to replace untyped numeric constants (e.g., \tpe: Long\) with strongly-typed enumerations. This change improves type safety and clarity for message handling, aligning with the broader project cleanup to use enumerations instead of named number constants.

languageserver/src/main/scala/langserver/messages · medium confidence

Refactored build tool handling with new providers and error management

The build tool integration logic in the \metals/src/main/scala/scala/meta/internal/builds\ directory has been restructured to improve modularity and user experience. A new \BSPErrorHandler\ now manages build server errors by creating reports and optionally showing them to the user, while \BuildToolSelector\ centralizes the logic for detecting and choosing between multiple available build tools. The \BloopInstall\ and \BuildServerProvider\ traits have been refactored to separate concerns, with \BloopInstallProvider\ handling Bloop-specific installation and \BuildServerProvider\ managing BSP configuration generation. Additionally, a new \AnsiFilter\ component was added to strip ANSI escape codes from build logs before they are sent to the editor, ensuring cleaner output in the UI.

metals/src/main/scala/scala/meta/internal/builds · high confidence

Refactored debug infrastructure with new adapter and discovery components

The debug subsystem has been restructured to improve reliability and extensibility. A new \BuildTargetClassesFinder\ class centralizes the logic for locating main and test classes, including fallback handling for dependencies. The \MetalsDebugAdapter\ and \SourcePathAdapter\ now explicitly manage the mapping between BSP URIs and local file paths, ensuring correct source resolution for both workspace and dependency sources. A dedicated \DebugRunner\ handles non-debugging run sessions, while \MessageIdAdapter\ ensures monotonic message IDs for synthetic DAP messages. Additionally, \SymbolCache\ introduces caching for compiler symbol information to reduce redundant lookups, and \DapJsonParser\ provides robust JSON serialization and deserialization for DAP types.

metals/src/main/scala/scala/meta/internal/metals/debug · high confidence

Refactored string encoding and decoding logic

The codebase now uses a new \EncoderDecoder\ class to handle character escaping and unescaping, replacing previous ad-hoc implementations. This change introduces a generic encoder/decoder mechanism (used by the new \URIEncoderDecoder\ for URI-specific characters) and updates \PositionSyntax\ to utilize this refactored approach, ensuring consistent handling of special characters in encoded strings.

mtags/src/main/scala-2/scala/meta/internal/metals · high confidence

Registered ScalaPresentationCompiler via Java Service Provider

A new service provider configuration file has been added to register scala.meta.internal.pc.ScalaPresentationCompiler as the implementation for scala.meta.pc.PresentationCompiler. This enables the presentation compiler to be discovered and loaded automatically via the Java Service Provider Interface (SPI) mechanism.

mtags/src/main/resources · high confidence

Removal of LSP type definitions from the languageserver types module

The \languageserver/types\ module has been cleaned up by deleting the \package.scala\ and \types.scala\ files, which previously contained core Language Server Protocol type definitions such as \Position\, \Range\, \Location\, \Diagnostic\, \CompletionItem\, and \SymbolInformation\. This change removes these specific data structures from this location, likely as part of a broader refactoring to consolidate or migrate these types elsewhere in the codebase.

languageserver/src/main/scala/langserver/types · high confidence

Scala CLI auto-start behavior restricted to workspace folders

Scala CLI will no longer automatically start for Scala or Java files located outside the defined workspace folders. Previously, opening a file outside the workspace could trigger a standalone Scala CLI session; now, the auto-start logic explicitly checks if the file path is within any of the configured workspace roots, preventing unintended background processes for orphaned documents.

metals/src/main/scala/scala/meta/internal/metals/scalacli · high confidence

Unified Doctor interface with HTTP server and JSON/HTML output

The Doctor feature now consolidates problem reporting into a single entry point (HeadDoctor) that supports both an embedded HTTP server and direct client commands. Users can view diagnostic information via a browser-based HTML page (with support for focusing on specific build targets) or receive structured JSON data, while the underlying ProblemResolver continues to detect and report issues such as unsupported Scala/SBT versions, misconfigured projects, and JDK problems.

metals/src/main/scala/scala/meta/internal/metals/doctor · high confidence

Fixes

Improved URI and path handling for JARs and Windows paths

The \MtagsEnrichments\ module now includes robust logic for converting URIs to absolute paths, specifically addressing issues with JAR files and Windows path encoding. It handles double-escaped JAR URIs (e.g., \jar:file%3A...\) and applies specific decoding heuristics on Windows to resolve \NoSuchFileException\ errors caused by literal percent signs or special characters in workspace paths. This ensures that 'go to definition' and hover features work correctly for external classes in JARs and for symbols in paths containing spaces or special characters.

mtags/src/main/scala-2/scala/meta/internal/mtags · high confidence

Introduce Scala 2.11 compatibility layer for presentation compiler

Added a new compatibility layer in the Scala 2.11-specific mtags source directory to resolve compilation errors and support version-specific behaviors. This includes a \Compat\ trait that implements stub methods for features not available in Scala 2.11, such as disabling outline compilation and returning empty results for alias completions, and a \JrtClasspathCompat\ object that disables JRT classpath cache clearing to address \-release\ issues.

mtags/src/main/scala-2.11 · high confidence

Test coverage

Add document symbol test resources for Scala language constructs; Added Bill test fixture for BSP server discovery; Added Gradle LSP integration tests; Added Scala 3 document symbol test resources; Added Scala 3 inlay hints test fixtures; Added Scala 3 mtags test resources; Added Scala 3 semantic test resources; Added Scala 3 test resources for toplevel definitions and inner classes; Added base test suite for code actions; Added comprehensive test suites for hover functionality; Added cross-version and regression test suites for Scala 3 features; Added definition test fixtures for Scala language constructs; Added folding range tests for Scala 3 and Java; Added folding range tests for Scala 3 syntax; Added inlay hints test resources; Added integration tests for Maven workspace import and debugging; Added presentation compiler test suites for auto-imports, completions, and code actions; Added scripted tests for Java semanticdb support; Added semantic token test fixtures for Scala 3; Added semantic token test suite for Scala; Added semantic token tests for Scala 3 language features; Added semanticdb test resources for Scala language constructs; Added slow integration tests for Mill build tool support; Added slow tests for sbt server integration and debugging; Added test coverage for Java completion and auto-import features; Added test expectations for Scala 3 toplevel symbol extraction; Added test expectations for folding ranges in Scala and Java; Added test fixtures for mtags symbol indexing; Added test infrastructure for Bazel and Mill server cleanup; Added test infrastructure for MCP server tools; Added test infrastructure for Scala CLI suites; Added test infrastructure for presentation compiler features; Added test input fixtures for Java and Scala language features; Added test inputs for folding ranges in Scala and Java; Added test resources for empty package handling; Added test resources for nested Scala declarations; Added test resources for nested package and local declaration handling; Added test resources for nested semantic declarations; Added test resources for nested symbol declarations; Added test resources for nested symbol declarations; Added test suites for Java hover, document highlight, and definition features; Added tests for Java go-to-definition and type-definition capabilities; Added tests for Java reference finding in the presentation compiler; Added tests for Java rename functionality; Added tests for Java signature help; Added tests for Scala ruleset name detection heuristics; Added tests for best-effort compilation diagnostics and completions; Added tests for debug proxy teardown ordering and MCP glob search normalization; Added tests for document highlight support; Added tests for on-type formatting in multiline and interpolated strings; Added tests for range formatting during paste operations; Added tests for the ProblemResolver diagnostic checks; Added tests for type definition navigation; Added unit tests for Bloop diagnostics parsing and Java token edit distance; Added unit tests for ClassFinder breakpoint and class resolution; Added unit tests for Scala Debug Adapter Protocol (DAP) debugging features; Added unit tests for ScalaTest, JUnit, Munit, ZIO, and Kyo test discovery; Added unit tests for Scalafix lint diagnostics and rule execution; Added unit tests for build digest logic; Added unit tests for client command link formatting; Added unit tests for code actions; Added unit tests for debug protocol and environment parsing; Added unit tests for inlay hints functionality; Added unit tests for package creation and stacktrace analysis; Added unit tests for worksheet evaluation, dependency handling, and timeout behavior; Added workspace symbol test fixtures for Scala and Java constructs; Expanded test coverage for MCP server capabilities; Expanded test coverage for Scala CLI integration; New base test suites for presentation compiler features; New test infrastructure for stacktrace analysis and call hierarchy; New test infrastructure for the Debug Adapter Protocol; New test infrastructure library (mtest) for presentation compiler tests; Removed MessageReaderSuite test file.

Dependencies

Bundled Gradle wrapper upgraded to version 7.5

Metals now ships with a bundled Gradle wrapper configuration pointing to Gradle 7.5. This ensures that projects using the wrapper will download and use this specific version, providing consistency and potentially accessing new features or fixes available in Gradle 7.5.

metals/src/main/resources/gradle · high confidence

Update build dependencies and configuration

The build configuration has been updated to use Scala 2.13 as the primary version and upgraded several core dependencies, including protobuf-java to 4.30.2, metaconfig-core to 0.18.1, mdoc to 2.2.9, mill-contrib-testng to 0.10.0-M5, and undertow-core to 2.2.9.Final. The project also incorporates updates to Bloop, scribe, flyway-core, ammonite-util, bloop-config, bloop-launcher, jsoup, ujson, qdox, and coursier to their latest specified versions.

(dependencies) · high confidence

Upgrade Scalameta to 4.9.8

The Scalameta library has been upgraded to version 4.9.8. This update brings improvements to the underlying parsing and semantic analysis capabilities used by the language server.

repository · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 66.

Lenses

  • Code Health 85
  • Architecture 98
  • Maturity 58
  • Readiness 73
  • Security 68

Changes since last survey

  • 300 commits — 249 feature/other, 51 fixes

By area

  • metals/src — 61 commits
  • project/V.scala — 54 commits
  • (root) — 39 commits
  • website/yarn.lock — 35 commits
  • (repo) — 23 commits
  • tests/unit — 17 commits
  • .github/workflows — 11 commits
  • project/plugins.sbt — 11 commits
  • website/package.json — 8 commits
  • project/build.properties — 6 commits
  • mtags-shared/src — 5 commits
  • mtags/src — 5 commits
  • docs/editors — 4 commits
  • website/blog — 4 commits
  • metals-mcp/src — 3 commits
  • docs/contributors — 2 commits
  • docs/features — 2 commits
  • mtags-interfaces/src — 2 commits
  • website/docusaurus.config.ts — 2 commits
  • .github/dependabot.yml — 1 commit

Notable commits

  • fix: Fix DederBuildTool.scala imports
  • fix: Fix UserConfigurationSuite
  • fix: Fix image links in docs (#8597)
  • fix: Fixed the test failures summary (#8634)
  • fix: Merge branch 'main' into fix/sbt2-scala3-dialect-8752
  • fix: Merge pull request #8321 from tgodzik/fix-fuzzy
  • fix: Merge pull request #8322 from tgodzik/fix-another
  • fix: Merge pull request #8324 from tgodzik/fix-bsp
  • fix: Merge pull request #8325 from tgodzik/fix-false-positive
  • fix: Merge pull request #8355 from tgodzik/fix-windows-targets
  • fix: Merge pull request #8753 from russwyte/fix/sbt2-scala3-dialect-8752
  • fix: bugfix: Add into soft modifier (#8506)
  • fix: bugfix: Always return diagnostics even if cancelled
  • fix: bugfix: Default to 0 if minor or patch are missing, log warning (#8232)
  • fix: bugfix: Detect rules name instead of assuming a specific version (#8265)
  • fix: bugfix: Don't truncate debug console output when the JVM exits (#8463)
  • fix: bugfix: Encode target uris for the doctor
  • fix: bugfix: Expand implicit materializer macros in the presentation compiler (#8464)
  • fix: bugfix: Fix ans issue with an empty scalatest prefix (#8274)
  • fix: bugfix: Fix constructing invalid symbol (#8277)
  • …and 280 more

Architecture

  • 0 containers · 1 bounded contexts · 0 dependency edges (baseline)

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

scalameta/metals was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 27 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 5f44c6f91735f73c1ffb2779d0aba264e4750d0e — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-d00c643c3f66.