Skip to content

docs: say that the CSS language server template installs the server, instead of asking for VS Code - #2051

Merged
lagergren merged 2 commits into
redhat-developer:mainfrom
lagergren:docs/css-language-server-installer
Nov 21, 2026
Merged

lagergren merged 2 commits into
redhat-developer:mainfrom
lagergren:docs/css-language-server-installer

Conversation

@lagergren

Copy link
Copy Markdown
Collaborator

Found while going through #1960.

Since d5942bf, the command of the CSS language server template starts the server where its installer puts it, $USER_HOME$/.lsp4ij/lsp/vscode-css-language-server/node_modules/vscode-langservers-extracted/lib/css-language-server/node/cssServerMain.js. Its README, which the help button of the New Language Server dialog shows, and its docs page still asked to install Visual Studio Code, and said that the command starts Visual Studio Code's copy of the language server.

They now say that the installer installs vscode-langservers-extracted with npm when the language server starts and its command doesn't start it, and where the command starts it. The path is the one of the template and of the installer, and lib/css-language-server/node/cssServerMain.js is in vscode-langservers-extracted 4.10.0, its latest version. The docs page also gets the newline it lacked at its end.

Docs only.

…instead of asking for VS Code

Since d5942bf, the command of the CSS language server template starts the
server where its installer puts it, in
$USER_HOME$/.lsp4ij/lsp/vscode-css-language-server, but its README and its
docs page still asked to install Visual Studio Code and to use its copy.
@lagergren lagergren added this to the 0.30.2 milestone Nov 20, 2026
@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Documentation
    • Updated CSS language server setup instructions to use the language-server template without requiring Visual Studio Code.
    • Clarified that initial setup checks the command and may install the server package. Later installations are available through the Reinstall action.
    • Documented how to adjust the server path when the package is installed in a different location.

The CSS language-server documentation now describes setup through the language-server template, conditional installation of vscode-langservers-extracted, the server script path, and the Reinstall action.

Changes: CSS language-server setup

Layer / File(s) Summary
Document first-start setup and server path
docs/user-defined-ls/vscode-css-language-server.md, src/main/resources/templates/lsp/vscode-css-language-server/README.md
The documentation removes Visual Studio Code installation and bundled-server instructions. It describes command checking and conditional package installation on first setup, gives the cssServerMain.js path, and explains how to change that path when the package is installed elsewhere. It states that only the Reinstall action runs the installer after initial setup.

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Other

Suggested reviewers: angelozerr

Merge Risk: Minimal · up to f6774

This PR updates the CSS language server setup documentation to point to the template-installed server and describe the first-start install and Reinstall behavior. The documented behavior matches how the installer works, and I found no merge-blocking risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title states the main change: the CSS language server template docs now say the template installs the server, instead of asking users to install VS Code. This matches the README and docs page chan…
Description check Passed The description explains the problem (docs still asked for VS Code and described its bundled server) and states the docs now describe the installer, the npm install, and the command path. It also note…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title states the main change: the CSS language server template docs now say the template installs the server, instead of asking users to install VS Code. This matches the README and docs page changes, which replace the VS Code instructions with installer and path documentation.

Full details: Description check

Explanation

The description explains the problem (docs still asked for VS Code and described its bundled server) and states the docs now describe the installer, the npm install, and the command path. It also notes the missing final newline on the docs page. This matches the changeset.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 41631826-72ee-4c70-a848-31cfc79b0898
Commits

Reviewing files that changed from the base of the PR and between e92baaa and f67748f.

