Commit graph

392 commits

Author SHA1 Message Date
Nikita Leshenko aaa11a6823 Convert case' to cl-case' to fix cl-lib related errors
Broken since PR #13059
2019-12-18 12:08:05 +01:00
madand 194de4d73a
[ivy] Fix visual selection expansion across the buffer on SPC s S
and `SPC s B`

When one invokes `spacemacs/swiper-region-or-symbol` (`SPC s S`) or
`spacemacs/swiper-all-region-or-symbol` (`SPC s B`) with active visual selection
(transient-mark-mode), the selection expands over the buffer while one jumps
around with swiper. Thus I believe it is appropriate to deactivate visual
selection within the above command.

Since the mentioned commands both use identical code for getting the text to
operate on, I moved that code into a separate function.
2019-12-15 15:17:21 +01:00
madand 57e6849c68
[ivy] SPC h m: fallback to woman on Windows
`man` command displays output from the external program with the same name,
so it will generally fail to work on Windows.

`woman` is a pure elisp parser for manpages, so it will work on Windows. But
`woman` lacks colorizing of manpages, so we only use it as a fallback.
2019-12-15 15:06:26 +01:00
Spenser Truex 05fb56bfbf Remove uses of lexical-let, part of the deprecated cl package
These prevented loading, a serious bug.
2019-12-15 08:45:27 +01:00
kimr da80634370
converted cl to cl-lib 2019-12-14 20:20:51 +00:00
madand 239f60a65f [ivy][docs] Add SPC h m: search available man pages
This keybinding is documented in DOCUMENTATION.org, yet was missing in ivy layer.
2019-12-10 22:54:40 +01:00
Brian Wignall 4df6c9035f
Fix typos 2019-12-05 22:23:04 +01:00
duianto 979f4db640
[helm] Fix searching in projects with C-s from SPC p p
Fixes #11878

The issue seems to have been caused by helm making sure that
the functions that are called with: helm-exit-and-execute-action
are actions.

Ensure action is available before running it
d6dfb8f1e3
2019-12-05 22:17:11 +01:00
duianto 6649e78f3e
Document helm and ivy colors/faces key bindings
Helm:
SPC C l   calls helm-colors
SPC h d F calls spacemacs/helm-faces

Ivy:
SPC C e   calls counsel-colors-emacs
SPC C f   calls counsel-colors-faces
SPC C w   calls counsel-colors-web
SPC h d F calls counsel-describe-face

Thanks Miciah for the SPC h d F suggestion.
2019-12-03 22:21:42 +00:00
madand fd184bb94f Fix spacemacs/counsel-search with ag and rg
The commit 9c613b8 introduced a regression for ivy users that use ag or rg as
the search tool. It made `C-c C-e` and `F3` keybindings unavailable, and thus
making it impossible to make multi-file edits.

Partially fixes #12838
2019-11-24 22:07:17 +01:00
Maximilian Wolff dd7a5d98be
Revise helm recompile package action and bind recompile-elpa
The newly introduced function to compile an elpa package
was very much redundant with the existing recompile-elpa function.

I have adapted recompile-elpa so that it can be used for the helm action too.

In addition I have bound recompile-elpa to `SPC c C-c` to allow users to
easily recompile their entire elpa directory if the need arises.

I have also removed the error handling in the helm action in favor of
standard error reporting via the *Compile-Log* buffer.
2019-11-24 02:07:15 +01:00
Gia Thanh Vuong 94de754504
[core] [helm] add action to recompile an elpa package
How to use: `SCP h p` select package then `F3` or `C-z` and choose `Recompile`

Motivation: Some packages when compiling need other packages to be loaded first.
The pacakage maintainers should make sure of this requirement but sommetimes
they don't. It also doesn't help when Spacemacs is lazy loading and compiles
updated pacakges on startup. So the manual fix for this problem is recompile the
package once Spacemacs has fully loaded. This requires user go to the package
install location to delete elc files and then do a `spacemacs/recompile-elpa`.
This commit will do that chore for them.

