Giter Club home page Giter Club logo

Comments (18)

qalshidi avatar qalshidi commented on May 29, 2024

It would be helpful if you include your set up and the error you are facing.

  1. What is your operating system, vim version?
  2. Which grep program are you trying to use?
  3. What are your relevant vimrc or init.vim lines?

from vim-bettergrep.

sansyrox avatar sansyrox commented on May 29, 2024

Hi @qalshidi ,
Thank you for the revert. I am trying to use ripgrep for this. This is my vim config(https://github.com/sansyrox/macsimus/) .

from vim-bettergrep.

sansyrox avatar sansyrox commented on May 29, 2024

Now, that I try with git grep it is working. What should put in here let g:bettergrepprg = "<some_grepper>" for ripgrep to work?

from vim-bettergrep.

qalshidi avatar qalshidi commented on May 29, 2024

Usually it will auto-configure ripgrep by itself, but if you want to explicitly do it then:

let g:bettergrepprg = "rg --vimgrep"

should suffice

from vim-bettergrep.

sansyrox avatar sansyrox commented on May 29, 2024

Hey @qalshidi ,

I tried adding this, but this doesn't work. Is there a possibility to get debug logs?

from vim-bettergrep.

qalshidi avatar qalshidi commented on May 29, 2024

Can you please let me know the error message? "this doesn't work" is not very helpful. If there is no error message can you be clear on the behavior. Does it simply find nothing?

from vim-bettergrep.

sansyrox avatar sansyrox commented on May 29, 2024

@qalshidi , that is the issue. It doesn't give out an error message. It doesn't return any search results.

When I use Rg in FZF, it then gives out a correct result.

from vim-bettergrep.

qalshidi avatar qalshidi commented on May 29, 2024

Keep in mind it works on my setup but not yours. So can you make a reproducible set up so that I may test why it's not working? Also what OS and vim version are you using?

from vim-bettergrep.

sansyrox avatar sansyrox commented on May 29, 2024

@qalshidi , I using macOS 11.4 20F71 x86_64 and NVIM v0.6.0-dev+1490-g3de777d25 Build type: Release

from vim-bettergrep.

sansyrox avatar sansyrox commented on May 29, 2024

@qalshidi , you can install it using this command

bash <(curl -s https://raw.githubusercontent.com/sansyrox/macsimus/main/utils/install.sh)

This is my neovim config: https://github.com/sansyrox/macsimus/

from vim-bettergrep.

qalshidi avatar qalshidi commented on May 29, 2024

I think I know your issue. You may be searching in a folder with a very large amount of text. If git grep works better then rg is probably ignoring the vcs and taking a while to return with results since it runs asynchronously. Try:

  1. Creating a new folder.
  2. `echo 'this is a test' > file.txt
  3. nvim
  4. :Grep test

And that should work as expected with ripgrep.

Can you tell me where exactly have you tested this with? Have you tried it in a simple folder like I showed?

from vim-bettergrep.

sansyrox avatar sansyrox commented on May 29, 2024

Hi @qalshidi , sorry for the late revert.

I tried this. Even with a single file with a single line, ripgrep doesn't work.

from vim-bettergrep.

qalshidi avatar qalshidi commented on May 29, 2024

When you do the single file with a single line what does :pwd output in Neovim?

from vim-bettergrep.

sansyrox avatar sansyrox commented on May 29, 2024

@qalshidi , :pwd shows the name of that directory only. But something strange has happened now. Even "Grep" has stopped working.

from vim-bettergrep.

sansyrox avatar sansyrox commented on May 29, 2024

However, GrepperRg works.

from vim-bettergrep.

qalshidi avatar qalshidi commented on May 29, 2024

I have checked the code for :GrepperRg and made some fixes that may work. Please update your vim-bettergrep and try again.

from vim-bettergrep.

sansyrox avatar sansyrox commented on May 29, 2024

@qalshidi , it is still not working for me. I'll try to run it on a fresh neovim install and see if it works.

from vim-bettergrep.

qalshidi avatar qalshidi commented on May 29, 2024

Closed.

from vim-bettergrep.

Related Issues (2)

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.