From 19eacd51ba8d6c30c8bb01352bed6b6be150c2d2 Mon Sep 17 00:00:00 2001 From: Dmytro Meleshko Date: Sun, 30 Aug 2020 20:32:18 +0300 Subject: [PATCH] [nvim] use a fork of detectindent which can ignore comments at the cost of performance (let's see how this will go) --- nvim/init.vim | 2 +- nvim/plugin/editing.vim | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/nvim/init.vim b/nvim/init.vim index 3cd8a89..363498c 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -41,7 +41,7 @@ Plug 'junegunn/vim-plug' Plug 'inkarkat/vim-ingo-library' " required by LineJuggler Plug 'inkarkat/vim-LineJuggler', { 'branch': 'stable' } Plug 'reedes/vim-pencil' - Plug 'ciaranm/detectindent' + Plug 'idbrii/detectindent' Plug 'tommcdo/vim-exchange' " }}} diff --git a/nvim/plugin/editing.vim b/nvim/plugin/editing.vim index 3308d91..bd06d2f 100644 --- a/nvim/plugin/editing.vim +++ b/nvim/plugin/editing.vim @@ -31,6 +31,9 @@ set commentstring=//%s let g:indentLine_showFirstIndentLevel = 1 let g:indentLine_fileTypeExclude = ['text', 'help', 'tutor', 'man'] + let g:detectindent_max_lines_to_analyse = 128 + let g:detectindent_check_comment_syntax = 1 + function s:DetectIndent() if !empty(&bt) | return | endif let g:detectindent_preferred_indent = &l:shiftwidth