Giter Site home page Giter Site logo

telescope.nvim's People

Contributors

caojoshua avatar clason avatar conni2461 avatar cristiansofronie avatar delphinus avatar dhruvmanila avatar elianiva avatar fdschmidt93 avatar gh-liu avatar glepnir avatar jamestrew avatar kkharji avatar kylo252 avatar kyoh86 avatar l-kershaw avatar luxed avatar oberblastmeister avatar p00f avatar parmort avatar pwntester avatar rockerboo avatar runiq avatar smithbm2316 avatar smjonas avatar smolck avatar sunjon avatar tamago324 avatar tc72 avatar tjdevries avatar zeertzjq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

telescope.nvim's Issues

Current issues.

Error when trying to open telescope really early in the startup.

E5108: Error executing lua ...ig/nvim/plugged/telescope.nvim/lua/telescope/pickers.lua:307: attempt to index local '
preview_opts' (a nil value)

Trying to access references through lsp_references(). Maybe no references? Also this error happens before the LS fully loads.

E5108: Error executing lua ...ig/nvim/plugged/telescope.nvim/lua/telescope/builtin.lua:120: bad argument #1 to 'pairs' (table expected, got nil)

Showing me bumpling through. Note the .gitignore where it is almost showing the correct (IMO) but then it does additional fuzzing after matching on the filename.

https://www.youtube.com/watch?v=2fQ8KcfWSS8

Bug: Exiting an empty search throws an error

When trying to quit an empty search, the following error happens:
image

This makes telescope completely unusable in conjunction with #68.
When this bug happens, a restart is required.

Edit: tested on Windows.

Error while jumping to error if the file is not saved

There's an error when trying to jump to an error and that line is not written on the file.

|| E5108: Error executing lua ...hu/.vim/plugged/telescope.nvim/lua/telescope/actions.lua:65: Vim(edit):E37: No write since last change (add ! to override)

Shortcut from the popup to dynamically use other telescope functionality.

So right now if I want to swap to another search:

  1. Close out of the popup.
  2. Use one of up to 14 keybinds. New functions will need to be bound first before using.

I propose an option in the Popup that allows you to swap to another format. Sort of like the current telescope.builtin.builtin{} but allowing us to go into those finder modes.

map <Leader>j :lua require'telescope...'.builtin{}

Options

These options would work either with 1 file, or for a working directory.

  • LSP (workspace symbols, document symbols)
  • Grep
  • Git_Files
  • Files
  • Treesitter

preview vim_buffer lnum issue

in the previewer vim_buffer, it subtracts 1 from the entry.lnum when highlighting the entry. This is probably done for the LSP document symbol builtin. The subtract 1 should be done when making entries for the LSP document symbols and not in the previewer

Request: Commands

It would be cool if you could list all of the commands that are currently defined and then execute the command when selected.

:command provides you with the list of defined commands along with how many arguments they take. This could be used to conditionally also provide a way to enter these arguments.

Feature: support ripgrep for file finder

The only advantage of fd that I can find is that you can directly give it a string to search, which might be useful in a "live find files" situation.
This is purely personal, but I don't use fd since a simple rg --files does the trick. And if I ever want to filter over that, I'll just use rg again.
Doing rg --files | wc -l and fd --type f | wc -l gives me the same result.

I'll be making a PR for this as it's quite easy to do even with my limited knowledge of lua.
What I'm wondering is which should be verified first? They all seem to be as fast as one another (fd --color never --type f (in the case of fd colors double the execution time from 50ms to 100ms), find and rg --files).

Saving/API for sharing lists

Saving or re-populating lists for fetching the fuzzed list out.

This will allow users to use the smaller fuzzed list to do additional things. Like doing actions to each item on the fuzzed list.

find_files does not leave insert mode on exit

When you call :lua require'telescope.builtin'.find_files{}, the finder window pops up, but it puts you into insert mode. When you select a file, you will be put back into normal mode.

