From aa41912ef8bbd4523ce193b81e66631b481bb560 Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Wed, 1 Dec 2021 18:27:53 +0100 Subject: fix: Remove symbol_msg substitution (#1525) Because Elixir source code can contain `|`, the removed substitution sometimes broke `lsp_document_symbols()`. Example: ``` E5108: Error executing lua ...packer/start/telescope.nvim/lua/telescope/make_entry.lua:392: attempt to concatenate local 'symbol_name' (a nil value) stack traceback: ...packer/start/telescope.nvim/lua/telescope/make_entry.lua:392: in function 'entry_maker' ...scope.nvim/lua/telescope/finders/async_static_finder.lua:17: in function 'new_table' ...acker/start/telescope.nvim/lua/telescope/builtin/lsp.lua:137: in function 'v' ...acker/start/telescope.nvim/lua/telescope/builtin/lsp.lua:500: in function 'v' ...cker/start/telescope.nvim/lua/telescope/builtin/init.lua:496: in function <...cker/start/telescope.nvim/lua/telescope/builtin/init.lua:467> ...ck/packer/start/telescope.nvim/lua/telescope/command.lua:179: in function 'run_command' ...ck/packer/start/telescope.nvim/lua/telescope/command.lua:241: in function 'load_command' [string ":lua"]:1: in main chunk ``` Closes #874 --- lua/telescope/make_entry.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua/telescope/make_entry.lua') diff --git a/lua/telescope/make_entry.lua b/lua/telescope/make_entry.lua index 498db9c..7892e05 100644 --- a/lua/telescope/make_entry.lua +++ b/lua/telescope/make_entry.lua @@ -382,7 +382,7 @@ function make_entry.gen_from_lsp_symbols(opts) return function(entry) local filename = entry.filename or vim.api.nvim_buf_get_name(entry.bufnr) - local symbol_msg = entry.text:gsub(".* | ", "") + local symbol_msg = entry.text local symbol_type, symbol_name = symbol_msg:match "%[(.+)%]%s+(.*)" local ordinal = "" -- cgit v1.2.3