Skip to content

CoC language servers, proselint 0.16, Markdown linting, inert #44 items - #143

Merged
harleypig merged 7 commits into
masterfrom
fix/intellisense-round-2
Nov 4, 2026
Merged

harleypig merged 7 commits into
masterfrom
fix/intellisense-round-2

Conversation

@harleypig

Copy link
Copy Markdown
Owner

Summary

Language servers, prose linting and Markdown linting in the editor, plus two
inert items from #44. One commit per issue:

Closes #21
Refs #133
Closes #132
Closes #51
Closes #104
Refs #44

#133 stays open (Refs) until a sibling pull request this round adds
coc-html to g:coc_global_extensions in .vimrc. Until then HTML has no
language server, but it had no working one before either.

#104 is closed here because this PR carries its last item, the
docs/proselint.md lines. The rest of #104 landed in #140.

Decisions (operator's standing rule: remove, make work, or keep with a note)

Item Choice Why
languageserver.dockerfile Removed coc-docker starts the same server
languageserver.terraform Kept, with a note No extension bundles terraform-ls
languageserver.html Removed; coc-html instead The block could not start; coc-html bundles the server and follows #21
proselint in CoC Made to work proselint 0.16 check on stdin, no dead --config
prettier Markdown fixer Removed Breaks MD004; it has no option to keep *
markdownlint config Made to work --config to the nearest file, set per buffer
ALEVirtualText* highlights Removed Virtual text is deliberately off
.eslintrc.json Removed No linter or extension reads it

Sources

  • proselint 0.16.0: proselint --help and proselint check --help from
    the PyPI release, run in a scratch venv; config search order from the
    project README (## Configuring).
  • Prettier: docs/options.md lists no list-marker option.
  • markdownlint-cli README, ## Configuration: the .markdownlint.* file
    is read from "the current folder".
  • coc-html 1.9.2 package.json: html.filetypes and its default.
  • coc.nvim doc/coc.txt coc-document-filetype: only a few filetypes are
    remapped; others go through as they are.

Changes needed outside this PR

  • .vimrc: add 'coc-html' to g:coc_global_extensions (sibling PR).
  • bin/post-clone: the dockerfile-language-server-nodejs install (line
    37) and the prettier install (line 39) are no longer used (sibling PR).
  • ALE submodule: the pinned ALE (80ff84db) runs proselint %t for
    Markdown, which proselint 0.16 rejects. Upstream fixed it in d59cb7b3
    (fix-proselint, fix-proselint dense-analysis/ale#5074). docs/proselint.md says so.

After #140 merges

Apply these on rebase, before this PR merges:

  1. docs/editor-settings.md, the diagnostic-colors table: drop
    ALEVirtualTextError, ALEVirtualTextWarning and ALEVirtualTextInfo
    from the Groups column, and drop them from the sentence "The Coc*Sign
    and ALEVirtualText* groups are set but do not show". Any line range
    cited for diagnostic-colors.vim shrinks by 16 lines (71-86 are gone).
  2. docs/docker.md: the Dockerfile language server is started by
    coc-docker from its own bundled copy, not by a block in
    coc-settings.json. Credit coc-docker, and stop pointing the
    language-server configuration at coc-settings.json. The External
    Packages entry for dockerfile-language-server-nodejs goes once
    post-clone stops installing it.

Test plan

  • bats tests/vim: 56 ok, 0 failed.
  • bats tests/shell: all ok.
  • markdownlint docs/html.md docs/proselint.md: clean.

Testing evaluation

Run by the author to the qa-tester's standard; this repository declares no
team-managed: sentinel.

  1. Verdict: needs tests, written in this PR as the new
    tests/vim/intellisense.bats (7 tests), plus one changed line in
    tests/vim/load.bats.
  2. Automatable: yes. bats in headless Vim, per .claude/TESTS.md. The
    coc-settings tests decode coc-settings.json after dropping its
    whole-line comments; a file that will not decode fails.
  3. Falsifiers, each seen red against master and green on this branch
    (test 6 is the over-match guard and is green on both by design):
    • Languageserver keys: red while dockerfile or html is present.
    • html.filetypes: red without html.mustache, or with the key absent.
    • proselint args: red on anything but ["check"].
    • Markdown fixers: red while g:ale_fixers.markdown exists.
    • markdownlint, nearest config: red when a buffer below a
      .markdownlint.yaml, opened from another cwd, gets no --config.
    • markdownlint, no config: red if the ftplugin sets the option where no
      config file exists.
    • Virtual text: red while our file gives ALEVirtualText* a background.
  4. Disposition: written in this PR.
  5. Entry-point reach: n/a. Nothing here is a guard, gate or refusal
    path.

Manual verification

  1. Where: a terminal, in this checkout.
  2. What to do and what success looks like:
    • a. Open a Dockerfile in Vim with CoC running, wait for CoC to start,
      and run :echo map(CocAction('services'), 'v:val.id . ":" . v:val.state').
      Success: docker:running and no languageserver.dockerfile entry.
    • b. Open a doc in this repository from another directory
      (cd /tmp && vim ~/projects/dotvim/docs/x.md) and run
      :echo b:ale_markdown_markdownlint_options. Success: --config '…/dotvim/.markdownlint.yaml'. Put a - dash bullet in the file and
      save. Success: ALE reports MD004 "Expected: asterisk; Actual: dash",
      and the bullet is not rewritten.
    • c. Pipe text to the CoC proselint command: printf 'This is very unique.\n' | proselint check. Success: <stdin>:1:9: uncomparables: ….
    • d. With coc-html installed, open a .mustache file and check
      CocAction('services') lists the HTML server running.
  3. Failure looks like: in (a), languageserver.dockerfile listed again;
    in (b), no MD004 report, or the dash rewritten on save; in (c), invalid choice.
  4. What happened:
    • a. Run in a live Vim with CoC (node present, the worktree's
      coc-settings.json): services=["languageserver.terraform:init", "diagnostic-languageserver:init","docker:running"]. The same Vim on
      master's settings listed languageserver.dockerfile:running and
      docker:running together.
    • b. Ran the exact command ALE built for a buffer in docs/, from a
      scratch directory: 'markdownlint' --config '…/.markdownlint.yaml' %s.
      With the option it reported MD004/ul-style … [Expected: asterisk; Actual: dash], exit 1. Without it, from the same directory, nothing,
      exit 0.
    • c. proselint 0.16.0 in a scratch venv: <stdin>:1:9: uncomparables: …,
      exit 1 (findings). The old command line gave invalid choice: '-',
      exit 2.
    • d. Not run. coc-html is not installed on this host. A packed copy
      loaded from a scratch CoC data directory failed to start without its
      npm dependencies, and installing them was declined in this
      environment. To run it: coc-html installed through .vimrc's list
      (sibling PR), then step d as written.

Review

code-review-style self-review of the full diff. It found no defects.
Observations:

  • after/ftplugin/markdown.vim calls ALE's autoload functions. ALE is a
    start package that loads with or without Node (tests/vim/coc.bats), so
    they are always available.
  • The "no config" test assumes no .markdownlint.* in any directory above
    the test's temp directory. That holds on CI and on this host.
  • The late ale.vim still sets the Markdown linters globally under a
    "TODO: Move to ftplugin/markdown.vim". Moving them is out of scope here.

Completion report

  1. The functionality works: met. See Manual verification; step d is
    pending coc-html (sibling PR) and The HTML language server in coc-settings never starts or attaches #133 stays open on it.
  2. The access model is defined: not applicable. Editor configuration
    with no access surface.
  3. Permissions are implemented: not applicable, for the same reason.
  4. Audit logging is implemented: not applicable, for the same reason.
  5. Validation is complete: not applicable. No input is taken.
  6. Errors are handled: met. With no config file the ftplugin leaves
    markdownlint's options alone (test 6).
  7. Testing is complete: met. See Testing evaluation.
  8. Documentation exists: met for docs/html.md and docs/proselint.md.
    docs/docker.md and docs/editor-settings.md are updated after docs: editor settings page, statusline row, language-page drift (#109, #102, #104) #140,
    as described above.
  9. The AI Completion Report has been produced: this section.

Co-Authored-By: AI Agent noreply@harleypig.com

harleypig and others added 5 commits November 3, 2026 15:51
…s stays

coc-docker, already in the extension list, starts the Dockerfile language
server from its own bundled copy (its activation covers the dockerfile
filetype), so the hand-written languageserver.dockerfile block started the
same server a second time. It is removed.

terraform-ls has no CoC extension that bundles it; the one published
extension only starts the same external binary. The hand-written block
stays, with a comment saying why.

The new tests/vim/intellisense.bats checks the languageserver keys CoC is
given.

Refs #21

Co-Authored-By: AI Agent <noreply@harleypig.com>
…tarted

languageserver.html ran `vscode-html-languageservice`, an npm library that
ships no executable, so the server never started. Its filetype list also
named `mustache`, while vim-polyglot sets `html.mustache` and CoC passes
the whole filetype as the language id, so it would not have attached to
Mustache templates either.

coc-html bundles the same language service and starts it itself, which is
the #21 case: the hand-written block is removed. Its `html.filetypes`
setting keeps coc-html's defaults and adds `html.mustache`, keeping the
old block's intent for Mustache. Adding coc-html to
g:coc_global_extensions is a .vimrc change made in a sibling pull request.

docs/html.md now describes coc-html in place of the library.

Refs #133

Co-Authored-By: AI Agent <noreply@harleypig.com>
The diagnostic-languageserver entry ran `proselint --config
$HOME/.vim/.proselint-config.json -`. proselint 0.16.0 (the current
release) takes a subcommand, so that line fails with "invalid choice:
'-'", and the config file it named has not existed since 2023.

It now runs `proselint check`, which reads the buffer on stdin when given
no paths. There is no --config: proselint finds a proselint.json in or
above the working directory, or $XDG_CONFIG_HOME/proselint/config.json,
and falls back to its defaults. The output format the existing
formatPattern reads is unchanged, and its columns are 1-based, which is
what diagnostic-languageserver expects with offsetColumn 0. Checked
against proselint 0.16.0 and its README.

coc-diagnostic's own built-in proselint preset uses the old `-j` flag, so
the entry stays ours rather than falling back to it.

docs/proselint.md drops the missing config file, and (for #104) says
that ALE also runs proselint and markdownlint on Markdown, that the
pinned ALE still runs proselint's old command line there, and that the
problems show through ALE in the gutter and the quickfix list.

Closes #132
Refs #104

Co-Authored-By: AI Agent <noreply@harleypig.com>
prettier was ALE's Markdown fixer, run on every save. It writes every
bullet as `-` and has no option to keep `*`, so each save undid what
CONVENTIONS.md and MD004 in .markdownlint.yaml ask for (checked with
prettier 3.9.6). It is dropped; Markdown now gets only the global fixers.

markdownlint-cli reads .markdownlint.{jsonc,json,yaml,yml} only from the
directory it runs in, and ALE runs it from Vim's working directory, so a
file opened from anywhere else was linted with the defaults. A new
after/ftplugin/markdown.vim finds the nearest such file above the buffer
and passes it with --config, buffer-locally.

load.bats asserted the prettier fixer; that line now expects no Markdown
key.

Closes #51

Co-Authored-By: AI Agent <noreply@harleypig.com>
plugin/diagnostic-colors.vim set the ALEVirtualTextError, Warning and
Info highlights, but ALE's virtual text is switched off
(g:ale_virtualtext_cursor = 'disabled' in the early ale.vim), so nothing
drew with them. They are removed; were virtual text turned back on, ALE
links them to its own defaults.

.eslintrc.json configured ESLint, which nothing runs: ALE lints only the
filetypes it is given, none of them JavaScript, and coc-eslint is no
longer installed. It is removed.

Refs #44

Co-Authored-By: AI Agent <noreply@harleypig.com>
harleypig and others added 2 commits November 4, 2026 00:50
…, #44)

The ALEVirtualText* highlights and the hand-written Dockerfile language
server are removed in this PR; #140 documented both before that.

Co-Authored-By: AI Agent <noreply@harleypig.com>
@harleypig
harleypig merged commit cc52416 into master Nov 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment