mirror of
https://git.alemi.dev/neo-tree-symbolmap.git
synced 2024-11-23 08:04:48 +01:00
fix: file sends to an empty buf, revert to dir
This commit is contained in:
parent
4ee153fff7
commit
f378080d86
2 changed files with 6 additions and 9 deletions
|
@ -79,9 +79,8 @@ M.add = function(state)
|
||||||
vim.lsp.buf_request(buf, 'workspace/symbol', { query = input }, function(err, data, _, _)
|
vim.lsp.buf_request(buf, 'workspace/symbol', { query = input }, function(err, data, _, _)
|
||||||
local root = {
|
local root = {
|
||||||
id = "root",
|
id = "root",
|
||||||
name = "no workspace symbols loaded",
|
name = "workspace symbols",
|
||||||
type = "file",
|
type = "directory",
|
||||||
extra = { kind = vim.lsp.protocol.SymbolKind.Event },
|
|
||||||
children = {}
|
children = {}
|
||||||
}
|
}
|
||||||
if data ~= nil then
|
if data ~= nil then
|
||||||
|
@ -93,9 +92,8 @@ M.add = function(state)
|
||||||
end)
|
end)
|
||||||
state.symboltree = { {
|
state.symboltree = { {
|
||||||
id = "root",
|
id = "root",
|
||||||
name = "reloading workspace symbols",
|
name = "reloading symbols ...",
|
||||||
type = "file",
|
type = "directory",
|
||||||
extra = { kind = vim.lsp.protocol.SymbolKind.Event },
|
|
||||||
children = {}
|
children = {}
|
||||||
} }
|
} }
|
||||||
manager.refresh("symbolmap")
|
manager.refresh("symbolmap")
|
||||||
|
|
|
@ -20,9 +20,8 @@ M.navigate = function(state, path)
|
||||||
if state.symboltree == nil then
|
if state.symboltree == nil then
|
||||||
state.symboltree = { {
|
state.symboltree = { {
|
||||||
id = "root",
|
id = "root",
|
||||||
name = "press 'a' to start querying for symbols",
|
name = "use 'a' to query symbols",
|
||||||
type = "file",
|
type = "directory",
|
||||||
extra = { kind = vim.lsp.protocol.SymbolKind.Event },
|
|
||||||
children = {}
|
children = {}
|
||||||
} }
|
} }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue