Skip to content
Kotoshu Kotoshu 言修

Documentation

Editor integration via LSP

gem install kotoshu-lsp — diagnostics, quick-fixes, and hover suggestions in Neovim, VS Code, Emacs, and any editor that speaks the Language Server Protocol.

One binary, every editor. kotoshu-lsp wraps the gem’s Kotoshu.check and speaks the Language Server Protocol over stdio.

Install

gem install kotoshu-lsp

Requires the kotoshu gem, installed automatically as a dependency. Set up at least one language first — kotoshu setup en — the server never downloads on its own.

Neovim

-- built-in LSP, lspconfig entry pending upstream
vim.lsp.start({
name = 'kotoshu',
cmd = { 'kotoshu-lsp' },
filetypes = { 'text', 'markdown', 'asciidoc' },
})

-- or, once lspconfig gains an entry:
require('lspconfig').kotoshu.setup({
cmd = { 'kotoshu-lsp' },
filetypes = { 'text', 'markdown', 'asciidoc' },
})

Emacs

;; eglot
(add-to-list 'eglot-server-programs
'((text-mode markdown-mode) . ("kotoshu-lsp")))

;; lsp-mode
(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection '("kotoshu-lsp"))
:activation-fn (lsp-activate-on "plaintext" "markdown")
:server-id 'kotoshu))

VS Code

A packaged extension is on the roadmap; until then wire the binary manually through the languageServerExample boilerplate — command: "kotoshu-lsp", languages plaintext and markdown.

What you get

MethodBehavior
didOpen / didChangepublishes one diagnostic per misspelled word, top suggestions attached
codeActionone quick-fix per suggestion — e.g. Kotoshu: change to "hello" — plus add-to-personal-dictionary
hovertop suggestions for the flagged word under the cursor
completionnot implemented — returns nil

Configuration is environment-based: KOTOSHU_LSP_LOG (a log path), KOTOSHU_LSP_LOG_LEVEL (debug/info/warn/error), and KOTOSHU_OFFLINE to pin the server to cached dictionaries.

Verified 2026-09-05 — an LSP initialize/didOpen/codeAction handshake executed over stdio against kotoshu-lsp 0.1.0: diagnostics published for both misspellings, quick-fixes returned ranked. kotoshu-lsp repo