This will make fixing the problem with `org-plus-contrib` or `dumb-jump` update
every now and then easier.
2019-11-23 23:40:50 +01:00
Carlos Ibáñez 6ca42efe7c Fix wrong initial directory 2019-11-18 15:32:25 +01:00
lovrolu bc22a259e8 Don't assume the previous binding was evil-insert-digraph 2019-11-15 20:05:23 +01:00
duianto d125f2abd2 Fix void counsel-find-file-map
When the ivy package is installed without counsel,
and (require 'ivy) is called, then an error message
appears: void-variable counsel-find-file-map
2019-11-08 11:23:10 +01:00
Hong Xu 5cd73edd1d Use string= instead of eq when comparing strings.
This is a follow-up of #12885, in which I used the wrong operator.
2019-11-06 10:07:50 +01:00
Hong Xu 9c613b8770 Optimize =spacemacs/counsel-search= for =ag= and =rg=
Use =counsel-ag= and =counsel-rg= when possible. They have more
optimizations, such as switching directory, the ability to turn
on and off casefold, etc. Counsel will also carry future
improvement with these two functions, and spacemacs will
automatically benefit from it.
2019-11-05 16:40:27 +01:00
duianto b837c1d397 [ivy] remove boundp check
Thanks yuhan0 for the suggestion
https://github.com/syl20bnr/spacemacs/pull/12865/files#r340909922
2019-10-31 10:55:23 +01:00
Hong Xu 383da46e38 Keep ~C-h~ binding in =counsel-find-file-map= only for hjkl navigation
It has already been bound to <kbd>C-backspace</kbd> and
<kbd>C-delete</kbd>. Such an
additional binding is redundant (if hjkl navigation is not used) and
makes the original <kbd>C-h</kbd> binding
(help) unavailable.
2019-10-30 18:18:54 +01:00
duianto 5bcc96e9a9 [helm] Add helm-ls-git-ls to SPC g f f
The HELM Lsgit buffer has three sections:
- Git status (files: modified, deleted, etc.)
- Buffers in git project
- Git files
2019-10-28 21:26:04 +01:00
Carlos Ibáñez 0b0203e03f Fix git-grep on point 2019-10-27 12:59:06 +01:00
Carlos Ibáñez cb99bf9f39 Fix broken ivy-occur 2019-10-27 12:59:06 +01:00
Hong Xu cff6b47e6f Set counsel-find-file-at-point to t by default.
This enables better auto completion of =counsel-find-file=.
2019-10-27 05:06:02 +01:00
duianto 86c4ca2133 [ivy] Add counsel colors and faces key bindings
SPC C e calls counsel-colors-emacs
SPC C f calls counsel-faces
SPC C w calls counsel-colors-web
2019-10-19 23:13:35 +02:00
duianto 6472dfe3c2 [auto-completion] List feature pkg company-quickhelp
The company-quickhelp package wasn't mentioned in the auto-completion readme.

And the variable name auto-completion-enable-help-tooltip that enables the
package doesn't mention the package name either (which is fine).

This just makes it somewhat easier to see/find that the company-quickhelp
package is related to tooltips and that it's part of the auto-completion layer.
2019-10-19 23:03:05 +02:00
duianto e96f0adfdd Fix C-k in company with tooltip
Got the idea for the fix from this comment:
https://github.com/expez/company-quickhelp/issues/17#issuecomment-526783169

I simplified it to only un/define C-k, since C-j worked without the fix.
2019-10-19 19:42:21 +02:00
Tianyao Chou 06786b4e66 Add company-box and basic setup
add auto-completion-enable-help-tooltip support

add auto-completion-use-company-box option and update document

add company-box config source url, remove empty line and join single line parenthesis

hide company-box mode line

update CHANGELOG.develop

hide doc popup when selection changed

add all-the-icon in auto-completion-packages

move icons config to auto-completion/init-all-the-icons according to duianto's advice
2019-10-18 13:20:55 +02:00
Hong Xu e37b70cfa3 Bound counsel-git to gff and move magit-find-file to gfF.
counsel-git find a file in the current git repository. "gff" is
currently bound to magit-find-file. While counsel-git seemingly performs the
same functionality as magit-find-file, they are substantially different:
magit-find-file is not intended to find a file, contrary to what the
name indicates. See https://github.com/magit/magit/issues/3967 for
explanation. This is why we need another key binding for counsel-git.
2019-10-16 22:03:42 +02:00
duianto 98e7bf38ad [ivy] Rename counsel-more-chars to ivy-more-chars
counsel-more-chars was renamed to ivy-more-chars a year ago:
Move counsel-more-chars-alist and counsel-more-chars to ivy.el.
4461ef302a

with an alias to counsel-more-chars.

The alias was removed 2 days ago:
ivy.el: Clean up obsolete aliases
1a9002bf4b
2019-10-14 10:34:19 +02:00
duianto 5894c396cb Fix C-k ivy-previous-line in ivy-switch-buffer
It applies to the editing styles:
- hybrid with the variable hybrid-style-enable-hjkl-bindings set to t
- vim

Moved the default key binding for ivy-switch-buffer-kill:
From: C-k
To:   C-M-k

Thanks for the suggestion: asok
2019-09-17 18:28:02 +02:00
madand 630781581a Fix definitions of extra actions R and D for recentf
`ivy-recentf` was renamed into `counsel-recentf` upstream.
2019-09-10 12:40:21 +02:00
deb0ch 6857914441 completion: add command for unfiltered buffers list under SPC b U 2019-09-08 10:19:10 -04:00
deb0ch 22713541f8 completion: filter helm-mini with useful/useless buffers regexp 2019-09-08 10:19:10 -04:00
Junxuan 6b2f849efd update helm-xref to set the correct xref-show-xrefs-function
helm-xref currently provides two functions and the user is expected
to use the correct one based on their emacs version. The lazy loading
logic has to be updated to set the correct xref-show-xrefs-function.
2019-08-05 20:34:04 +02:00
duianto 277eca6cea Update README.org (Updated)
- Added a changelog.develop entry to the various documentation changes section.
- Fixed a typo.
- Improved some of the wording.
- Mentioned that save or discard leaves helm-ag-edit not just iedit state.
2019-08-03 22:16:44 +02:00
Lucius Hu c8cdf8dc2b Update README.org to state how to discard changes made in iedit
- Added an entry on how to discard changes made in `iedit` states via `helm-ag`
2019-08-03 21:04:46 +02:00
syl20bnr 009777f6cf Add pre-dump for org, emacs-lisp and helm 2019-07-26 16:33:10 -04:00
duianto bbd75935e8 [helm] Load helm before completion-at-point
When trying to complete a path at the `:e ` evil-ex-completion prompt by
pressing `TAB`.

Before: The default Emacs `*Completions*` buffer opens.
After: The `HELM Completion At Point` buffer opens.

And sorted the transient hooks alphabetically.
2019-06-02 21:20:08 +02:00
duianto 3868a5364f [doc] Fix typos and add missing/remove extra ~
Add missing ~ (tilde) around key bindings.
Remove an extra ~.
2019-06-01 20:40:22 +02:00
emacspace c7c348a676 documentation formatting: Sun May 26 20:58:52 UTC 2019 2019-05-27 01:23:35 +03:00
Juha Jeronen b4907d0540 Fix spacemacs//helm-open-buffers-in-windows
Opening more files than available windows, showed:
Symbol’s value as variable is void: cl-return

Fix #12358
2019-05-25 12:30:36 +02:00
bb2020 6f34185784 [ivy] Add ivy-ret-visits-directory variable 2019-05-21 22:47:21 +02:00
Anton-Latukha f6660f82d4
Switch to the new layers generator 2019-05-15 21:08:21 +03:00
Miciah Masters 322528ca8d spacemacs-layouts: Fix adding buffers to new persp
Delete the hook that commit 9fcf8c898d added
to persp-created-functions, and change spacemacs/ivy-spacemacs-layouts,
spacemacs/helm-perspectives, spacemacs/helm-persp-switch-project, and
spacemacs/ivy-persp-switch-project to achieve the intended goal of adding
the desired buffers after creating a new perspective.

Change spacemacs/helm-persp-switch-project and
spacemacs/ivy-persp-switch-project as follows: If the user selects a
project but then quits without selecting a file or buffer, the new
perspective is now immediately killed.  Otherwise, if the perspective did
not already exist, any buffers that belong to the selected project are
added to the perspective.

Add the following actions to spacemacs/ivy-spacemacs-layouts and
spacemacs/helm-perspectives:

* Create a new perspective with the Spacemacs home buffer (default action).
* Create a new perspective with the buffers that belong to the current
  buffer's project.
* Create a new perspective with the buffers that belong to the current
  perspective (i.e., make a copy of the current perspective).

This commit resolves the problem reported in
9fcf8c898d (commitcomment-33343455).

This commit also fixes a problem with the default action for
spacemacs/ivy-spacemacs-layouts and spacemacs/helm-perspectives.  According to
commit 7b931a9f5b, the default action is supposed
to display the home buffer if the action creates a new perspective, which was
determined by checking whether the perspective was missing from the list of
perspectives _before_ switching.  However, commit
eb7ca651fe changed this logic so it was checking
whether the perspective was missing from the list of perspectives _after_
switching.  This commit restores the correct logic.

* CHANGELOG.develop: Update.
* layers/+completion/ivy/funcs.el (spacemacs/ivy-spacemacs-layouts): Add
"Copy Current Layout" and "Create Project Layout" actions to the docstring.
Use spacemacs//create-persp-with-home-buffer for the default action.
* layers/+completion/ivy/packages.el (ivy/post-init-persp-mode): Add
actions for spacemacs//create-persp-with-current-project-buffers and
persp-copy.
* layers/+spacemacs/spacemacs-layouts/funcs.el
(spacemacs||switch-layout): New macro.  Switch to the named perspective,
and initialize it using the provided forms if the perspective is new.
(spacemacs//create-persp-with-current-project-buffers): New function.
Create a new perspective with the current project's buffers.
(spacemacs||switch-project-persp): New macro.  Switch to the named
perspective, and evaluate the provided forms with
projectile-after-switch-project-hook bound with a hook that adds the
current project's buffers to the perspective.  If the user quits during the
evaluation of the forms, kill the perspective.
(spacemacs//create-persp-with-home-buffer): New function.  Switch to the
named perspective, and go to the Spacemacs home buffer if the perspective
is new.
(spacemacs/helm-perspectives): Use spacemacs//create-persp-with-home-buffer
for the default action.  Add actions for
spacemacs//create-persp-with-current-project-buffers and persp-copy.
(spacemacs//helm-persp-switch-project-action): New function.  Switch to the
named perspective and call projectile-switch-project-by-name, using the new
spacemacs||switch-project-persp macro.  Bind helm-quit-hook with a hook
that kills the new perspective if the user quits
projectile-switch-project-by-name.
(spacemacs/helm-persp-switch-project): Use
spacemacs//helm-persp-switch-project-action.
(spacemacs//ivy-persp-switch-project-action): New function.  Switch to the
named perspective and call counsel-projectile-switch-project-action with a
hook to add the project's buffers to the new perspective.
(spacemacs/ivy-persp-switch-project): Delete advice for
counsel-projectile-switch-project-action.  Use
spacemacs//ivy-persp-switch-project-action instead.
(spacemacs//add-project-buffers-to-persp): Deleted.
* layers/+spacemacs/spacemacs-layouts/packages.el
(spacemacs-layouts/init-persp-mode): Don't add a hook to
persp-created-functions.
2019-05-13 17:11:27 +02:00
syl20bnr 953573ade5 [helm] Document SPC s C and sort key bindings 2019-05-12 11:35:35 -04:00
Yang Qian ada180786e Introduce key binding sC for helm-swoop-clear-cache
helm-swoop cannot detect the buffer has changed when calling git checkout to
change the file content, so helm-swoop won't clear the cache, we have to clear
the cache manually by evaluating `helm-swoop--clear-cache`. As it is
inconvenient, so I introduce a new key binding to to this.

Signed-off-by: Yang Qian <yang.qian@citrix.com>
2019-05-06 11:09:55 +02:00
Bet4 bb86989775 semantic: enable company and disable idle summary when gtags is enabled 2019-05-04 17:18:28 +02:00
JAremko 5d02b1c4bb Add more tags 2019-05-03 03:44:19 +03:00
syl20bnr c987fbecdf Revert "Bind ~SPC f F~ to =helm-find= for recursive directory search functionality."
This reverts commit 3a23e0cc6b.

This change completely break `SPC f F` in two ways:
1) it breaks the convention followed at various places to have capital letter
   bindings to prefill the helm prompt
2) it breaks the main functionality of the bindings which is very important:
   press `SPC f F` on a path will brings you directly to the directory of this
   file. It allows to quickly nagivate to files references in files.
2019-04-24 10:13:30 -04:00
jjzmajic 3a23e0cc6b Bind ~SPC f F~ to =helm-find= for recursive directory search functionality.
I realize this may be controversial, but as I understand it (correct me if I'm
wrong), all `SPC f F` does differently compared to `SPC f f` is call the vanilla
version of `helm-find-files` that does take `thing-at-point` into account. But I
presume we removed this feature in `spacemacs/helm-find-files` for a reason.

Also, it makes sense as a *forte* version of `helm-find-files` when you can't
find something in your current directory and decide to drill deeper. This
complies with the general tone of uppercase/lowercase bindings in Spacemacs, and
provides more utility than te subtle distinction between different
implementations of `helm-find-files`.
2019-04-20 22:15:29 +02:00