From f378080d865e7ee46d0fbf3a6afa5bfc6989f770 Mon Sep 17 00:00:00 2001 From: alemi Date: Sat, 15 Apr 2023 22:35:26 +0200 Subject: [PATCH] fix: file sends to an empty buf, revert to dir --- lua/neo-tree/sources/symbolmap/commands.lua | 10 ++++------ lua/neo-tree/sources/symbolmap/init.lua | 5 ++--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/lua/neo-tree/sources/symbolmap/commands.lua b/lua/neo-tree/sources/symbolmap/commands.lua index 2c631f2..0dcdc87 100644 --- a/lua/neo-tree/sources/symbolmap/commands.lua +++ b/lua/neo-tree/sources/symbolmap/commands.lua @@ -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") diff --git a/lua/neo-tree/sources/symbolmap/init.lua b/lua/neo-tree/sources/symbolmap/init.lua index 32c3d41..245b042 100644 --- a/lua/neo-tree/sources/symbolmap/init.lua +++ b/lua/neo-tree/sources/symbolmap/init.lua @@ -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