You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to write a custom find-grep script that did the following:
returned matches from the preferred file extensions (for python -> py,js, ts, jsx, tsx) and an exhaustive exclude list
then returned matches only from the exclude list (site-packages, node_modules...)
This lets me run a single consult-grep and get back all the relevant matches, with the most relevant matches returned at the top and more quickly
It was very difficult to plumb this into consult-mode. There are multiple builder functions that are nested. Eventually this is what I built. I'm totally open to feedback if there is a cleaner way to integrate this.
It would help if the elisp functions were a bit better documented. It took a while to realize that I was returning results in the wrong format.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I wanted to write a custom find-grep script that did the following:
This lets me run a single consult-grep and get back all the relevant matches, with the most relevant matches returned at the top and more quickly
It was very difficult to plumb this into consult-mode. There are multiple builder functions that are nested. Eventually this is what I built. I'm totally open to feedback if there is a cleaner way to integrate this.
It would help if the elisp functions were a bit better documented. It took a while to realize that I was returning results in the wrong format.
and the find-script
Beta Was this translation helpful? Give feedback.
All reactions