Giter Site home page Giter Site logo

Comments (8)

dajva avatar dajva commented on May 26, 2024 1

Thanks, I'll implement this for 1.5.0

from rg.el.

dajva avatar dajva commented on May 26, 2024

Hi,
That seems like a job for projectile itself, i.e. handling project local variables in general. I don't use projectile myself so I am not familiar how a project is defined but if it's just a top level dir emacs builtin dir local variables may suffice for this.
See https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html

from rg.el.

muffinmad avatar muffinmad commented on May 26, 2024

I created function which returns some commandline params for rg depending on current project. I just can't figure out how to make my function called by rg-build-template. Is it possible that rg-build-template will call custom function alongside with rg-command-line-flags variable?

Thanks!

from rg.el.

dajva avatar dajva commented on May 26, 2024

I am not very keen on adding more complexity to the configuration, i.e. adding a hook or additional setting. And I really think that it's something that should be handled by projectile or by other means within emacs.

Now, there is one change that I think would make sense in this area that I am willing to accept. We could add the possibility to make rg-command-line-flags be a function that returns a list of flags instead of a hard coded list. In essence extend the setting to be either a list or a function. Should be a pretty small change. Please make a pr if you think this makes sense for your use case.

Thanks for your suggestion.

from rg.el.

muffinmad avatar muffinmad commented on May 26, 2024

This solution is perfect and is exactly what i was looking for.
I will try to make PR but it may take some time because of my almost zero elisp knowledge.

from rg.el.

dajva avatar dajva commented on May 26, 2024

Great. This is small enough to work on if you want to expand your elisp knowledge a bit. If you don't get it done I can probably fix it for next release. But it will take some time to land on master since I have my hands full elsewhere currently.

from rg.el.

dajva avatar dajva commented on May 26, 2024

Are you still interested in this feature?

from rg.el.

muffinmad avatar muffinmad commented on May 26, 2024

I've tried to make PR and stuck at making the custom variable rg-command-line-flags to be list or function.

For now rg-command-line-flags contains ignore files for all my projects. It's works well as there are no conflicts in those ignore files.

So for now i don't actually need this feature. But it would be nice to have it some day.

from rg.el.

Related Issues (20)

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.