Skip to content

Commit

Permalink
fix: buffer mismatch in LSP symbols call (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed Aug 6, 2022
1 parent 986c580 commit 551c43c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/aerial/backends/lsp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ end

M.fetch_symbols = function(bufnr)
bufnr = bufnr or 0
local params = { textDocument = vim.lsp.util.make_text_document_params() }
local params = { textDocument = vim.lsp.util.make_text_document_params(bufnr) }
vim.lsp.buf_request(bufnr, "textDocument/documentSymbol", params, callbacks.symbol_callback)
end

Expand All @@ -61,7 +61,7 @@ M.fetch_symbols_sync = function(bufnr, opts)
opts = vim.tbl_extend("keep", opts or {}, {
timeout = 4000,
})
local params = { textDocument = vim.lsp.util.make_text_document_params() }
local params = { textDocument = vim.lsp.util.make_text_document_params(bufnr) }
local lsp_results, err =
vim.lsp.buf_request_sync(bufnr, "textDocument/documentSymbol", params, opts.timeout)
if err then
Expand Down

0 comments on commit 551c43c

Please sign in to comment.