From 530be49aae353294523d6995b1538a5ad233f802 Mon Sep 17 00:00:00 2001 From: matze-dd <45763831+matze-dd@users.noreply.github.com> Date: Wed, 21 Oct 2020 14:51:57 +0200 Subject: [PATCH 1/3] vlty: respect Vim variable fileencoding --- compiler/vlty.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/vlty.vim b/compiler/vlty.vim index 91c0fd4300..c8fe0a927e 100644 --- a/compiler/vlty.vim +++ b/compiler/vlty.vim @@ -61,6 +61,9 @@ let &l:makeprg = \ . (s:vlty.server ==# 'no' \ ? '' \ : ' --server ' . s:vlty.server) + \ . ' --encoding ' . (s:vlty.encoding ==# 'auto' + \ ? (empty(&l:fileencoding) ? &l:encoding : &l:fileencoding) + \ : s:vlty.encoding) \ . ' --language ' . s:language \ . ' --disable "' . s:vlty.lt_disable . '"' \ . ' --enable "' . s:vlty.lt_enable . '"' From 2a9377352e67df9004678e3449f39f3428740ecc Mon Sep 17 00:00:00 2001 From: matze-dd <45763831+matze-dd@users.noreply.github.com> Date: Wed, 21 Oct 2020 14:52:28 +0200 Subject: [PATCH 2/3] vlty: respect Vim variable fileencoding --- doc/vimtex.txt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/doc/vimtex.txt b/doc/vimtex.txt index e026dfd0ac..5f153148d2 100644 --- a/doc/vimtex.txt +++ b/doc/vimtex.txt @@ -1628,8 +1628,9 @@ OPTIONS *vimtex-options* \} *g:vimtex_grammar_vlty* - This option is used to configure the `vlty` grammar checker. It is a dictionary - with the following keys (see |vimtex-grammar-vlty| for more details): + This option is used to configure the `vlty` grammar checker. It is a + dictionary with the following keys (see |vimtex-grammar-vlty| for more + details): lt_directory~ Path to the `LanguageTool` software, if installed manually. @@ -1651,7 +1652,8 @@ OPTIONS *vimtex-options* short texts. Possible values are: `no` Do not use a server. - `my` Use a local `LanguageTool` server. If not yet running, it is started. + `my` Use a local `LanguageTool` server. If not yet running, it is + started. `lt` Contact the Web server provided by `LanguageTool`. In this case, no local installation is necessary. Please see the following page for conditions and restrictions: @@ -1666,6 +1668,10 @@ OPTIONS *vimtex-options* If set to 1, then `LanguageTool's` replacement suggestions are included in the |quickfix| or |location-list| messages. + encoding~ + Encoding of the (La)TeX source file. For default value `auto`, the + encoding is taken from |fileencoding| or |encoding|. + Default: > let g:vimtex_grammar_vlty = { @@ -1678,6 +1684,7 @@ OPTIONS *vimtex-options* \ 'server': 'no', \ 'shell_options': '', \ 'show_suggestions': 0, + \ 'encoding': 'auto', \} *g:vimtex_imaps_enabled* From f8b4c078acce5c65d5f28d6104abc4515256b7f3 Mon Sep 17 00:00:00 2001 From: matze-dd <45763831+matze-dd@users.noreply.github.com> Date: Wed, 21 Oct 2020 14:53:01 +0200 Subject: [PATCH 3/3] vlty: respect Vim variable fileencoding --- autoload/vimtex/options.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/autoload/vimtex/options.vim b/autoload/vimtex/options.vim index e45f33d4d7..aa9f17cfa5 100644 --- a/autoload/vimtex/options.vim +++ b/autoload/vimtex/options.vim @@ -137,6 +137,7 @@ function! vimtex#options#init() abort " {{{1 \ 'server': 'no', \ 'shell_options': '', \ 'show_suggestions': 0, + \ 'encoding': 'auto', \}) call s:init_option('vimtex_imaps_enabled', 1)