Skip to content

Commit aa9c7bb

Browse files
committed
Add NeoVim compatibility
1 parent b9e469c commit aa9c7bb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

plugin/criticmarkup.vim

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,14 @@ augroup criticmarkup
22
autocmd!
33
autocmd Filetype pandoc,markdown,mkd,txt call criticmarkup#Init()
44
autocmd Syntax pandoc,markdown,mkd,txt call criticmarkup#InjectHighlighting()
5+
" The unorthodox way this plugin injects new syntax rules is broken in
6+
" Neovim which takes a different approach to initializing the GUI (which
7+
" is an optional component rather than an assumed part of the system). As
8+
" a result we don't get initialized at all unless the user happens to
9+
" set filetype a second time after initial loading or loads a buffer after
10+
" the GUI is loaded. This hack sidesteps that and makes sure we get a
11+
" chance to get started. See https://github.com/neovim/neovim/issues/2953
12+
if has('nvim')
13+
autocmd VimEnter * doautoa Syntax,Filetype
14+
endif
515
augroup END

0 commit comments

Comments
 (0)