Academy → Using HermesOfficial documentation · clear explanation

LSP — Semantic Diagnostics

LSP — Semantic Diagnostics

Beginner13 minutes3 questions2026-08-09
The idea in one minute

Start with meaning, then move to detail.

This lesson explains LSP — Semantic Diagnostics as part of getting started with Hermes correctly. You will learn what it does, when it matters, and the smallest safe test that proves it works.

If you are new

If you are new, do not memorize names. Focus on three questions: what problem does this solve, what access does it need, and how can you verify the result?

For hands-on use

For practice, inspect the first example, identify its effects, run it on test data, and compare the result with the source claim.

For specialists

For advanced readers, inspect When LSP runs, Supported languages, PowerShell, then verify failure modes and version compatibility.

What do you need first?

No prior experience is required; follow the steps on a safe test setup first.

What will you know?

A clear outcome before you read.

  • Understand LSP — Semantic Diagnostics without assumed prior knowledge.
  • Separate the source description from what still needs testing in your environment.
  • Read the first command and identify its inputs and outputs before copying it.
Official page description

Real language servers (pyright, gopls, rust-analyzer, …) wired into the post-write lint check used by write_file and patch.

Topic map

What does the source say, and in what order?

  1. 01
    When LSP runs

    Start here to understand the core idea or structure.

  2. 02
    Supported languages

    Read this after the foundation, then connect it to the previous step.

  3. 03
    PowerShell

    Read this after the foundation, then connect it to the previous step.

  4. 04
    CLI

    Read this after the foundation, then connect it to the previous step.

  5. 05
    Configuration

    Read this after the foundation, then connect it to the previous step.

  6. 06
    Per-server keys

    Read this after the foundation, then connect it to the previous step.

  7. 07
    Installation locations

    Read this after the foundation, then connect it to the previous step.

  8. 08
    Performance characteristics

    Read this after the foundation, then connect it to the previous step.

  9. 09
    Disabling

    Read this after the foundation, then connect it to the previous step.

  10. 10
    Troubleshooting

    Finish here to verify the result and special cases.

Examples from the official page

Copy only after you understand the effect.

{ "bytes_written": 42, "dirs_created": false, "lint": {"status": "ok", "output": ""}, "lsp_diagnostics": "LSP diagnostics introduced by this edit:\n<diagnostics file=\"/path/to/foo.py\">\nERROR [42:5] Cannot find name 'foo' [reportUndefinedVariable] (Pyright)\nERROR [50:1] Argument of type \"str\" is not assignable to \"int\" [reportArgumentType] (Pyright)\n</diagnostics>" }
hermes lsp status # service state + per-server install status hermes lsp list # registry, optionally --installed-only hermes lsp install <id> # eagerly install one server hermes lsp install-all # try every server with a known recipe hermes lsp restart # tear down running clients hermes lsp which <id> # print resolved binary path
# config.yaml lsp: # Master toggle. Disabling skips the entire subsystem — no servers # spawn, no background event loop runs. enabled: true # How long to wait for diagnostics after each write. wait_mode: document # "document" or "full" # Max seconds to wait for the server to re-check the file after an # edit. Only *fresh* diagnostics (produced for the post-edit # content) are ever reported; if the server doesn't finish within # this budget, the edit reports "no LSP data" rather than stale # errors from before the edit. Raise this for slow servers on big # projects (
Try it now

Read the first command and identify its inputs and outputs before copying it.

Match every command to your installed Hermes version, review the files and accounts it can reach, and use non-sensitive data for the first test. If this explanation differs from the source, the official source wins.

Knowledge check

Three decisions before completion.

1. What is the source of truth when “LSP — Semantic Diagnostics” changes?
2. What is the best way to apply this lesson?
3. What should happen before a step can modify files or an external account?