File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- --- Timer instance
2- local timer = nil
1+ local statusline = require ( ' lsp-status/statusline ' )
2+
33--- This flag is used to redraw one more time after the last LSP update.
44-- NOTE: This is achieved by setting the redraw_flag to true if
55-- vim.g.lsp_status_redraw is true and there has been an update. Next time if
@@ -19,7 +19,7 @@ local function timer_callback()
1919 if update_flag or redraw_flag then
2020 vim .g .lsp_status_redraw = false
2121 -- Schedule the command when it's safe to call it
22- local new_state = require ( ' lsp-status/ statusline' ) .get_lsp_statusline ()
22+ local new_state = statusline .get_lsp_statusline ()
2323 if new_state ~= vim .g .lsp_status_statusline then
2424 vim .g .lsp_status_statusline = new_state
2525 vim .api .nvim_command (' redrawstatus!' )
3838-- set use the variable timer to schedule the updates.
3939-- TODO: This could error if the lsp is disconnected, the timer should be
4040-- stopped
41+ --- Timer instance
42+ local timer = nil
4143local function register_timer ()
4244 -- Guard the for an already defined timer
4345 if timer ~= nil then return end
You can’t perform that action at this time.
0 commit comments