Files ignored due to path filters: 1

  • docs/images/user-defined-ls/vscode-css-language-server/select_template.png is excluded by !**/*.png
Files selected for processing: 2

  • docs/user-defined-ls/vscode-css-language-server.md
  • src/main/resources/templates/lsp/vscode-css-language-server/README.md

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

@lagergren

Copy link
Copy Markdown
Collaborator Author

@muescha could you review this one too? It updates the README and the docs page of the CSS language server template, which still asked to install VS Code, while the template's command starts the copy its installer puts in ~/.lsp4ij. GitHub doesn't let me add you as a reviewer, since it only takes collaborators of the repository.

@codecov

codecov Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.48%. Comparing base (e92baaa) to head (f67748f).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##             main    #2051     +/-   ##
=========================================
  Coverage   49.47%   49.48%             
=========================================
  Files         813      813             
  Lines       33343    33350      +7     
  Branches     6854     5195   -1659     
=========================================
+ Hits        16498    16503      +5     
- Misses      14267    14270      +3     
+ Partials     2578     2577      -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@muescha

muescha commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Checked the path against template.json and installer.json, and lib/css-language-server/node/cssServerMain.js is in the vscode-langservers-extracted 4.10.0 tarball, so the text is right. Two things:

  • The screenshot right above the new text, select_template.png, still shows the old command, node "C:/Users/${user.name}/AppData/Local/Programs/Microsoft VS Code/resources/app/extensions/css-language-features/server/dist/node/cssServerMain.js" --stdio, with a red box around it. It now says the opposite of the text below it, so it should be taken again, or cropped to the template selection.
  • "When the language server starts" is only true the first time: the installer has "executeOnStartServer": false, so UserDefinedLanguageServerInstaller.canExecute runs it only until the install is marked as done; after that, only Reinstall does. Maybe: "The first time the language server starts, its installer checks whether the command works, and if not, installs vscode-langservers-extracted with npm." That would also read easier than "if its command doesn't start it".
  • Nit: the installer runs npm install vscode-langservers-extracted --force, the text says it without --force. Fine either way for users, just mentioning it.

Claude Code compared the PR with the template, the installer and the npm package; nothing was installed.

…ay the installer runs at the first start

The screenshot showed the old command, VS Code's copy of the server, in a
red box, which the text below it now contradicts: it shows the template
selection only. The installer runs at the first start of the language
server only, as its executeOnStartServer is false, and then on Reinstall;
the npm command it runs has --force.
@lagergren

Copy link
Copy Markdown
Collaborator Author

Thanks, all three are in f67748f:

  • The screenshot is cropped to the template selection, the name and the tabs, so it no longer shows VS Code's command.
  • Both the README and the docs page now say: the first time the language server starts, its installer checks whether the command works, and if not, installs vscode-langservers-extracted …; after that, only the Reinstall action runs it, as executeOnStartServer is false.
  • The npm command is npm install vscode-langservers-extracted --force, as the installer runs it.

#2052, which builds on this and moves the CSS and ESLint language servers to one shared folder, has the same wording, with its path.

@muescha

muescha commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

LGTM 👍

@lagergren

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@lagergren
lagergren merged commit bba340e into redhat-developer:main Nov 21, 2026
9 checks passed
lagergren added a commit that referenced this pull request Nov 21, 2026
…ir npm package (#2052)

Part of #1960.

Builds on #2051, which should merge first: this branch contains its commit, and changes the paths that #2051 puts into the README and the docs page of the CSS language server.

The CSS and ESLint language server templates both start a language server of the `vscode-langservers-extracted` npm package, and their installers each installed the whole package into a folder of their own, `~/.lsp4ij/lsp/vscode-css-language-server` and `~/.lsp4ij/lsp/vscode-eslint-language-server`. A copy is about 70 MB, most of it TypeScript 4.9, which the package depends on. Both templates and installers now use one folder, `$USER_HOME$/.lsp4ij/lsp/vscode-langservers-extracted`, so the package is installed once.

Each language server runs its installer in a task of its own, so the installers of two language servers can run at the same time: with a CSS file and a JavaScript file opened together, two `npm install` would run in the shared folder at once and break each other's install. An exec task which declares its working directory now runs its command there only while no other exec task runs its command in the same directory (`ExecTask`, a lock per directory). The wait ends with the cancellation of the installation. An exec task without a working directory, as the check `Trying current command` of most installers, which runs in the project, doesn't wait.

The lock also keeps out the exec tasks of the other IDEs with LSP4IJ, as IntelliJ IDEA and WebStorm, which share `~/.lsp4ij`: an exec task also locks a file for its working directory, in `$USER_HOME$/.lsp4ij/locks` (`ExecTask.getLockFile`). If the file can't be opened or locked, as on a file system without file locks, the task goes on as before, kept out only by the other tasks of its IDE.

An installation which runs because the check found the server not installed, and which waited for another one to leave its working directory, runs the check again once it runs, and doesn't run its command if the check then passes (`InstallerContext.isCheckAgainAfterWaiting`, set by the declarative language server and debug adapter installers from `ServerInstallerBase.isInstallingAfterFailedCheck`). So with a CSS file and a JavaScript file opened together, the package is installed once, not twice in a row. A forced installation, as by *Reinstall*, still runs its command.

A language server already created from one of these templates keeps the command and the installer it was created with, so it keeps starting from its own folder, and nothing is installed again. Only a language server created from the template afterwards uses the shared folder.

Not here: the other install folders of #1960, and the folders that the old installs leave behind.

Test: `ExecTaskTest` runs two exec tasks in the same working directory at the same time, each with a command that holds the same file for two seconds and fails if the other holds it: both succeed. Without the lock, one fails. It also runs an installation while another one, which installs the server, runs in the same directory: the one that waited runs the check again, which passes, and not its command, which would fail; when the installation is forced, it runs its command. And it runs an exec task while another JVM, as another IDE, holds the lock file of its directory and the same file: it waits, and succeeds. The test that runs the check again and the one with another JVM fail without the change. `BundledTemplateCommandsTest.aTemplateStartsItsLanguageServerWhereItsInstallerPutsIt` now also checks that the CSS and ESLint templates start the language server where their installers put it, the command of an `npm install` included. It fails with the CSS template on its old folder. With #2054 merged, its `BundledTemplateCommandsTest.anInstallerPutsItsServerInTheFolderOfItsTemplate` lets the CSS and ESLint templates share the folder of their npm package (e6580ed). It and the installer, template, DAP, server and console tests pass (560 tests, 4 Windows-only tests skipped).
@lagergren lagergren added documentation Improvements or additions to documentation template-ls labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation template-ls

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants