summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorJun <junnplus@gmail.com>2021-12-05 23:25:49 +0800
committerGitHub <noreply@github.com>2021-12-05 16:25:49 +0100
commit182c43b9d1e4536205cc89c0f737c5305d49f0e6 (patch)
tree4a1eb71bfc7bb37116658f4ce4cacf86f6f26a45 /lua
parente9759b04058daef75bda3d514ad615e199aac9d8 (diff)
fix: lsp concatenate err (#1558)
Diffstat (limited to 'lua')
-rw-r--r--lua/telescope/builtin/lsp.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/lua/telescope/builtin/lsp.lua b/lua/telescope/builtin/lsp.lua
index 1beb386..3899264 100644
--- a/lua/telescope/builtin/lsp.lua
+++ b/lua/telescope/builtin/lsp.lua
@@ -18,7 +18,7 @@ lsp.references = function(opts)
vim.lsp.buf_request(0, "textDocument/references", params, function(err, result, _ctx, _config)
if err then
- vim.api.nvim_err_writeln("Error when finding references: " .. err)
+ vim.api.nvim_err_writeln("Error when finding references: " .. err.message)
return
end
@@ -49,7 +49,7 @@ local function list_or_jump(action, title, opts)
local params = vim.lsp.util.make_position_params()
vim.lsp.buf_request(0, action, params, function(err, result, _ctx, _config)
if err then
- vim.api.nvim_err_writeln("Error when executing " .. action .. " : " .. err)
+ vim.api.nvim_err_writeln("Error when executing " .. action .. " : " .. err.message)
return
end
local flattened_results = {}
@@ -105,7 +105,7 @@ lsp.document_symbols = function(opts)
local params = vim.lsp.util.make_position_params()
vim.lsp.buf_request(0, "textDocument/documentSymbol", params, function(err, result, _ctx, _config)
if err then
- vim.api.nvim_err_writeln("Error when finding document symbols: " .. err)
+ vim.api.nvim_err_writeln("Error when finding document symbols: " .. err.message)
return
end
@@ -335,7 +335,7 @@ lsp.workspace_symbols = function(opts)
local params = { query = opts.query or "" }
vim.lsp.buf_request(0, "workspace/symbol", params, function(err, server_result, _ctx, _config)
if err then
- vim.api.nvim_err_writeln("Error when finding workspace symbols: " .. err)
+ vim.api.nvim_err_writeln("Error when finding workspace symbols: " .. err.message)
return
end