But if you instead hit Ctrl-c to back out of picking a file, you are still left in insert mode.

bat preview doesn't work on telescope.builtin.quicklist after helpgrep

This is to be expected : the file name in the quickfix list is just the name of the file somewhere in doc files, Bat has no idea where to find the files.

Probably not easy to "fix" as well, since a quickfix list doesn't really carry the extra information about which base folder you're supposed to use to extend the filenames does it ?

How to use sk or fzf

I'm a little confused at the architecture of the plugin. It seems like the "scorer" does the job that fzf or sk would typically do but does so in a built in way that I have to say is less than ideal. There doesn't seem to be any documentation on how to replace the built in functionality with fzf or sk or anything like that.

too many files open

I have been getting the "too many files open" error, if I open telescope and just C-n and C-p through the list, it happens everytime for me. It happens after around 50 files for me.

Bug: no results in find_files when you type too fast

You read that right. This is the first thing that I thought to test.
This is actually something that I really liked about fzf, no matter how fast I write, it will always work properly once it's opened.
This is nothing groundbreaking and I don't know if this only applies to find_files or something else.

Here is a demonstration:
asciicast

live_grep does nothing on Windows 10

I don't know whether this is something related to Windows 10 or not, but builtin.live_grep does nothing.

It successfully shows the floating window popup and doesn't throw an error, but simply doesn't react to input changes.

live_grep

image

cli

image

Allow "scrolling" through results in the list.

Right now you are limited to the results in the list.

If I am on vertical I am only showing 8 results by default.

I sometimes use the fuzzy to give me a short list to browse through.

Solutions

Allow us to go up on the list beyond the presented list.

I think limiting the the total results would be fine. 100 total results available for instance. Unless we want to encourage fuzzy browsing which then no limit (high limit) might be good.

Set a filetype?

I would like to map <ESC> to <ESC><ESC> in insert mode in the search field of a telescope buffer. I think we would need to set a filetype while in that input, what do you think about a telescope-buffer filetype or something?

BUG: Completion menu interactions

Problems summary

When using telescope with completion the following behaviours were noticed
after opening find_files or live_grep (I did not test the other functions),

  1. When using completion :help i_CTRL-N to complete the word, each result shows up multiple times.
  2. When opening a file we might get E523: Not allowed here
  3. Or it will enter the word into the text.

Creating this issue after #82.
I tried to reduce the issue as much as possible.

Environment Information

Minimal init.vim

" vim:fdm=marker:foldlevel=0
set encoding=utf-8
scriptencoding utf-8

" Remap leader to space - Set it here before start using leader
let g:mapleader="\<Space>"

" Dein 
let s:path = expand(stdpath('config') . '/bundle')
let &runtimepath .= ',' . expand(stdpath('config') . '/bundle/repos/github.com/Shougo/dein.vim/')

if dein#load_state(s:path)
    call dein#begin(s:path, [expand('<sfile>'),])

    call dein#add('Shougo/dein.vim', {
        \ 'hook_add': 'let g:dein#enable_notification = 0'
        \ })

    call dein#add('nvim-lua/plenary.nvim')

    call dein#add('nvim-lua/popup.nvim')

    call dein#add('nvim-lua/telescope.nvim', {
        \ 'hook_add': "
        \ nnoremap <silent><leader>gr <cmd>lua require'telescope.builtin'.live_grep{}<cr>\n
        \ nnoremap <silent><leader>r <cmd>lua require'telescope.builtin'.find_files{}<cr>\n
        \ ",
        \ })

    call dein#end()
    call dein#save_state()
endif
call dein#call_hook('source')

filetype plugin indent on
syntax enable

set number
set nowrap

" See explanation regarding the following 4 lines
" set completeopt=menu,preview " default options
" set completeopt=menuone
" set completeopt=menuone,noinsert
set completeopt=menu,noinsert

inoremap <Tab> <c-n>

