Skip to content

docs(sublime): document setup for linting git commit messages - #4029

Open
costajohnt wants to merge 2 commits into
Automattic:masterfrom
costajohnt:docs/sublime-git-commit-setup
Open

docs(sublime): document setup for linting git commit messages#4029
costajohnt wants to merge 2 commits into
Automattic:masterfrom
costajohnt:docs/sublime-git-commit-setup

Conversation

@costajohnt

Copy link
Copy Markdown

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, and harper-ls routes commit messages by the git-commit languageId, so commit messages go unlinted out of the box. There are two things a user has to do, and neither is currently documented:

  1. Add text.git.commit to the selector in the harper-ls client config, so LSP attaches to the buffer at all.
  2. Map "text.git.commit": "git-commit" in language-ids.sublime-settings, so the client sends a languageId harper-ls recognizes.

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-commit languageId in the mapping matches the existing match arm in harper-ls/src/backend.rs, and the workaround itself is the one the reporter confirmed working in #3781.

AI Disclosure

  • I used an AI agent interactively.

If Your PR Implements or Enhances a Linter

Not applicable.

Checklist

  • I have performed a self-review of my own code
  • I have considered splitting this into smaller pull requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support sublime-text git message

1 participant