diff --git a/.vimrc.bundles b/.vimrc.bundles index 5d91387..08cceb4 100644 --- a/.vimrc.bundles +++ b/.vimrc.bundles @@ -543,7 +543,7 @@ if HasPlug("vim-airline") :AirlineRefresh! endfunction - autocmd! CursorMoved * call s:airline_refresh(0) + " autocmd! CursorMoved * call s:airline_refresh(0) endfunction diff --git a/.vimrc.lua b/.vimrc.lua index 178576e..b363cec 100644 --- a/.vimrc.lua +++ b/.vimrc.lua @@ -221,6 +221,9 @@ local function telescope_config() [""] = function(bufnr) local selection = action_state.get_selected_entry() actions.select_default() + local bg = vim.o.background + local config = vim.g.my_config + vim.fn.SetTheme(bg, selection.value) end, }, }, @@ -400,8 +403,10 @@ local function lualine_config() local msg = "lsp:" .. id if state == "starting" then return msg .. " %#CocstatusLoading#" .. loading[math.floor(loadidx / (step * (speed / 100))) + 1] + elseif state == "running" then + return msg .. " %#CocstatusSucceed#✔" end - return msg .. " %#CocstatusSucceed#✔" + return '' end local function debugstats() diff --git a/utils.vim b/utils.vim index 4b5444c..4e00af8 100644 --- a/utils.vim +++ b/utils.vim @@ -252,16 +252,17 @@ if HasPlug('vim-airline') if state == "starting" let s:coc_lsp_loading = 1 return msg . " " . loading[loadidx/(speed/10)] . " " + elseif state == "running" + if exists('s:coc_lsp_loading') + unlet s:coc_lsp_loading + endif + return msg . " ✔ " endif - if exists('s:coc_lsp_loading') - unlet s:coc_lsp_loading - endif - return msg . " ✔ " + return '' endfunction function! AirlineBufferNumber() return len(g:index_to_buffer) endfunction - endif """ AIRLINE EXTENSIONS END """