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

missing grep preview after use custom vimgrep_arguments #2240

Closed
fcying opened this issue Nov 23, 2022 · 0 comments · Fixed by #2262
Closed

missing grep preview after use custom vimgrep_arguments #2240

fcying opened this issue Nov 23, 2022 · 0 comments · Fixed by #2262
Labels
bug Something isn't working

Comments

@fcying
Copy link
Contributor

fcying commented Nov 23, 2022

Description

I use custom vimgrep_arguments,
after I add -g=!.ccls-cache, Grep Preview see nothing,
remove this line Grep Preview work fine.

The problem was introduced in this commit
9cf4658 2022-10-25 21:22 Simon Hauser o [HEAD] [refs/bisect/bad] fix: rg invert and files-with-matches res line parsing (#2208)

image

image

Neovim version

NVIM v0.8.1
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by runner@fv-az178-366

Operating system and version

debian 11

Telescope version / branch / rev

master

checkhealth telescope

1
2 telescope: require("telescope.health").check()
3 ========================================================================
4 ## Checking for required plugins
5   - OK: plenary installed.
6   - WARNING: nvim-treesitter not found.
7
8 ## Checking external dependencies
9   - OK: rg: found ripgrep 13.0.0 (rev af6b6c543b)
10   - WARNING: fd: not found. Install [sharkdp/fd](https://github.com/sharkdp/fd) for extended capabilities
11
12 ## ===== Installed extensions =====

Steps to reproduce

  1. nvim -u init.lua main.c
  2. Telescope grep_string
  3. type test_t

Expected behavior

No response

Actual behavior

can't see grep preview

Minimal config

local fn, cmd = vim.fn, vim.cmd
local root_dir = fn.fnamemodify(fn.resolve(fn.expand('<sfile>:p')), ':h')

cmd('set packpath=' .. root_dir .. '/plugged')
cmd('set runtimepath^=' .. root_dir .. '/plugged')
local install_path = root_dir .. '/plugged/pack/packer/opt/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
    Bootstrap = fn.system({ 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path })
end

cmd('packadd packer.nvim')
local packer = require('packer')
local use = packer.use
packer.init({
    package_root = root_dir .. '/plugged/pack',
    compile_path = root_dir .. '/plugged/plugin/packer_compiled.lua',
})

use({ 'wbthomason/packer.nvim', opt = true })
use('nvim-lua/plenary.nvim')
use('nvim-telescope/telescope.nvim')

if Bootstrap then
    packer.sync()
end

local conf = require('telescope.config').values
conf.vimgrep_arguments = {
    'rg',
    '--no-config',
    '--no-ignore',
    '--color=never',
    '--with-filename',
    '--line-number',
    '--column',
    '--smart-case',
    '--hidden',
    '-g=!.git',
    '-g=!.ccls-cache',
}

test_file main.c

#include <stdint.h>

struct {
    int32_t aa;
} test_t;

int main(void)
{
    test_t test;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant