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

live_grep doesn't return all result from rg #710

Closed
vpeopleonatank opened this issue Apr 2, 2021 · 4 comments
Closed

live_grep doesn't return all result from rg #710

vpeopleonatank opened this issue Apr 2, 2021 · 4 comments
Labels
duplicate This issue or pull request already exists Feature Request A request for a new feature or capabilities for telescope

Comments

@vpeopleonatank
Copy link

vpeopleonatank commented Apr 2, 2021

Description

When i search for keyword for example "TODO", in terminal rg show all result like TODO (next character), TODO:. But in :Telescope live_grep It only show result like TODO:

Expected Behavior
:Telescope live_grep show all result from rg

Actual Behavior
Only TODO: is shown in live_grep

Details

Reproduce
  1. nvim -nu test.vim
  2. Type :Telescope live_grep
  3. search keyword TODO only return contents as described above
Environment
  • nvim --version output:
    NVIM v0.5.0-dev+1186-g8665a96b9
    Build type: RelWithDebInfo
    LuaJIT 2.1.0-beta3
    Compilation: /usr/bin/cc -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/runner/work/neovim/neovim/build/config -I/home/runner/work/neovim/neovim/src -I/home/runner/work/neovim/neovim/.deps/usr/include -I/usr/include -I/home/runner/work/neovim/neovim/build/src/nvim/auto -I/home/runner/work/neovim/neovim/build/include
    Compiled by runner@fv-az67-513

Features: +acl +iconv +tui
See ":help feature-compile"

system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "
/home/runner/work/neovim/neovim/build/nvim.AppDir/usr/share/nvim"

Run :checkhealth for more info

  • Operating system: Linux
  • Telescope commit: 2c4efc2
Configuration

set nocompatible hidden laststatus=2

if !filereadable('/tmp/plug.vim')
  silent !curl --insecure -fLo /tmp/plug.vim
    \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
endif

source /tmp/plug.vim
call plug#begin('/tmp/plugged')
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
call plug#end()

autocmd VimEnter * PlugClean! | PlugUpdate --sync | close
lua << EOF

require('telescope').setup{
  defaults = {
    vimgrep_arguments = {
      'rg',
      '--color=never',
      '--no-heading',
      '--with-filename',
      '--line-number',
      '--column',
      '--smart-case'
    },
    prompt_position = "bottom",
    prompt_prefix = ">",
    selection_strategy = "reset",
    sorting_strategy = "descending",
    layout_strategy = "horizontal",
    layout_defaults = {},
    file_ignore_patterns = {},
    shorten_path = true,
    winblend = 0,
    width = 0.75,
    preview_cutoff = 120,
    results_height = 1,
    results_width = 0.8,
    border = {},
    borderchars = { '', '', '', '', '', '', '', ''},
    color_devicons = true,
    use_less = true,
  }
}
EOF
@vpeopleonatank vpeopleonatank added the bug Something isn't working label Apr 2, 2021
@Conni2461
Copy link
Member

can't reproduce. Template is missing environment or reproduce, like maybe a repo you use.

We are only displaying the output of:

rg --color=never --no-heading --with-filename --line-number --column --smart-case TODO

@vpeopleonatank
Copy link
Author

Added environment and reproduce step. I 've noticed that :Telescope live_grep get all result from rg but results is truncated in results prompt.
image
image
Search for TODO get 37 results both in Telescope live_grep and rg in terminal, but in Telescope I can't cycle to all result by C-n or C-p, results in image below are what I choose
image

@Conni2461
Copy link
Member

Okay so duplication of #42

@Conni2461 Conni2461 added duplicate This issue or pull request already exists Feature Request A request for a new feature or capabilities for telescope and removed bug Something isn't working labels Apr 3, 2021
@l-kershaw
Copy link
Contributor

Am closing now as scrolling as been implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists Feature Request A request for a new feature or capabilities for telescope
Projects
None yet
Development

No branches or pull requests

3 participants