Registry / devops / dot-language-server

dot-language-server

JSON →
library3.1.0jsnpmunverified

The `dot-language-server` package provides a robust Language Server Protocol (LSP) implementation specifically tailored for the DOT language, which is commonly used with Graphviz. Currently at version 3.1.0, the project follows an active release cadence, with major versions introducing significant shifts like the recent transition to ECMAScript Modules (ESM) and a strict Node.js v22+ requirement in version 3.x. Its primary differentiator is its dedicated support for DOT syntax, offering features such as refactorings, diagnostics, and code completion to various LSP-compatible editors like Vim, Neovim, Visual Studio Code, Sublime Text, and Emacs. Unlike general-purpose language tools, `dot-language-server` focuses exclusively on providing a rich development experience for Graphviz users, integrating directly into editor workflows rather than requiring external compilation or visualization steps. It functions as a standalone executable.

npm install dot-language-server
INSTALL
IMPORT
SIG · DOT-LANGUAGE-SERVE
D
dot-language-server
devopsjavascriptv3.1.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

dot-language-server
N/A - primary usage is via CLI executable `dot-language-server`
The `dot-language-server` package is primarily an executable intended to be run as a language server, not a library for direct programmatic import of functions or classes into typical JavaScript/TypeScript applications. Its interface is the Language Server Protocol via stdio or sockets. If embedding, you would typically spawn the process.
start
N/A - see above note
While a Node.js-based language server might internally expose a 'start' or 'run' function, `dot-language-server` is not designed for direct programmatic import and invocation of such methods by end-user applications. It's an application itself.
ServerOptions
N/A - see above note
Any internal types or interfaces like `ServerOptions` would be part of the server's internal implementation and are not exposed as part of a public API for programmatic consumption by other applications.

This configuration snippet demonstrates how to integrate the `dot-language-server` into Sublime Text using the LSP package, enabling rich language features for DOT files. It includes a specific note for Windows users regarding the executable path.

{ "clients": { "dot-language-server": { "command": ["dot-language-server", "--stdio"], "enabled": true, "languageId": "dot", "scopes": ["source.dot"], "syntaxes": ["Packages/Graphviz/DOT.sublime-syntax"] } } } // Note for Windows Users: You have to append `.cmd` to the first entry in the `command` array // (e.g., ["dot-language-server.cmd", "--stdio"]), or ensure shell execution is enabled, // for the server executable to be correctly located and run.
dot-language-server --version
Debug
Known issues
breakingVersion 2.0.0 introduced a significant breaking change by requiring Node.js version 22 or higher. Earlier Node.js versions are no longer supported.
fix
Ensure your Node.js environment is updated to version 22 or later. Use `nvm` or `volta` to manage Node.js versions if necessary.
affects: >=2.0.0
breakingVersion 3.0.0 transitioned the package to be ESM-only (ECMAScript Modules). This means any attempts to `require()` the package programmatically will likely result in errors.
fix
The package is primarily an executable, not a library for programmatic import. If you are attempting to run it in a Node.js context, ensure your project is configured for ESM, or use it via its CLI command as intended.
affects: >=3.0.0
gotchaOn Windows, when configuring LSP clients, the `dot-language-server` executable often needs the `.cmd` extension explicitly added to its command path.
fix
Modify your LSP client configuration on Windows to specify `"command": ["dot-language-server.cmd", "--stdio"]` or similar, to ensure the shell can correctly locate and execute the server.
affects: >=1.0.0
Errors
Common errors & fixes
Error: The 'dot-language-server' requires Node.js version 22 or higher.
Attempting to run the language server with an unsupported Node.js version.
fix
Upgrade your Node.js installation to version 22 or newer. Use `nvm install 22` and `nvm use 22` or similar version manager commands.
ERR_REQUIRE_ESM: require() of ES Module .../node_modules/dot-language-server/dist/server.js from ... not supported.
Attempting to `require()` the `dot-language-server` package programmatically in a CommonJS context, which is not supported since v3.0.0 (ESM-only).
fix
Avoid programmatic `require()` of this package. `dot-language-server` is an executable tool. Use it by spawning its command-line interface, typically configured through your LSP client, rather than importing it as a library.
LSP client reports 'command not found' or server failed to start on Windows.
The LSP client failed to locate the `dot-language-server` executable on Windows due to missing `.cmd` extension or shell execution issues.
fix
In your LSP client configuration, explicitly add `.cmd` to the executable name, e.g., change `"command": ["dot-language-server", "--stdio"]` to `"command": ["dot-language-server.cmd", "--stdio"]`.
Upgrade
Version history
3.1.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
dot-language-server — npm install dot-language-server · libregistry