I thought the same about LSP support but @ulis has proven me wrong. I’d rater use snippets example to figure out how to improve plugin API to make implementation possible. I think we agree that with current %sh scopes it would be madness to write something that complex.
Plugin like Ultisnip needs to have quite unrestricted access to editor’s internal state.
There was short discussion about this topic on Github:
Maybe we should open new thread, here on the forum to discuss it further?
Or maybe I’m wrong and I think from perspective of other editors? Maybe this is possible with current system, I’m just not clever enough to figure it out.
Another free plugin idea for somebody with some time on their hands: word completion for natural language courtesy of a spell-checker.
When given a word on standard input, followed by a newline, the hunspell tool will check it and print a response line. If the response line begins with & (ampersand), the word is misspelled and hunspell provides suggestions:
the character offset of the word from the beginning of the line
: (colon)
the suggestions, separated by , (comma) and space
It should be pretty straight-forward to transform the hunspell output into a completions option (much like racer.kak so we can have sensible completions for plain-text documents.
Right now, I have a hack that reads all of /usr/share/dict/words into the static_words option, which works but it can make Kakoune quite sluggish, and Kakoune’s ranking of completions isn’t really tuned for natural language. I suspect using a tool designed for the task would probably do a better job.
I am loving Kakoune and want to thank everyone involved and all the contributors. I wish Kakoune would become a mainstream editor.
I am a web developer and I would like a plugin that would work better with HTML. map -docstring "xml tag object" global object t %{c<lt>([\w.]+)\b[^>]*?(?<lt>!/)>,<lt>/([\w.]+)\b[^>]*?(?<lt>!/)><ret>}
This helps, but theres only so much it can do. A plugin to traverse HTML documents, create, select and manipulate tags would be awesome for web development.
BTW emmet-cli is awesome @Delapouite. Thanks.
Also, I can’t remember where I read it, but a tree-sitter like feature may soon be offered by LSP servers themselves, so we may be able to rely on only 1 tool https://github.com/ul/kak-lsp/