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:
@@ -89,4 +89,20 @@ function M.request_symbols(on_symbols, opts)
|
||||
end)
|
||||
end
|
||||
|
||||
-- No good way to update outline when LSP action complete for now
|
||||
|
||||
---@param sidebar outline.Sidebar
|
||||
function M.code_actions(sidebar)
|
||||
sidebar:wrap_goto_location(function()
|
||||
vim.lsp.buf.code_action()
|
||||
end)
|
||||
end
|
||||
|
||||
---@param sidebar outline.Sidebar
|
||||
function M.rename_symbol(sidebar)
|
||||
sidebar:wrap_goto_location(function()
|
||||
vim.lsp.buf.rename()
|
||||
end)
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
Reference in New Issue
Block a user