Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
amirbilu committed Dec 18, 2024
1 parent fb6f1e0 commit b0990e5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lua/tabnine/chat/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ local utils = require("tabnine.utils")
local api = vim.api
local config = require("tabnine.config")
local lsp = require("tabnine.lsp")
local get_symbols_request = nil

local M = { enabled = false }

Expand Down Expand Up @@ -203,14 +202,11 @@ local function register_events(on_init)
end)

chat_binary:register_event("get_symbols", function(request, answer)
if get_symbols_request then get_symbols_request() end

if not utils.buf_support_symbols() then
answer({ workspaceSymbols = {}, documentSymbols = {} })
return
end

get_symbols_request = lsp.get_document_symbols(request.query, function(document_symbols)
lsp.get_document_symbols(request.query, function(document_symbols)
lsp.get_workspace_symbols(request.query, function(workspace_symbols)
answer({
workspaceSymbols = vim.tbl_map(function(symbol)
Expand Down

0 comments on commit b0990e5

Please sign in to comment.