fix: file sends to an empty buf, revert to dir

This commit is contained in:
əlemi 2023-04-15 22:35:26 +02:00
parent 4ee153fff7
commit f378080d86
Signed by: alemi
GPG key ID: A4895B84D311642C
2 changed files with 6 additions and 9 deletions

View file

@ -79,9 +79,8 @@ M.add = function(state)
vim.lsp.buf_request(buf, 'workspace/symbol', { query = input }, function(err, data, _, _)
local root = {
id = "root",
name = "no workspace symbols loaded",
type = "file",
extra = { kind = vim.lsp.protocol.SymbolKind.Event },
name = "workspace symbols",
type = "directory",
children = {}
}
if data ~= nil then
@ -93,9 +92,8 @@ M.add = function(state)
end)
state.symboltree = { {
id = "root",
name = "reloading workspace symbols",
type = "file",
extra = { kind = vim.lsp.protocol.SymbolKind.Event },
name = "reloading symbols ...",
type = "directory",
children = {}
} }
manager.refresh("symbolmap")

View file

@ -20,9 +20,8 @@ M.navigate = function(state, path)
if state.symboltree == nil then
state.symboltree = { {
id = "root",
name = "press 'a' to start querying for symbols",
type = "file",
extra = { kind = vim.lsp.protocol.SymbolKind.Event },
name = "use 'a' to query symbols",
type = "directory",
children = {}
} }
end