Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!(lsp): use generic_sorter for dynamic_workspace_symbols #3250

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/telescope.txt
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,8 @@ options you want to use. Here's an example with the live_grep picker:

builtin.live_grep({opts}) *telescope.builtin.live_grep()*
Search for a string and get results live as you type, respects .gitignore
- Default keymaps:
- `<C-space>`: refine current results with a fuzzy search


Parameters: ~
Expand Down Expand Up @@ -1764,9 +1766,7 @@ builtin.lsp_workspace_symbols({opts}) *telescope.builtin.lsp_workspace_symbols()
builtin.lsp_dynamic_workspace_symbols({opts}) *telescope.builtin.lsp_dynamic_workspace_symbols()*
Dynamically lists LSP for all workspace symbols
- Default keymaps:
- `<C-l>`: show autocompletion menu to prefilter your query by type of
symbol you want to see (i.e. `:variable:`), only works after refining
to fuzzy search using <C-space>
- `<C-space>`: refine current results with a fuzzy search


Parameters: ~
Expand Down
3 changes: 1 addition & 2 deletions lua/telescope/builtin/__lsp.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
local channel = require("plenary.async.control").channel
local actions = require "telescope.actions"
local sorters = require "telescope.sorters"
local conf = require("telescope.config").values
local finders = require "telescope.finders"
local make_entry = require "telescope.make_entry"
Expand Down Expand Up @@ -444,7 +443,7 @@ lsp.dynamic_workspace_symbols = function(opts)
fn = get_workspace_symbols_requester(opts.bufnr, opts),
},
previewer = conf.qflist_previewer(opts),
sorter = sorters.highlighter_only(opts),
sorter = conf.generic_sorter(opts),
attach_mappings = function(_, map)
map("i", "<c-space>", actions.to_fuzzy_refine)
return true
Expand Down
4 changes: 3 additions & 1 deletion lua/telescope/builtin/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ end
--

--- Search for a string and get results live as you type, respects .gitignore
--- - Default keymaps:
--- - `<C-space>`: refine current results with a fuzzy search
---@param opts table: options to pass to the picker
---@field cwd string: root dir to search from (default: cwd, use utils.buffer_dir() to search relative to open buffer)
---@field grep_open_files boolean: if true, restrict search to open files only, mutually exclusive with `search_dirs`
Expand Down Expand Up @@ -501,7 +503,7 @@ builtin.lsp_workspace_symbols = require_on_exported_call("telescope.builtin.__ls

--- Dynamically lists LSP for all workspace symbols
--- - Default keymaps:
--- - `<C-l>`: show autocompletion menu to prefilter your query by type of symbol you want to see (i.e. `:variable:`), only works after refining to fuzzy search using <C-space>
--- - `<C-space>`: refine current results with a fuzzy search
---@param opts table: options to pass to the picker
---@field fname_width number: defines the width of the filename section (default: 30)
---@field show_line boolean: if true, shows the content of the line the symbol is found on (default: false)
Expand Down