From ef1bd7fa6a89ff5e4c7ee054dc4d9ff21148bf70 Mon Sep 17 00:00:00 2001 From: Dmytro Meleshko Date: Mon, 9 Nov 2020 13:43:23 +0200 Subject: [PATCH] [nvim] fix comments and commentstring options in the nginx filetype --- nvim/after/syntax/nginx.vim | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 nvim/after/syntax/nginx.vim diff --git a/nvim/after/syntax/nginx.vim b/nvim/after/syntax/nginx.vim new file mode 100644 index 0000000..3ef6892 --- /dev/null +++ b/nvim/after/syntax/nginx.vim @@ -0,0 +1,8 @@ +" Guess what. The `syntax/jinja.vim` script for the jinja templating language, +" which is not included in neither Vim's runtime, nor Neovim's runtime, nor in +" vim-polyglot (so the only way to get it is to install the python package) is +" sourced in `syntax/nginx.vim` in vim-polyglot, which resets the `commentstring` +" set in `ftplugin/nginx.vim` and sets `comments` to some garbage. This script +" undoes that damage. +let &l:comments = &g:comments +let &l:commentstring = '# %s'