feat(api): Get symbol and breadcrumb at location
Currently the implementation is very limited. Ref: #24 - Outline must be open and have been loaded for it to work (requires lazy loading or headless loading of Sidebar) - Empty string returned if cursor is not in any symbol ('closest' symbol not yet supported) - Line column not used - Returning concatenated symbol names rather than a list of tables with node info (requires a refactor of outline.SymbolNode type) - Subject to config.symbols.filter and folds (requires finding hover list somewhere outside of writer.make_outline)
This commit is contained in:
@@ -28,12 +28,7 @@ end
|
||||
---@param result table
|
||||
local function convert_symbols(result)
|
||||
local s = {}
|
||||
local kinds_index = {}
|
||||
-- create a inverse indexing of symbols.kind
|
||||
local symbols = require('outline.symbols')
|
||||
for k, v in pairs(symbols.kinds) do
|
||||
kinds_index[v] = k
|
||||
end
|
||||
local kinds_index = require('outline.symbol').str_to_kind
|
||||
-- rebuild coc.nvim symbol list hierarchy according to the 'level' key
|
||||
for _, value in pairs(result) do
|
||||
value.children = {}
|
||||
|
||||
Reference in New Issue
Block a user