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 synonymer.se as a backend #47

Open noooxxi opened 4 years ago

noooxxi commented 4 years ago

Hi.

Please consider adding support for Swedish via the synonymer.se backend.

Thanks.

Ron89 commented 4 years ago

Hi @noooxxi ,

Thanks for your interests. To add a backend, you can create a python file in folder autoload/thesaurus_query/backends/. It can be picked up and loaded by the framework as long as this file has query() method to take queries, identifier and language to describe your backend name and language it is for.

For example, you can see the implementation using openthesaurus.de API for German thesaurus query: https://github.com/Ron89/thesaurus_query.vim/blob/master/autoload/thesaurus_query/backends/openthesaurus_de_lookup.py