aboutsummaryrefslogtreecommitdiff
path: root/plugins.vim
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2020-09-20 12:15:59 +0800
committerjdhao <jdhao@hotmail.com>2020-09-20 12:15:59 +0800
commitc146a50967f6dae2e411fb00b342545e2ece3700 (patch)
tree027344d81ad9dead7548168f0d593859d945434e /plugins.vim
parentec64c3237a55fc83f68a0685bcdab1a74dd4ddb7 (diff)
add grammar checking plugin
Diffstat (limited to 'plugins.vim')
-rw-r--r--plugins.vim22
1 files changed, 22 insertions, 0 deletions
diff --git a/plugins.vim b/plugins.vim
index a330303..adf53ce 100644
--- a/plugins.vim
+++ b/plugins.vim
@@ -237,6 +237,10 @@ endif
" emoji
" Plug 'https://gitlab.com/gi1242/vim-emoji-ab'
Plug 'fszymanski/deoplete-emoji', {'for': 'markdown'}
+
+if g:is_mac:
+ Plug 'rhysd/vim-grammarous'
+endif
"}}
"{{ Text object plugins
@@ -689,6 +693,24 @@ nmap ^^ <Plug>AddVimFootnote
imap @@ <Plug>ReturnFromFootnote
nmap @@ <Plug>ReturnFromFootnote
+""""""""""""""""""""""""vim-grammarous settings""""""""""""""""""""""""""""""
+if g:is_mac:
+ let g:grammarous#languagetool_cmd = 'languagetool'
+ nmap <leader>x <Plug>(grammarous-close-info-window)
+ nmap <c-n> <Plug>(grammarous-move-to-next-error)
+ nmap <c-p> <Plug>(grammarous-move-to-previous-error)
+ let g:grammarous#disabled_rules = {
+ \ '*' : ['WHITESPACE_RULE', 'EN_QUOTES', 'ARROWS', 'SENTENCE_WHITESPACE',
+ \ 'WORD_CONTAINS_UNDERSCORE', 'COMMA_PARENTHESIS_WHITESPACE',
+ \ 'EN_UNPAIRED_BRACKETS', 'UPPERCASE_SENTENCE_START',
+ \ 'ENGLISH_WORD_REPEAT_BEGINNING_RULE', 'DASH_RULE', 'PLUS_MINUS',
+ \ 'PUNCTUATION_PARAGRAPH_END', 'MULTIPLICATION_SIGN', 'PRP_CHECKOUT',
+ \ 'CAN_CHECKOUT', 'SOME_OF_THE', 'DOUBLE_PUNCTUATION', 'HELL',
+ \ 'CURRENCY', 'POSSESSIVE_APOSTROPHE', 'ENGLISH_WORD_REPEAT_RULE',
+ \ 'NON_STANDARD_WORD'],
+ \ }
+endif
+
""""""""""""""""""""""""deoplete-emoji settings""""""""""""""""""""""""""""
call deoplete#custom#source('emoji', 'converters', ['converter_emoji'])
"}}