Commit graph

102 commits

Author SHA1 Message Date
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
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
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
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
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
852011d217 update commentary 2016-09-15 13:54:54 +02:00
Eric Danan
c400695dc5 add key bindings 2016-09-15 13:45:31 +02:00
Eric Danan
9d6018efec new fn: counsel-projectile-find-file-or-buffer 2016-09-15 09:05:52 +02:00
Eric Danan
1f374307bb add counsel-projectile-map 2016-09-15 08:58:09 +02:00
Eric Danan
3416026fd6 add virtual buffers to counsel-projectile 2016-09-15 08:39:02 +02:00
Eric Danan
c01f34d7f5 counsel-projectile: fix misplaced arg 2016-09-14 09:17:24 +02:00
Eric Danan
fdd836816a keybinding for new counsel-projectile function 2016-09-13 22:56:17 +02:00
Eric Danan
f6086a7e8a new counsel-projectile function
It is more like helm-projectile
2016-09-13 22:55:12 +02:00
Eric Danan
ba4a2f9619 rename counsel-projectile
New name is counsel-projectile-switch-project
2016-09-13 22:53:54 +02:00
Eric Danan
358eefcafe replace -remove-item with -delete 2016-09-13 22:34:26 +02:00
Eric Danan
2611d99ac1 counsel-projectile: preselect current project 2016-09-13 22:33:46 +02:00
Eric Danan
9abc3463b9 remove with-ivy-window 2016-09-13 22:23:18 +02:00
Eric Danan
351ce9ec61 prepend project name 2016-09-13 22:03:44 +02:00
Eric Danan
0f1d381f89 change "other window" keybinding
Changed it to `M-o j` in `counsel-projectile-find-file`,
`counsel-projectile-find-dir`, and `counsel-projectile-switch-to-buffer`

This is consistent with the `counsel-find-file` and `ivy-switch-buffer`
key (see https://github.com/abo-abo/swiper/issues/505)

Closes #1
2016-05-07 19:22:09 +02:00
Oleh Krehel
5633ca5615 Rely more on projectile-expand-root 2016-04-14 12:31:09 +02:00
Oleh Krehel
916d4a7034 Update indentation settings
* .dir-locals.el: Set `indent-tabs-mode' automatically.
2016-04-14 12:28:10 +02:00
Eric Danan
fc993c9275 change counsel version requirement 2016-04-13 11:02:06 +02:00
Eric Danan
5f9c5b1a24 add minimum version requirements 2016-04-12 13:44:07 +02:00
Eric Danan
4950d08fa1 add action to start eshell 2016-04-12 10:06:52 +02:00