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

added a new DynamicFinder (which can be used with rust_analyzer) #705

Merged
merged 44 commits into from
Apr 13, 2021

Conversation

oberblastmeister
Copy link
Contributor

@oberblastmeister oberblastmeister commented Mar 30, 2021

note requires async await nvim-lua/plenary.nvim#83

If you want to test this new finder you can run :Telescope lsp_dynamic_workspace_symbols with rust_analyzer or another lsp server. The picker is completely asynchronous as it uses buf_request

The implementation of this is not good because there is no way for a finder to check if that specific find has been canceled. This can cause many issues with asynchronous finds because if the user has typed an additional character it will still be working on the previous find, causing ui distortions because the old find will still try to change the buffer. This can be fixed by giving the finder a cancellation channel to check. Furthermore, finders will set the screen on every entry instead of processing all the entries first and then setting them all together. This is another issue as it can cause extreme flickering. This can be seen with this finder and also the JobFinder (which live grep uses). #691 solves these issues so we will probably have to wait for that. It also allows stuff to be asynchronously processed

@oberblastmeister oberblastmeister changed the title added a new live_finder (which can be used with rust_analyzer) added a new DynamicFinder (which can be used with rust_analyzer) Apr 13, 2021
@tjdevries tjdevries merged commit 253d3aa into nvim-telescope:master Apr 13, 2021
@oberblastmeister oberblastmeister deleted the live_finder branch April 13, 2021 18:40
williamboman added a commit to williamboman/telescope.nvim that referenced this pull request Apr 14, 2021
* upstream/master:
  picker(live_grep): add option to grep only over open files (nvim-telescope#666)
  git(action): create and checkout branch (nvim-telescope#755)
  readme: fix broken links and spelling errors (nvim-telescope#753)
  added a new DynamicFinder (which can be used with rust_analyzer) (nvim-telescope#705)
  feat: add icons to git_status finder (nvim-telescope#401)
  fix: update to newer code (nvim-telescope#744)
  pickers(buffers): added only_cwd opt (nvim-telescope#739)
  feat: asyncify pickers - except for live_grep (nvim-telescope#709)
  fix: Use standardized names for current buffer fuzzy find (nvim-telescope#737)
  fix(git_branches): use the quoted fields instead of json-formatting and fix regressions with nvim-telescope#695 (nvim-telescope#704)
  feat: buf highlights for current buffer fuzzy find (nvim-telescope#732)
Gelio added a commit to Gelio/ubuntu-dotfiles that referenced this pull request Apr 23, 2021
It turns out most language servers return an empry list of symbols for
an empty query (which tsserver was doing).

See nvim-telescope/telescope.nvim#568
Fixed by nvim-telescope/telescope.nvim#705
@tom-anders
Copy link
Contributor

When I try to use this, I always get this error:

Error executing vim.schedule lua callback: ....vim/plugged/plenary.nvim/lua/plenary/async_lib/util.lua:170: Oneshot channel can only send once

Is there some special branch of plenary that I need to be on for this to work?

@tom-anders
Copy link
Contributor

Ah turns out this happens when having multiple language servers (I use both clangd and ccs). Maybe there could be an option to only use a specific server?

@oberblastmeister
Copy link
Contributor Author

Yeah that is a known issue, it is because I didn't update it to use the new buf_request_all that was recently merged into neovim.

@kidonng
Copy link

kidonng commented May 11, 2021

lsp_dynamic_workspace_symbols should be mentioned in the docs :) I spent several days to find this PR

@Conni2461
Copy link
Member

Currently there is an attempt to document all builtins (readme + vim doc (includes options of builtins)), here: #783

Its almost done

@kidonng
Copy link

kidonng commented May 12, 2021

Currently there is an attempt to document all builtins (readme + vim doc (includes options of builtins)), here: #783

Its almost done

That's good to know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants