docs(sublime): document setup for linting git commit messages - #4029
costajohnt wants to merge 3 commits into
Conversation
|
Thanks for submitting this. Can you just double-confirm that you tried this in a real Sublime editor? I want to make sure it covers everything. |
|
Yes, tried it now in Sublime Text 4 (build 4200) with LSP from Package Control and harper-ls 2.9.1 on macOS. Opened a
Nothing else was needed. The Git Formats package that ships with Sublime already gives the buffer the |
If you could do a little screen recording of it working that would be excellent. |
|
Here's a recording. Making it turned up a gap in the docs: harper-ls was publishing the diagnostics fine (that's what I'd been checking in the LSP log panel), but LSP for Sublime Text drops diagnostics for any file matching Screen.Recording.2026-09-18.at.10.55.50.AM.mov |
Issues
Closes #3781
Follow-up to #3782, which was closed in favor of documenting the configuration instead of widening the languageId match arm.
Description
Sublime Text reports
languageId: "git"for commit buffers, andharper-lsroutes commit messages by thegit-commitlanguageId, so commit messages go unlinted out of the box. There are two things a user has to do, and neither is currently documented:text.git.committo theselectorin theharper-lsclient config, so LSP attaches to the buffer at all."text.git.commit": "git-commit"inlanguage-ids.sublime-settings, so the client sends a languageIdharper-lsrecognizes.This adds a "Linting Git Commit Messages" section to the Sublime Text integration page covering both.
Demo
Not applicable, documentation only.
How Has This Been Tested?
Documentation only, no code paths touched. The
git-commitlanguageId in the mapping matches the existing match arm inharper-ls/src/backend.rs, and the workaround itself is the one the reporter confirmed working in #3781.AI Disclosure
If Your PR Implements or Enhances a Linter
Not applicable.
Checklist