summaryrefslogtreecommitdiff
path: root/start/indent-blankline-2.20.4/plugin/indent_blankline.vim
diff options
context:
space:
mode:
authorMichael Smith <mikesmiffy128@gmail.com>2024-07-15 20:05:47 +0100
committerMichael Smith <mikesmiffy128@gmail.com>2024-07-15 20:05:47 +0100
commit522d56557b00246286d803425751a4334f3a94a5 (patch)
tree23ca335a3526197c2a6327ce10bfd58411b0a609 /start/indent-blankline-2.20.4/plugin/indent_blankline.vim
parenta7b72fc27edac2305dbf0af807981bd703835b25 (diff)
Update lspconfig, add indent-blanklineHEADmaster
indent-blankline is probably old because I've actually been using it for ages, but I have a strict if-it-ain't-broke policy, so I'm not going to update it. lspconfig *was* broke though with nvim 0.10, so now it's fixed.
Diffstat (limited to 'start/indent-blankline-2.20.4/plugin/indent_blankline.vim')
-rw-r--r--start/indent-blankline-2.20.4/plugin/indent_blankline.vim41
1 files changed, 41 insertions, 0 deletions
diff --git a/start/indent-blankline-2.20.4/plugin/indent_blankline.vim b/start/indent-blankline-2.20.4/plugin/indent_blankline.vim
new file mode 100644
index 0000000..203d140
--- /dev/null
+++ b/start/indent-blankline-2.20.4/plugin/indent_blankline.vim
@@ -0,0 +1,41 @@
+
+if exists('g:loaded_indent_blankline') || !has('nvim-0.5.0')
+ finish
+endif
+let g:loaded_indent_blankline = 1
+
+function s:try(cmd)
+ try
+ execute a:cmd
+ catch /E12/
+ return
+ endtry
+endfunction
+
+command! -bang IndentBlanklineRefresh call s:try('lua require("indent_blankline.commands").refresh("<bang>" == "!")')
+command! -bang IndentBlanklineRefreshScroll call s:try('lua require("indent_blankline.commands").refresh("<bang>" == "!", true)')
+command! -bang IndentBlanklineEnable call s:try('lua require("indent_blankline.commands").enable("<bang>" == "!")')
+command! -bang IndentBlanklineDisable call s:try('lua require("indent_blankline.commands").disable("<bang>" == "!")')
+command! -bang IndentBlanklineToggle call s:try('lua require("indent_blankline.commands").toggle("<bang>" == "!")')
+
+if exists(':IndentLinesEnable') && !g:indent_blankline_disable_warning_message
+ echohl Error
+ echom 'indent-blankline does not require IndentLine anymore, please remove it.'
+ echohl None
+endif
+
+if !exists('g:__indent_blankline_setup_completed')
+ lua require("indent_blankline").setup {}
+endif
+
+lua require("indent_blankline").init()
+
+augroup IndentBlanklineAutogroup
+ autocmd!
+ autocmd OptionSet list,listchars,shiftwidth,tabstop,expandtab IndentBlanklineRefresh
+ autocmd FileChangedShellPost,TextChanged,TextChangedI,CompleteChanged,BufWinEnter,Filetype * IndentBlanklineRefresh
+ autocmd WinScrolled * IndentBlanklineRefreshScroll
+ autocmd ColorScheme * lua require("indent_blankline.utils").reset_highlights()
+ autocmd VimEnter * lua require("indent_blankline").init()
+augroup END
+