This commit is contained in:
Nachuan Tang
2023-03-25 16:26:41 -04:00
parent b0c84ce1c5
commit 2bd7717854
3 changed files with 13 additions and 7 deletions
+1 -1
View File
@@ -543,7 +543,7 @@ if HasPlug("vim-airline")
:AirlineRefresh! :AirlineRefresh!
endfunction endfunction
autocmd! CursorMoved * call s:airline_refresh(0) " autocmd! CursorMoved * call s:airline_refresh(0)
endfunction endfunction
+6 -1
View File
@@ -221,6 +221,9 @@ local function telescope_config()
["<CR>"] = function(bufnr) ["<CR>"] = function(bufnr)
local selection = action_state.get_selected_entry() local selection = action_state.get_selected_entry()
actions.select_default() actions.select_default()
local bg = vim.o.background
local config = vim.g.my_config
vim.fn.SetTheme(bg, selection.value)
end, end,
}, },
}, },
@@ -400,8 +403,10 @@ local function lualine_config()
local msg = "lsp:" .. id local msg = "lsp:" .. id
if state == "starting" then if state == "starting" then
return msg .. " %#CocstatusLoading#" .. loading[math.floor(loadidx / (step * (speed / 100))) + 1] return msg .. " %#CocstatusLoading#" .. loading[math.floor(loadidx / (step * (speed / 100))) + 1]
elseif state == "running" then
return msg .. " %#CocstatusSucceed#✔"
end end
return msg .. " %#CocstatusSucceed#✔" return ''
end end
local function debugstats() local function debugstats()
+6 -5
View File
@@ -252,16 +252,17 @@ if HasPlug('vim-airline')
if state == "starting" if state == "starting"
let s:coc_lsp_loading = 1 let s:coc_lsp_loading = 1
return msg . " " . loading[loadidx/(speed/10)] . " " return msg . " " . loading[loadidx/(speed/10)] . " "
elseif state == "running"
if exists('s:coc_lsp_loading')
unlet s:coc_lsp_loading
endif
return msg . " ✔ "
endif endif
if exists('s:coc_lsp_loading') return ''
unlet s:coc_lsp_loading
endif
return msg . " ✔ "
endfunction endfunction
function! AirlineBufferNumber() function! AirlineBufferNumber()
return len(g:index_to_buffer) return len(g:index_to_buffer)
endfunction endfunction
endif endif
""" AIRLINE EXTENSIONS END """ """ AIRLINE EXTENSIONS END """