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

@@ -28,7 +28,7 @@ end
---@param result table
local function convert_symbols(result)
local s = {}
local kinds_index = require('outline.symbol').str_to_kind
local kinds_index = require('outline.symbols').str_to_kind
-- rebuild coc.nvim symbol list hierarchy according to the 'level' key
for _, value in pairs(result) do
value.children = {}