No description
  • Lua 57.5%
  • Vim Script 42.5%
Find a file
2026-10-14 09:59:58 -05:00
autoload/mocha fix autoload guard collision 2026-10-14 09:59:58 -05:00
lua/mocha/source mocha-lsp: initial import 2026-10-14 09:12:09 -05:00
plugin mocha-lsp: initial import 2026-10-14 09:12:09 -05:00
LICENSE mocha-lsp: initial import 2026-10-14 09:12:09 -05:00
README.md mocha-lsp: initial import 2026-10-14 09:12:09 -05:00

mocha-lsp

vim-lsp completion source for mocha, classic Vim 9.1 (+lua, Lua 5.1, +job).

Ports the behavior of the vim-lsp completion glue: picks the first allowed server with a completionProvider capability (cached per server), sends textDocument/completion async, converts the reply with lsp#omni#get_vim_completion_items (kind text, dup=1, icase=1, snippet abbr with ~ are that function's output, kept as-is), and re-kicks the engine via mocha.complete.init.async_emit('lsp', json) when the reply lands. Re-requests only when the last input char is a server trigger character or .; reuses cached items while the keyword tail is a prefix extension on the same line with monotonic column.

Contract

  • name lsp, mark [lsp], rank 500, all filetypes, volatile

Variables

  • g:mocha#lsp#log ('') — set to a path to append debug lines.

License

MIT — see LICENSE.