How to reproduce the problem

  • I had to remap <c-n> to <Tab> as <c-n> was mapped already in telescope.

Issue 1

Open live_grep start typing, press <tab> to trigger completion, we can see multiple entries per result.

Issues 2 and 3

The pre-described issues 2 and 3 depend on a combination of completeopt set to

  • menu or menuone and whether there is one available completion option or multiple
  • noinsert

Case 1

set completeopt=menu (default)
(preview does not matter here)

  • If there are multiple completion options works fine

telescope_menu_multiple

  • if there is only one available option then we get E523: Not allowed here

telescope_menu

Case 2

set completeopt=menuone

It works fine with single or multiple options

telescope_menuone

Case 3

`set completeopt=menuone,noinsert

  • When no menu entry is selected/default entry you can see that it inserts the word (number in this case) into the text

telescope_noinsert

  • If we have multiple entries, selecting any other entry (even if we go back to the first entry) it works fine (first part of the gif)

  • However, with multiple entries, if we select no entry and then press enter it will insert the work into the text (second part of the gif)

telescope_menuone_noinsert

  • If we have a single entry it does not matter whether or not we cycle, it will enter the word into the text.

Case 4

set completeopt=menu,noinsert

  • If we have multiple entries it will enter the word into the text, behaving as Case 3.

  • If we have a single entry, we will get E523: Not allowed here, therefore behaving as Case 1.

Unexpected sorting/matching results

The generic fuzzy sorter seems to have an issue where expected matches don't show up.

For example, doing a fuzzy grep (not live grep! -- see below) over the neovim repo for onyank gives the following result:
image

Note that it doesn't show the highlight.on_yank() function, which should be the best match, and which fzf.vim returns as the best match:
image

Since that's clearly a better match than the best one in the first screen shot, I have the sneaking suspicion that it's actually returned by the sorter but cut off due to an off-by-one error...


Here's the fuzzy grepper function:

finder.rg = function() builtin.grep_string { search = '' } end

Some weirdness when opening a file via telescope

Not sure if this is telescope fault or treesitter.

So basically when you open a file via telescope find_files treesitter highlighting is not working until you manually run TSBufEnable highlight. Also, path to file is absolute in statusline and after you edited the file and trying to save nvim goes E13: File exists (add ! to override)

Opening same file with :e doesn't have those problems - path is relative to cwd and highlighting is working.

Fix: Unable to close telescope when you have no listed buffers

If you open telescope with no listed buffers (such as vim-startify or other start screens) and try to close the telescope floating window bu hitting Esc or selecting a finder option, the window will not close

This is an issue within neovim when calling bwipeout on a buffer with no listed buffers. It will not delete the unlisted buffer even though it is safe to do so.

I have created an issue in Neovim and PR to fix this.
Issue: neovim/neovim#12895
PR: neovim/neovim#12897

This issue is to track this issue

Searching for "gen" errors.

Open nvim, open telescope, and type in gen and this error comes up.

[telescope] [INFO  22:17:26] ...ig/nvim/plugged/telescope.nvim/lua/telescope/finders.lua:75: Finding...
[telescope] [INFO  22:17:26] ...ig/nvim/plugged/telescope.nvim/lua/telescope/finders.lua:77: Using previou
s results
Error executing vim.schedule lua callback: ...ig/nvim/plugged/telescope.nvim/lua/telescope/pickers.lua:398
: attempt to index a nil value

Saving lists in telescope

Saving or re-populating lists for fetching the fuzzed list out.

This will allow users to use the smaller fuzzed list to do additional things. Like doing actions to each item on the fuzzed list.

High memory usage when finding files.

When using git_files for find_files I am noticing large jumps in memory usage that is not released.

How To Replicate

  1. Start nvim. Check the memory usage, mine sits below 20 normally.
  2. Use one of the above functions but do not type anything. Memory usage should stay normal.
  3. Search for something, memory usage will spike.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.