valentjn/ltex-ls

Some way to change buffer's language.

FalcoGer opened this issue · 0 comments

Is your feature request related to a problem? Please describe.
I am German, but I often write English text. So I often want to switch the language between the two. It would be great to do this per buffer. But the only way I know how to switch the language is to open :CocConfig and change ltex.language, which is cumbersome since it's a global setting. It also is prone to foregeting to set back to the default.

Describe the solution you'd like
It would be nice if there were a command or b:variable that can be used to change the language of the current buffer. This should also set vim's spelllang option, which is used by various other plugins, such as vim-airline, to display the current buffer's language.

Describe alternatives you've considered
ltex could read vim's spelllang option, which is per buffer, and use that to determine the language. A special value for ltex.language, like vim-spelllang should be added.

Additional context
N/A