From 522d56557b00246286d803425751a4334f3a94a5 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Mon, 15 Jul 2024 20:05:47 +0100 Subject: Update lspconfig, add indent-blankline 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. --- .../plugin/indent_blankline.vim | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 start/indent-blankline-2.20.4/plugin/indent_blankline.vim (limited to 'start/indent-blankline-2.20.4/plugin') 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("" == "!")') +command! -bang IndentBlanklineRefreshScroll call s:try('lua require("indent_blankline.commands").refresh("" == "!", true)') +command! -bang IndentBlanklineEnable call s:try('lua require("indent_blankline.commands").enable("" == "!")') +command! -bang IndentBlanklineDisable call s:try('lua require("indent_blankline.commands").disable("" == "!")') +command! -bang IndentBlanklineToggle call s:try('lua require("indent_blankline.commands").toggle("" == "!")') + +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 + -- cgit v1.2.3