refactor: Provider symbol actions

It makes sense to store the provider each sidebar is using with own
self.provider fields, no way that did not occur to me before this.

The old `_G._outline_current_provider` ironically, can now be replaced
by `require('outline').current.provider`.
This commit is contained in:
hedy
2023-11-26 15:14:42 +08:00
parent 1743ee7c66
commit b90174c6c2
8 changed files with 78 additions and 91 deletions

View File

@@ -65,11 +65,13 @@
-- PROVIDER
---@class outline.Provider
---@field should_use_provider fun(bufnr:integer):boolean
---@field hover_info fun(bufnr:integer, params:table, on_info:function)
---@field request_symbols fun(on_symbols:function, opts:table)
---@field name string
---@field get_status? fun():string[]
---@field supports_buffer fun(bufnr:integer):boolean
---@field request_symbols fun(on_symbols:function, opts:table?)
---@field hover_info? fun(bufnr:integer, params:table, on_info:function)
---@field rename_symbol? fun(sidebar:outline.Sidebar)
---@field code_actions? fun(sidebar:outline.Sidebar)
-- HELP