Skip to content

[FEATURE] Markdown LSP #3467

Closed
Closed

Description

@pbek

It (maybe) would be great to have integration for a Markdown LSP, like https://github.com/artempyanykh/marksman.

Activity

  1. added
    Type: Feature
    on Feb 21, 2026
  2. added 10 commits that reference this issue on Feb 21, 2026
  3. pbek commented on Feb 22, 2026

    @pbek
    OwnerAuthor

    26.2.9

    • Added experimental Markdown LSP support with settings for server command/arguments
      (for #3467)
      • The integration is experimental and currently provides completions via the autocomplete action
      • LSP info logs are no longer shown as warnings; only error-like stderr output is surfaced
      • Diagnostics published by the LSP server are now displayed as wave underlines in the editor;
        severity is reflected by color: red for errors, orange for warnings, blue for information,
        and green for hints
      • Hovering over a diagnostic underline shows a tooltip with the diagnostic message
      • Diagnostics are cleared automatically when switching to a different note
  4. added 3 commits that reference this issue on Feb 22, 2026
  5. 32 remaining items

  6. added 5 commits that reference this issue on Apr 27, 2026
  7. pbek commented on Apr 27, 2026

    @pbek
    OwnerAuthor

    26.4.24

    • Fixed a URI percent-encoding mismatch that prevented Markdown LSP diagnostics
      from being applied when a note filename contains spaces; the incoming LSP URI
      (e.g. Top%20heading.md) is now decoded with QUrl::fromPercentEncoding
      before being compared to the stored document URI so wave-underlines appear
      correctly for notes with spaces in their name (for #3467)
    • Added an inline Markdown LSP diagnostic context menu section that appears
      when right-clicking on a wave-underlined region in the note editor; it shows
      the diagnostic message as a header and fetches available LSP code actions
      (fixes) via a short synchronous wait, then lists each fix as a clickable menu
      item — matching the same UX pattern used by the LanguageTool and Harper
      context menus; the old standalone Code actions menu item in the
      Markdown LSP submenu has been removed in favour of this inline approach
      (for #3467)
    • Fixed a protocol bug where the Markdown LSP client did not respond to
      server-initiated requests (e.g. client/registerCapability), causing the
      LSP server to stall after the initial didOpen; subsequent didChange
      notifications were silently ignored by the server so diagnostics never
      refreshed after the first note load (for #3467)
    • Fixed stale Markdown LSP wave underlines remaining visible after applying
      a quick-fix or manually editing the text to resolve a diagnostic; when fresh
      diagnostics arrive from the server, blocks that previously had diagnostics
      are now also rehighlighted so their old underlines are cleared
      (for #3467)
    • Moved the Markdown LSP configuration out of the Editor settings into its
      own Markdown LSP settings page to make the language-server options easier
      to find and manage (for #3467)
    • Added Auto-detect and Test Connection actions to the Markdown LSP
      settings page so QOwnNotes can discover supported servers such as marksman
      and rumdl, prefill the correct command-line arguments, and verify that the
      configured LSP server completes its initialization handshake
      (for #3467)
    • Fixed switching the configured Markdown LSP service in the settings so the
      editor now restarts the running LSP client and reconnects the current note
      immediately instead of continuing to talk to the previously selected server
      until the application is restarted (for #3467)

    There now is a new release, could you please test it and report if it works for you?

    The 2nd heading now get wiggles for me:

    # Top heading
    
    text
    
    #### This skips h3 - should get a red wiggle
    
    text
  8. added 6 commits that reference this issue on Apr 28, 2026
  9. pbek commented on Apr 29, 2026

    @pbek
    OwnerAuthor

    26.4.25

    • Major performance improvement for the Markdown LSP integration on large notes
      (for #3467)
      • Added a new MarkdownLspDocumentTracker class that uses Qt's
        QTextDocument::contentsChange signal to track edits incrementally instead
        of calling toPlainText() on every keystroke; the per-keystroke cost drops
        from O(n) (full-document copy) to O(log n + delta)
      • The client now reads the server's textDocumentSync capability from the
        initialize response and sends incremental didChange payloads
        (TextDocumentSyncKind=2) when the server supports it (e.g. marksman),
        falling back to full-text sync for servers like rumdl
      • Optimized the LSP diagnostic wave-underline painter in the highlighter to
        batch contiguous characters with the same base format into single
        setFormat() calls, reducing format-range fragmentation from O(characters)
        to O(format-runs)
      • When the Markdown LSP feature is disabled, zero additional work is
        performed on the text-change hot path — no toPlainText(), no timer
        restarts, no signal connections fire
    • Added a global Ignore rule action to the inline Markdown LSP diagnostic
      context menu and a Reset ignored rules button on the Markdown LSP
      settings page, so Markdown LSP rules can be suppressed across all notes and
      later restored from one place (for #3467)
  10. added a commit that references this issue on Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions