nvim-telescope / telescope.nvim Goto Github PK
View Code? Open in Web Editor NEWFind, Filter, Preview, Pick. All lua, all the time.
License: MIT License
Find, Filter, Preview, Pick. All lua, all the time.
License: MIT License
This returns an empty list
https://github.com/nvim-lua/telescope.nvim/blob/6b066cf9e866729b9c8292d7ab3e8071abdd7d45/lua/telescope/builtin.lua#L162
But on calling getloclist()
I get the list of errors in the file.
I can create a PR for this but I'm confused that should I just replace it with -
local locations = vim.fn.getloclist(0)
Or is there any other better way for this?
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.
When trying to quit an empty search, the following error happens:
This makes telescope completely unusable in conjunction with #68.
When this bug happens, a restart is required.
Edit: tested on Windows.
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)
It would be awesome if we can have a list of the current buffers. Something similar to the FZF Buffers.
For git integrations - telescope-checkout
Idea for changing colorscheme -
Show the current buffer in the preview window with the highlighted colorscheme.
Note - I don't have a clue about this preview thing with colorscheme. Is it feasible to do?
If you have any additional ideas or changes I can create a PR for both of these functionalities.
Sometimes we end up in the preview buffer, which is not good at all.
Separating the lsp
functionalities from builtin's
to keep it minimal and have a potential to add more lsp
related features. Such as vim.lsp.buf.document_symbol()
In the popup. Press escape a few times. I sort of expect the popup to close.
Right now not enough pretty colors.
Steps to reproduce:
:lua require'telescope.builtin'.fd{}
You are now in the top window. It would be nice if it sent me back to the window I came from, especially if I exit without selecting any of the items.
So right now if I want to swap to another search:
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{}
These options would work either with 1 file, or for a working directory.
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
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.
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
).
Search only inside the current opened buffer.
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.
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.
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 ?
Please support silver searcher as well as rip grep.
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.
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.
bfredl just released new shiny API and we should use it.
for example select something from the list and append it to the current place in the buffer
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.
Basically allow you to run macros on a list in telescope.
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.
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.
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?
When using telescope with completion the following behaviours were noticed
after opening find_files
or live_grep
(I did not test the other functions),
:help i_CTRL-N
to complete the word, each result shows up multiple times.E523: Not allowed here
Creating this issue after #82.
I tried to reduce the issue as much as possible.
neovim version: neovim-0.4.4.0.git.14574.f34eeba2d
-> neovim/neovim@f34eeba
telescope version: cab5fc7
plenary version: nvim-lua/plenary.nvim@3ee90ef
popup version: nvim-lua/popup.nvim@e69019e
" 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>
<c-n>
to <Tab>
as <c-n>
was mapped already in telescope.Open live_grep
start typing, press <tab>
to trigger completion, we can see multiple entries per result.
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 multiplenoinsert
set completeopt=menu
(default)
(preview does not matter here)
E523: Not allowed here
set completeopt=menuone
It works fine with single or multiple options
`set completeopt=menuone,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)
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.
builtin.fd
is hard to realize it is for finding files.
builtin.files
builtin.find_files
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:
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:
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
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.
If in normal mode maybe we can move using vim movement keys to do things.
Makes as bunch of the previewers trivial.
(Also, we can make sure we're actually cleaning up those 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
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
Testing the first listing when I select the file goes to insert mode was designed in this way?
Sometimes the best lines aren't shown (they are just empty).
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.
Redraw if I change the size of vim. ๐
When using git_files
for find_files
I am noticing large jumps in memory usage that is not released.
Hi,
I'd like to request an option to the live_grep, that, when true, would use the as the initial grep, much like grep_string does by default
Probably:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.