Comments (12)
Um, can we just reuse the pattern of .projectile
? I have this ignore list but it doesn't affect counsel-projectile-ag/rg
's behavior.
-/contrib
-/c6
-/c6build
-/chdbg
-/clickhouse
-/dbg
-/rel
-compile_commands.json
-/debian
from counsel-projectile.
Yes, there is an optional argument OPTIONS
to pass any option you like to ag
. For instance:
(counsel-projectile-ag "--ignore some/path")
You can call counsel-projectile-ag
with a C-u
prefix to input the options string interactively.
If you want to setup counsel-projectile-ag
to systematically ignore certain paths, you could instead add these paths to the variables projectile-ignored-files-rel
and/or projectile-ignored-directories-rel
.
from counsel-projectile.
from counsel-projectile.
the output of projectile-ag
is quite weird. I cannot see any file names. The ag command is ag --ignore \*.elc --ignore \*.pyc --ignore \*.o --literal --group --line-number --column --color --color-match 30\;43 --color-path 1\;32 --smart-case --stats -- BackgroundProcessingPool .
from counsel-projectile.
Doesn't seem to obey your .projectile
file either.
Can you call these three functions from a project buffer and copy the output?
(projectile-project-vcs)
(projectile-ignored-files-rel)
(projectile-ignored-directories-rel)
from counsel-projectile.
they are
git
(".DS_Store" "Icon" "TAGS")
(".idea/" ".ensime_cache/" ".eunit/" ".git/" ".hg/" ".fslckout/" "_FOSSIL_/" ".bzr/" "_darcs/" ".tox/" ".svn/" ".stack-work/" "../../.emacs.d/.local/" ".sync/" "contrib/" "c6/" "c6build/" "chdbg/" "clickhouse/" "dbg/" "rel/" "debian/")
from counsel-projectile.
So, projectile-ignored-directories-rel
correctly parses your .projectile
file, but projectile-ag
and counsel-projectile-ag
do not pay attention to the .projectile
file for git
projects. This is because git
has its own .gitignore
file and ag
parses it natively. I would suggest to use .gitignore
instead of .projectile
for such projects.
from counsel-projectile.
Hmm, some directories are not suitable for gitignore, such as test and contrib folders.
from counsel-projectile.
Can you update to latest commit, set counsel-projectile-ag-use-gitignore-only
to nil
and let me know if it works?
from counsel-projectile.
@ericdanan thanks! it works perfectly.
from counsel-projectile.
I just pushed another commit and that variable is no longer there, the behavior you want is now the default.
This means counsel-projectile-ag
and counsel-projectile-rg
work a bit differently from their projectile analogues, but I think it is more consistent with counsel-projectile-find-file
(or equivalently projectile-find-file
) in the sense that all these functions (hopefully) now look at the same set of files in a project.
When you call counsel-projectile-ag
or counsel-projectile-rg
with a prefix arg you have full control on the options to be passed to ag
or rg
including which paths are ignored.
from counsel-projectile.
Please open a new issue if needed.
from counsel-projectile.
Related Issues (20)
- Sorting files by relevance to the query HOT 2
- FR: Add command "counsel-projectile-recent-file" HOT 5
- unable to modify default action HOT 2
- Switching project now makes current buffer a blank *counsel-projectile* buffer HOT 1
- Set a default landing file per project HOT 4
- counsel-projectile cannot work out with other executable program, such as rg、ag、fzf etc. HOT 3
- counsel-projectile-switch-project ignores c-u -- does not refresh cache HOT 1
- f6
- Preselect next buffer HOT 1
- Projectile ag and grep - abbreviate-file-name: Wrong type argument: stringp, nil HOT 1
- counsel-projectile-preview-buffers t and unable to open a file HOT 1
- counsel-projectile-find-file extremely sluggish in larger repositories. HOT 6
- Issue with `counsel-projectile-rg` on melpa-stable HOT 1
- Error in post-command-hook (ivy--queue-exhibit): (void-variable ivy--display-transformers-list) HOT 2
- counsel-projectile-switch-to-project very slow to compare with projectile-switch-to-project
- `C-c C-k` in `counsel-projectile-switch-to-buffer` returns to `switch-to-buffer` instead of going back `counsel-projectile-switch-to-buffer`
- counsel-projectile fn omits file that is a visited buffer
- Use projectile-get-ext-command with counsel-projectile-rg?
- Merge into `abo-abo/swiper` repository? HOT 1
- counsel-projectile-switch-project-by-name
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from counsel-projectile.