bbatsov / helm-projectile

Helm UI for Projectile
327 stars 71 forks source link

[Feature request] helm-projectile-rg supports search thing-at-point #125

Closed zozowell closed 5 years ago

zozowell commented 5 years ago

Expected behavior

helm-projectile-rg support thing-at-point search like helm-projectile-ag.

Actual behavior

Today, only search selection-region is supported by helm-projectile-rg, unfortunately the underlaying helm-rg doesn't support thing-at-point either.

Steps to reproduce the problem

I don't see support in code, neither can I find any likely thing in helm-rg

Environment & version information

zozowell commented 5 years ago

I made a PR to address this request : https://github.com/bbatsov/helm-projectile/pull/126 I've been using it in daily work, everything works upto now.

My environment :

xiongtx commented 5 years ago

Doesn't helm-rg already support this?

helm-projectile-rg

zozowell commented 5 years ago

😓 , seems yes... https://github.com/cosmicexplorer/helm-rg/blob/master/helm-rg.el#L689 It is never mentioned in the doc. PR closed. Thanks for the response.

~Reference for others : to enable helm-rg search thing-at-point you need to~ ~lisp~n ~(setq helm-rg-thing-at-point 'symbol)~ ~~ 'symbol is a default setting

xiongtx commented 5 years ago

You shouldn't need to set that explicitly, that's the default.

zozowell commented 5 years ago

Wait, I find an issue, helm-rg searching thing-at-the-point does work in an interactive mode, if you call it interactive directly, but it doesn't work when being called via helm-projectile-rg. https://github.com/cosmicexplorer/helm-rg/blob/master/helm-rg.el#L2437

So, helm-projectile-rg doesn't support this still. Using helm-rg directly doesn't meet the request either, because it loses the power of searching within project.

xiongtx commented 5 years ago

Can you try #127? That should be doing the right thing while taking into account the various customizations.

zozowell commented 5 years ago

127 works fine, thanks. Close #126 then.