Plugins ideas

#21

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.

#22

It doesn’t, feel free to file an issue to add support if you hit language server which doesn’t support stdio and works only via sockets.

#23

You could also implement a simple netcat wrapper around the language server, like such: https://github.com/languagetool-language-server/languagetool-languageserver/issues/3

1 Like
#24

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:

$ echo 'fud' | hunspell -d en_AU
Hunspell 1.7.0
& fud 15 0: FUD, food, dud, feud, fund, fed, fad, fun, fur, fut, cud, fug, fum, mud, pud

After &, the fields are:

  • the input word
  • the number of 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.

Support for multiple dictionaries
pinned #25
#26

Some git related things I miss, which are probably a bit easier:

  • Open 2 windows with git status and git diff to assist in authoring a commit. (https://github.com/rhysd/committia.vim)
  • Lint/Format/Highlight the message according to rules.
  • kakdiff, but I believe this was already discussed/thought about.
#27

Some git related things I miss:

Though I understand that this is insane task to make magit clone for Kakoune

1 Like
#28

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.

#29

One approach to select and edit HTML tags could be to let kak-tree handle it: https://github.com/ul/kak-tree

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/

1 Like