Ron89 / thesaurus_query.vim

Multi-language Thesaurus Query and Replacement plugin for Vim/NeoVim
http://www.vim.org/scripts/script.php?script_id=5341
Apache License 2.0
220 stars 23 forks source link

Add support for neovim's `vim.ui.select()` #53

Open lucc opened 2 years ago

lucc commented 2 years ago

Neovim provides a lua function [vim.ui.select()](https://neovim.io/doc/user/lua.html#vim.ui.select()) that can be used by plugins to ask the user to select one of several entries. Other plugins can than overwrite this function and provide the user with nice and fancy picker/select interfaces. The idea is that plugins like thesaurus_query need not bother implementing their own user interaction just to select an entry and advanced plugins like telescope can take care of the interface.

I know thesaurus_query also supports Vim so this would not rid you of the need to write your own select interface but you could leavage the advantage of this neovim interface.

Is this a feasible feature request?

Ron89 commented 2 years ago

hmm, many thesaurus APIs actually group the thesaurus by the word's different meaning. e.g. mean group 1: way, method, etc. group 2: selfish, miserly, stingy, etc.

Personally I find displaying everything in one drop-down list hard to use. But I think I have opened a mode for people to use drop-down list method to use it as well. Don't know if it helps?

https://github.com/Ron89/thesaurus_query.vim/blob/23d8aa3f7d1a785e31e760e1b6b3b4c18abf8332/doc/thesaurus_query.txt#L148

lucc commented 2 years ago

I think my proposal is for the:ThesaurusQueryReplaceCurrentWord but the autocompletion option also looks nice, I did not know that.