Expand your neovim sense with small UI components
482 B
20 lines
1local state = require("sense.state")
2local autocmds = require("sense.autocmds")
3
4local M = {}
5
6---@param indicator sense.Indicator
7function M.register(indicator)
8 -- HACK: when used as lua-module and not as neovim plugin, try setup autocmds here
9 if not vim.g.loaded_sense_nvim then
10 autocmds.setup()
11 vim.g.loaded_sense_nvim = true
12 end
13 table.insert(state.indicators, indicator)
14end
15
16function M.clear_registered()
17 state.indicators = {}
18end
19
20return M