Commit graph

231 commits

Author SHA1 Message Date
Eric Danan
332e4c9817 new command: counsel-projectile-grep 2017-11-07 23:52:29 +01:00
Eric Danan
293a8f2f6a turn defvars into defcustoms 2017-11-06 14:29:48 +01:00
Eric Danan
56c0e3a521 allow to remove current buffer or project from candidates 2017-11-05 21:00:15 +01:00
Eric Danan
88a16cb753 Revert "Add preselect for switch-to-buffer (#53)" (#54)
This reverts commit 975020829b.
2017-10-01 15:41:50 +02:00
seudut
975020829b Add preselect for switch-to-buffer (#53)
Thanks.
2017-10-01 15:26:51 +02:00
tummychow
b57c635ba0 Fix duplication in counsel-projectile
If the first file in the projectile-current-project-files is also a
buffer, it will appear twice in the counsel-projectile list. This is
fixed by reassigning the result of the delete expression to the files
list.
2017-09-22 18:26:08 -04:00
Eric Danan
20557b47a9 improve performance of `counsel-projectile' 2017-09-11 22:04:26 +02:00
Eric Danan
a754b4b4fd cp-switch-project: rename default action 2017-09-06 21:51:13 +02:00
Eric Danan
6946882e99 cp-switch-to-buffer: rewrite actions 2017-09-06 21:45:09 +02:00
Eric Danan
48817f369f cp-find-dir: rename actions 2017-09-06 20:13:59 +02:00
Eric Danan
d28e3b7138 cp-find-file: rewrite actions 2017-09-06 20:07:40 +02:00
Eric Danan
6db57ff445 make all action lists customizable 2017-09-06 12:49:09 +02:00
Eric Danan
fe524f7fcd make actions and transformer functions "public"
avoid `--' in the function name
2017-09-06 12:24:13 +02:00
Eric Danan
c83216eba4 cp-switch-project: make action list more easily customizable 2017-09-05 22:38:12 +02:00
Eric Danan
94a8f753e0 improve some docstrings
Fix #50
2017-09-05 21:15:19 +02:00
Eric Danan
cc32e2055a use a different mechanism to switch project
Use the newly defined `counsel-projectile-switch-project-by-name`
instead of `projectile-switch-project-by-name`.
Fix #48
Fix #39
Fix #32
Fix #24
2017-09-05 12:30:21 +02:00
Eric Danan
363c875df6 move cp-unvisited-file-list to relevant section 2017-08-16 11:00:37 +02:00
ambihelical
2a46d758f7 Improve counsel-projectile-find-file performance
Current code will show significant lag for projects with large numbers
of files.  Tests with 400K files shows 15-20s lag for
counsel-projectile-find-file.  Profiling showed that this was
due to the preprocessing of projectile-current-project-files to add
'ivy-virtual face to files not already in a buffer.  To fix this,
a display transformer was added for this command so that the face
modification was applied only to at most ivy-height files.

The preprocessed file list was also used by counsel-projectile
code paths, so some additional modifications were made to ensure
that that code path does not change behavior.  Any similar issues in
counsel-projectile performance was not addressed in this commit.

Details:

* move 'ivy-virtual face change to a display transformer function
* use projectile-current-project-files instead of counsel-projectile--file-list
  for ivy-read.
* reduce the scope of counsel-projectile--file-list, making it return
  only unvisited files, and renaming it accordingly.  This is now only
  used indirectly by the counsel-projectile function.
* change ivy-switch-buffer-transformer to propertize files at display time.
2017-08-16 10:48:52 +02:00
Eric Danan
9e3db12005 new action in cp-switch-project to search with rg
* counsel-projectile.el (counsel-projectile-switch-project): new
  action to search with rg.

[Closes #38]
2017-08-15 13:07:49 +02:00
Eric Danan
b9950f6f0b allow initial input in cp-ag and cp-rg
* counsel-projectile.el:
(counsel-projectile-ag-initial-input): new variable
(counsel-projectile-ag): use the above var
(counsel-projectile-rg-initial-input): new variable
(counsel-projectile-rg): use the above var

[Closes #43]
2017-08-15 12:53:04 +02:00
Hans Jang
d55966f113 Fix the performance of counsel-projectile-switch-to-buffer 2017-08-14 17:27:56 +02:00
Eric Danan
575bf98179 Merge commit 'pull/origin/47' 2017-08-14 17:07:03 +02:00
Eric Danan
280ead0e51 Allow finding file manually with Ivy action
[Fixes #35]
2017-08-14 12:41:46 +02:00
Eric Danan
beb3dd0081 update project list after removing project 2017-08-14 12:16:46 +02:00
Yiming Chen
07ba798d76 fix rg ignore option in non git projects
- Fix #46
- according to rg's manual, files for `--ignore-file FILE ...` should
  be matched relative to the current working directory
- while `--glob` can accept files that does not exist in current
  project (Thanks to @chaoyi)
2017-08-05 17:17:19 +08:00
DEADB17
859357ab63 remove selected project instead of current project
`m-x counsel-projectile-switch-project` `m-o r` removes the *current* project
from `projectile-known-projects` instead of the selected one.

The expected behaviour is for the action to operate on the *selection*, which is
the case for the rest of the actions.

I was not able to determine why this was happening. The use of dynamic binding
and my inexperience with the elisp debugger were a limitation; It looks like it
might be an inconsistency in projectile, but not necessarily a bug.
2017-03-11 13:08:46 -05:00
ericdanan
aefd25c747 Merge pull request #29 from wmedrano/master
Add rg support
2017-02-16 23:26:37 +01:00
Will S. Medrano
19e8e95361 Add rg support 2017-01-17 19:00:28 -08:00
Eric Danan
6d126d599b counsel-projectile-ag: quote arguments
Closes #25
Closes #26
2017-01-11 13:56:40 +01:00
Eric Danan
5728486a28 fix option formatting in counsel-projectile-ag
* counsel-projectile.el (counsel-projectile-ag): fix option
  formatting (add missing space)
2016-12-12 10:46:29 +01:00
Eric Danan
ea492ad5ce fill and format docstrings 2016-12-12 10:29:00 +01:00
ericdanan
4b0ca9270b Merge pull request #23 from raxod502/remove-trailing-whitespace
Remove trailing whitespace
2016-12-12 10:12:52 +01:00
ericdanan
57a6813799 Merge pull request #22 from raxod502/autoload-counsel-projectile-ag
Autoload counsel-projectile-ag
2016-12-12 10:11:33 +01:00
Radon Rosborough
3fa6a4cef0 Remove trailing whitespace 2016-12-11 11:11:45 -08:00
Radon Rosborough
9d766740b2 Autoload counsel-projectile-ag 2016-12-11 11:10:23 -08:00
Eric Danan
f1b61d7c7a update required packages versions 2016-12-11 12:51:47 +01:00
Eric Danan
86ddf43616 Revert "execute find-file/dir/buffer action in ivy-state-buffer"
This reverts commit ada2ae0a0f.

The change is no longer needed after swiper commit 50bb6b3.
2016-12-04 20:56:13 +01:00
Eric Danan
ada2ae0a0f execute find-file/dir/buffer action in ivy-state-buffer
needed since swiper commit 6519ecc
2016-12-02 22:17:10 +01:00
Eric Danan
36abb1f2c0 fix docstring 2016-12-02 22:08:33 +01:00
Eric Danan
675d17d2dc update readme 2016-10-23 00:38:23 +02:00
Eric Danan
6c1a928a63 [Fix #14] Rewrite cp-switch-to-buffer and more 2016-10-23 00:25:55 +02:00
Eric Danan
c0c60d63bc cp-find-file / cp-find-dir: run hook inside actions 2016-10-19 16:03:47 +02:00
Eric Danan
7b9a81ce5c add counsel-projectile-ag 2016-10-12 23:07:00 +02:00
Eric Danan
87957f1919 remap projectile key bindings 2016-10-12 15:13:25 +02:00
ericdanan
dd6d0d62c1 Merge pull request #12 from brunoqc/patch-1
Fix typo in README.md
2016-10-04 09:09:03 +02:00
Bruno Bigras
68568ec531 Fix typo in README.md 2016-10-03 17:39:15 -04:00
Eric Danan
e5f2f20a16 fix root in cp-find-file / cp-switch-to-buffer
For some reason, when one of these two functions was used as an action
in cp-switch-project, its actions were losing track of the project root
against which to expand filenames (they were using the root of the root
of the project from which cp-switch-project was called instead of the
root of the selected project to switch to). To fix this issue, the correct root is now recorded in the candidate
files / buffers.
2016-09-26 14:47:55 +02:00
Eric Danan
b157a8d12c fix typo in cp-switch-to-buffer prompt 2016-09-16 22:19:38 +02:00
Eric Danan
15d1bd392d make drop-to-switch-project binding customizable 2016-09-16 14:28:33 +02:00
Eric Danan
fdce7664bb fix typos in readme 2016-09-15 16:35:41 +02:00