File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed 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
+
3
3
--- This flag is used to redraw one more time after the last LSP update.
4
4
-- NOTE: This is achieved by setting the redraw_flag to true if
5
5
-- vim.g.lsp_status_redraw is true and there has been an update. Next time if
@@ -19,7 +19,7 @@ local function timer_callback()
19
19
if update_flag or redraw_flag then
20
20
vim .g .lsp_status_redraw = false
21
21
-- 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 ()
23
23
if new_state ~= vim .g .lsp_status_statusline then
24
24
vim .g .lsp_status_statusline = new_state
25
25
vim .api .nvim_command (' redrawstatus!' )
38
38
-- set use the variable timer to schedule the updates.
39
39
-- TODO: This could error if the lsp is disconnected, the timer should be
40
40
-- stopped
41
+ --- Timer instance
42
+ local timer = nil
41
43
local function register_timer ()
42
44
-- Guard the for an already defined timer
43
45
if timer ~= nil then return end
You can’t perform that action at this time.
0 commit comments