Commit graph

257 commits

Author SHA1 Message Date
ralesi 9b24a38eb9 Ivy: Multiple loading improvements and additional alternates
* Don't list imenu if it isn't loaded
* Add recentf config to :post-init function
* Add :init and :config sections for counsel and ivy for accessibility
* Add projectile alt actions to invalidate cache
* Add recentf alt actions to refresh and delete items
* Load flx since it is listed
2017-04-17 23:39:35 -04:00
syl20bnr 7554affd49 Remove additional CUSTOM_IDs from docs 2017-04-17 19:36:38 -04:00
syl20bnr 62167f708d tests: move html-export test to doc /tests/doc directory 2017-04-17 19:25:43 -04:00
duianto 94703a64be Remove "pr" 'projectile-recentf from ivy layer
problem: "pr" 'projectile-recentf is defined in both the Ivy layer
and spacemacs-base/packages.el

solution: remove it from the Ivy layer.
2017-04-17 17:43:05 -04:00
syl20bnr a4be86cb5d Update documentation to remove explicit mentions to helm
Move some helm explicit sections the helm layer README.
2017-04-16 11:14:59 -04:00
person808 489f391fb5 Add beginners tutorial to ivy-spacemacs-help. 2017-04-16 11:14:59 -04:00
Somelauw c5066d6100 Add documentation for ivy 2017-04-16 11:14:59 -04:00
John Wood 86829c5467 Add Helm layer README
Add a README.org to the Helm layer to fix `helm-spacemacs-help-layers`
(`SPC h l`). There is little actual documentation -- it just links to
the official docs as well as the Helm wiki and the Helm guide.

Issue #8679
2017-04-16 11:14:59 -04:00
Somelauw 4361254e06 Fix #8698 2017-04-13 12:04:30 +02:00
syl20bnr 2fba8eeba8 Remove unecessary parenthesis in comments 2017-04-12 23:35:23 -04:00
tinysong 41de690a55 fix url jump error 2017-04-12 23:34:00 -04:00
MadAnd 33f3cf1293 ivy: add 2 missing bindings "SPC fel" and "SPC hi"
These are available with Helm and Counsel has similar counterparts.
2017-04-12 23:23:09 -04:00
Somelauw a8f68c0cca Add escape and M-SPC bindings to ivy
- escape quits the minibuffer
- M-SPC enters transient state

See conventions at
https://github.com/syl20bnr/spacemacs/blob/master/doc/CONVENTIONS.org
2017-04-12 23:21:51 -04:00
Steven Allen 6b7aa70428 Late expand completion backends in the spacemacs|add-company-backends macro
Otherwise, the Haskell layer throws an eager expansion error because
`layers/+lang/haskell/funcs.el`, which calls this macro, is loaded before
`layers/+completion/auto-completion/config.el`, which defines
`spacemacs-default-company-backends`.
2017-04-11 23:51:29 -04:00
duianto 743471996f Update auto-completion layer readme.org: dead link
Problem:  The auto-complete link: auto-complete.org leads to a domain
          for sale page.
Solution: Change the link to the auto-complete github page.
2017-03-26 13:25:59 -04:00
Robert O'Connor e9ff9f09c6 Remove trailing whitespace from all files 2017-03-26 13:06:43 -04:00
syl20bnr 12827c03d8 core: add :hooks property to spacemacs|add-company-backends
Allow to control wether to hook the generated hook functions or not.
2017-03-19 12:40:36 -04:00
bmag b6e553bd06 rg: explicitly request line numbers
rg tries to be smart about printing line numbers in its output (if running
inside a TTY or not). On Windows, sometimes (always?) it chooses not to print
line number. However, we always want line numbers, so we need to pass -n flag.

Also fix a minor grammar mistake.
2017-03-09 09:00:39 +02:00
Aaron Jensen 0c8af9686c Fix ivy wgrep and helm-ag when used with rg
wgrep does not know how to handle column numbers, which the `--vimgrep` flag
adds.
2017-02-20 08:39:42 +02:00
syl20bnr 1cfb90e030 auto-complete: add fuzzy package
Needed for fuzzy completion with auto-complete
2017-02-02 14:56:44 -05:00
syl20bnr 7d75e651a4 Remove limitation of number of candidates for helm-themes
Fixes #4062
2017-02-02 00:08:59 -05:00
syl20bnr 6b6d365b96 Speed up SPC h SPC by moving FAQ source in its own feature
Getting FAQ candidates requires org to be loaded which in turn requires to
load magit (via orgit) etc...

This commit moves the FAQ helm source to a new feature helm-spacemacs-faq and
removes the FAQ source from SPC h SPC so the FAQs are only available as a helm
source via SPC h f.

But we have still the FAQ org file entry in SPC h SPC so it is easy to open
the file from the main help key binding.
2017-01-15 22:19:56 -05:00
syl20bnr c1274fe580 Remove spacemacs-base/helm-spacemacs-deprecated 2017-01-15 22:19:56 -05:00
syl20bnr 3162f0e19b core: factorize code in configuration-layer/make-all-packages 2017-01-15 22:19:56 -05:00
syl20bnr fb27ede558 Bump year in copyright headers
Happy New Year 2017!
2017-01-05 23:08:17 -05:00
d12frosted a1fcb13803
fix spacemacs|add-company-backends usage example 2017-01-05 08:59:27 +02:00
Nikolai Myllymäki 1899666592
Show correct headline for beginners tutorial in SPC h SPC 2017-01-04 20:26:48 +02:00
Aaron Jensen 10c59bb142
ivy: Add C-c C-e to edit counsel-ag search results 2017-01-04 19:26:33 +02:00
syl20bnr 74fdbb6795 Refactor and simplify company backends declaration
Enabling a company backend for a specific mode was a tedious tasks with code
scattered at different locations, one for local variable definitions, one for
company hook function definitions and another where the backends were pushed to
the local variables (which was problematic, since we ended up pushing the same
backends over and over again with `SPC f e R`, pushes have been replaced by
add-to-list calls in the new macro).

All these steps are now put together at one place with the new macro
spacemacs|add-company-backends, check its docstring for more info on its
arguments.

This macro also allows to define arbitrary buffer local variables to tune
company for specific modes (similar to layer variables via a keyword :variables)

The code related to company backends management has been moved to the
auto-completion layer in the funcs.el file. A nice side effect of this move is
that it enforces correct encapsulation of company backends related code. We can
now easily detect if there is some configuration leakage when the
auto-completion layer is not used. But we loose macro expansion at file loading
time (not sue it is a big concern though).

The function spacemacs|enable-auto-complete was never used so it has been
deleted which led to the deletion of the now empty file core-auto-completion.el.

The example in LAYERS.org regarding auto-completion is now out of date and has
been deleted. An example to setup auto-completion is provided in the README.org
file of the auto-completion layer.
2017-01-02 00:39:04 -05:00
Nir Friedman bca0e4b6f6
Use helm ag file with interactive input 2016-12-22 17:47:58 +02:00
d12frosted 3e60792136
ivy delete file with confirmation 2016-12-22 15:53:28 +02:00
ralesi 1c8cb4a58c
Delete alternate actions is too invasive 2016-12-22 15:52:57 +02:00
Kristoffer Haugsbakk 3a61f8e6de Add verbatim markup to paths
By convention, filepaths are marked up with `=`.  Also add this markup to the
string `ViewLogMode`.
2016-11-25 12:23:39 +02:00
Aron Griffis 385c12743a Add ripgrep support
* Add rg to helm completion layer
* Add rg to ivy layer
* Prepend rg to dotspacemacs-search-tools
* Add rg to documentation
2016-11-11 15:22:03 +02:00
Bryan Gilbert 7581662d7e rebind 'SPC f b' to 'counsel-bookmark' when using ivy 2016-11-05 12:27:56 +02:00
Eivind Fonn 977a29316b Fix unbound holy-mode error 2016-10-29 15:11:36 +02:00
Xiao Hanyu 0de0705e88 Typo fix
Just a typo fix for auto-completion layer.
2016-10-27 11:06:19 +08:00
Bryan Gilbert b515253026 move helm specific layout transient state keybindings to helm layer 2016-10-23 19:44:35 +02:00
Bryan Gilbert 389d722996 close layout transient state upon entering layout buffer select when 2016-10-23 19:44:35 +02:00
Diego Berrocal 704e103394 Add open packages.el shortcut in spacemacs-help
I find myself wanting to open the package.el and f3 is just too far away
in my keyboard. And I thought maybe this would be something people might
want. Also maybe we could have special binding for actions? like `C-1`
`C-2`, etc
2016-10-17 14:03:21 +02:00
bmag 0e1491c434 Make ivy restrict buffers to layout
Also create separate non-restricted-buffer-list (`SPC B b`) for helm and
ivy.
2016-10-17 13:45:43 +02:00
Bryan Gilbert 59897e2abd Fixed layout transient state not closing on layer select in ivy layer 2016-10-17 13:14:04 +02:00
syl20bnr 703f78c2b8 Cleanup pass on file spacemacs-base/funcs.el
- Apply `/` and `//` rules (double / is for private functions)
- Add missing `spacemacs/` prefixes
- Move functions used outside of spacemacs-base layer to
  core/core-funcs.el
- Remove unused functions

Commit originally intented to only rename linum-update-window-scale-fix
to spacemacs/linum-update-window-scale-fix :-)
2016-10-09 13:14:41 -04:00
Adam Sokolnicki 51c49531e3
Re-map "pp" to counsel-projectile-switch-project
Move counsel-projectile to "p SPC" as the original package suggests.
2016-09-23 10:47:13 +03:00
Eivind Fonn d5baec4b44 Fix SPC sj binding 2016-09-07 14:50:31 +02:00
syl20bnr 03f9f9f700 core: contain side effects when loading packages for SPC h SPC
Fixes some edge cases like SPC f e R performed after SPC h SPC which
could wrongly install or uninstall packages.

Side effects is contained using the variable
configuration-layer--package-properties-read-onlyp, if non nil then
properties value of a package cannot be overwritten.
2016-09-05 20:54:07 -04:00
MadAnd a7232d53e7 Fix auto complete with key sequence in Hybrid mode
Implement handling of `evil-hybrid-state-map` keymap to make completion
with a key sequence work in Hybird state.
2016-08-30 16:18:13 +02:00
bmag 6d454a2313 auto-completion: manual help tooltip and minor fix
New value `manual` for auto-completion-enable-help-tooltip enables the
user to display help tooltip on-demand. Other values remain the same:
nil for no tooltip at all, t (or any non-nil non-manual value) for
automatic tooltip.

Minor fix: call `company-quickhelp-mode` just once, because it's a
global minor-mode.
2016-08-30 16:10:27 +02:00
Eivind Fonn 886aac6386 Fix C-k not working in company-quickhelp-mode 2016-08-30 16:00:19 +02:00
Eivind Fonn 3357153e36 Fix company-quickhelp in daemon mode 2016-08-30 16:00:07 +02:00
YeJun Su 87bddc0dac Replace "ivy-recentf" with "counsel-recentf"
As the tip says: ‘ivy-recentf’ is an obsolete command (as of 0.8.0); use ‘counsel-recentf’ instead.
2016-08-30 15:04:47 +08:00
d12frosted ca8d717f6d
fix typo in auto-completion layer readme 2016-08-27 13:08:32 +03:00
syl20bnr e4b15b16de Dispatch function spacemacs/jump-in-buffer to layers
Use imenu init and post-init functions to leverage the layer system and
get better isolation of configuration.
2016-08-25 20:42:01 -04:00
MadAnd 309e6eb4bb Fix smartparens after nested snippet expansions
Current implementation, #1644, doesn't handle the nested snippet
expansion properly, so you end up with smarparens disabled. Very
annoying.

I improved the implementation to remember the current state of
smartaperns before a top-level snippet expansion and preserve on any
nested snippet expansions.

Also, some housekeeping of the related code:
* Move hook handlers to the `funcs.el`.
* Add comments about yasnippet hooks subtleties relevant to the issue.

Fixes #1512
2016-08-08 13:42:45 +02:00
Eivind Fonn 989dd3d774 Rename variable w/ spacemacs prefix 2016-08-05 21:26:26 +02:00
bmag cea0819ca4 Move helm-popwin config to helm layer 2016-08-05 21:24:47 +02:00
Jeremy Bi 4b682ce1b3 Reduce yas loading warning 2016-08-05 08:47:36 +08:00
syl20bnr 1c4f685b13 core: refactor layer system
TL;DR Should get 20~25% speed improvement on startup, should get a big
improvement when using ivy or helm SPC h SPC. Users with layers.el files
in their layers must use `configuration-layer/declare-used-layer`
instead of `configuration-layer/declare-layer`

The implementation of the layer system made heavy use of `object-assoc`
and `object-assoc-list` functions which are not efficient. This PR
mainly replaces those object lists with hash maps in order to index the
objects by their name and achieve an O(1) access time.

The old object lists `configuration-layer--layers` and
`configuration-layer--packages` have been each by two variables each:
- `configuration-layer--indexed-layers` which is a hash-map of all the
layer objects and `configuration-layer--used-layers` which is a list of
all _used_ layers symbols,
- symmetrically `configuration-layer--indexed-packages` which is a
hash-map of all the package objects and
`configuration-layer--used-packages` which is a list of all _used_
packages symbols.

The hash map `configuration-layer--layer-paths` is gone, now we create
directly layer objects when discovering the layers and set the :dir
property. Note that previously the layer paths were the parent directory
of the layer, now :dir is the layer path.

The function `configuration-layer//make-layer` is now similar to its
counterpart `configuration-layer//make-package` in the sense that it
takes an optional `obj` to be able to override its properties.

The functions `configuration-layer/declare-layer` and
`configuration-layer/declare-layers` now takes an optional parameter
`usedp` in order to declare used or not used layers. For convenience
new functions have been added: `configuration-layer/declare-used-layer`
and `configuration-layer/declare-used-layers`, users _must_ update all
occurrences of `configuration-layer/declare-layer` by
`configuration-layer/declare-used-layers` in their `layers.el` files.

`helm-spacemacs-help` and `ivy-spacemacs-help` are updated to match the
changes in `core-configuration-layer.el`.

Rename some variables to make them more explicit:
`configuration-layer-no-layer` -> `configuration-layer-exclude-all-layers`
`configuration-layer-distribution` -> `configuration-layer-force-distribution`
2016-07-28 23:26:54 -04:00
Ista Zahn 84580b1d80 User configurable default company-backends 2016-07-26 16:33:42 +09:00
bmag 2f6bf80275 Fix void-function spacemacs//restore-previous-display-config error
Move usage of spacemacs//restore-previous-display-config from helm layer
to spacemacs-completion layer. (It's already defined there)
2016-07-25 12:33:40 +09:00
d12frosted 5c5ca4e7a3
add open config action to layer spacemacs help 2016-07-17 09:57:13 +03:00
d12frosted c64d04f944
fix ivy-spacemacs-help//layer-action-add-layer 2016-07-16 11:37:09 +03:00
d12frosted 28220ef979
fix ivy layer help actions 2016-07-16 11:28:59 +03:00
Muneeb Shaikh 5ae1013854 ivy: remove extra projectile-switch-project binding 2016-07-14 20:37:05 +05:30
Muneeb Shaikh 212944ac2b
ivy: fix open spacemacs doc function
fix #6513
2016-07-08 09:04:24 +03:00
liuxiang 43c760df88 Bind "C-c C-e" to spacemacs/helm-find-files-edit for helm-files buffer. 2016-07-05 00:23:16 -04:00
zilongshanren 94969fd81d fix break API changes for ivy 0.8
fix describe packages

refine

rename car cdr to cadr

fix SPC h l
2016-07-05 00:23:16 -04:00
Eivind Fonn 4aa01559af helm: Set projectile-completion-system 2016-07-05 00:23:16 -04:00
Muneeb Shaikh db162af3d8 Set projectile-completion-system to helm
It is inconsistent when using helm as default completion and command
such as `SPC m r f c` opens up ido in rails project.
2016-07-05 00:23:16 -04:00
Exaos-memes 904f7ea665 Define new variable: spacemacs-start-directory.
With this new variable, user can load spacemacs anywhere, e.g.
"~/.emacs.d/spacemacs/". Only user's cache directory is still hard-coded
as "~/.emacs.d/.cache/". If user want to use spacemacs this way, drop
one line as the below in "~/.emacs.d/init.el":

    (setq spacemacs-start-directory "~/.emacs.d/spacemacs/")
    (load-file (concat spacemacs-start-directory "init.el"))
2016-06-23 00:19:34 -04:00
ralesi 560f86f997
Fix :owner reference in ivy-spacemacs-help 2016-06-22 07:44:15 +03:00
Eivind Fonn 92b48eadea 💣 Drop support for Emacs 24.3
Spacemacs now needs at least 24.4 to launch.
2016-06-20 22:05:56 -04:00
syl20bnr 117dcba0ed Revert "Drop support for Emacs 24.3"
This reverts commit 31bab70397 making
a new commit to put TheBB as the author.
2016-06-20 22:05:12 -04:00
syl20bnr 31bab70397 💣 Drop support for Emacs 24.3
Spacemacs now needs at least 24.4 to launch.
2016-06-20 21:55:36 -04:00
Eivind Fonn 2a6ffc72d9 ivy: Support GNE
Implement a keymap for Spacemacs’ counsel search that supports saving
the results to a buffer (bound on F3 as in helm). Ensure that the new
buffer supports the GNE API.
2016-06-18 19:21:26 -04:00
Eivind Fonn 194af58f3c helm: Support GNE
Advice the save-buffer functions to use the GNE API in that buffer.
2016-06-18 19:21:26 -04:00
syl20bnr 4f5d7670f1 core: fix typo with configuration-layer--inhibit-warnings 2016-06-10 23:41:33 -04:00
syl20bnr cc91842bd8 helm: improve SPC h SPC
As it was the case during the good old days when spacemacs was still a
baby, SPC h SPC now list correctly all the pre/init/post functions and
the associsted layer. It also now list properly the current owner of
a package so it is easy to find the owner of a package by narrowing
with `packagename owner`.

This new old functionality is possible by leveraging the last
improvements to the layer system (see previous commits).

TODO: update the sources for Ivy
2016-06-10 22:48:41 -04:00
syl20bnr 775c1f78db ivy: create missing layers.el file
Was triggering an error if ivy and smex layer were both used at the
same time and smex layer stole ownership of smex package.
Fixes #6281
2016-06-10 20:53:23 -04:00
syl20bnr 81fbb9a292 Format README files with spacefmt 2016-06-10 00:09:42 -04:00
syl20bnr f5799ab1ec ahs: move b, f and / key bindings to helm and ivy
Correctly augment the docstring based on the presence of b,f and /
bindings using dynamic hint.
b,f and / are not available if none of helm or ivy layers are used.
2016-06-09 22:50:24 -04:00
ralesi 2a07a7fd76 Add custom evil-register listing with ivy. 2016-06-09 21:27:30 -04:00
Laszlo Szekeres a89573eb85 Enable make completion with ivy
Invoking "make" or "project compilation" (<kbd>SPC c m</kbd>, <kbd>SPC c
c</kbd>) is currently not supported in ivy mode. The PR re-enables them
by adding helm-make to the ivy packages with ivy completion method.
2016-06-07 23:19:32 -04:00
Markus Koller 58bb7d122f spacemacs-base: Always kill buffers with SPC b d
Fixes #4929
2016-06-05 21:22:50 -04:00
Eivind Fonn ffd9ffc537 helm-help: pass toggle candidates as list
This ensures that the status is evaluated in the buffer where help was
invoked, rather than in the helm buffer.
2016-06-02 22:47:56 -04:00
Muneeb Shaikh 7f22bf1fc8 completion/ivy: fix projectile-switch-project-action 2016-06-02 15:44:34 +05:30
ralesi bb37cb9b9a ivy: spacemacs-help
* Provide dired functionality for package and layer lists.
2016-06-01 21:38:35 -04:00
d12frosted d404490ed1 [ivy] add delete and remove file actions 2016-06-01 21:36:45 -04:00
zilongshanren f06129c0f3 add ivy-hydra packages 2016-06-01 21:32:48 -04:00
syl20bnr 8f45a94095 ivy: perspective -> persp-mode and layout
Fix wrong package name.
Replace `perspective` words by `layout`
2016-05-31 23:39:47 -04:00
ralesi 1ef6f10643 Provide custom actions for ivy and counsel-search 2016-05-31 23:26:21 -04:00
syl20bnr 4dead4cca7 Use use-package hooks for helm and ivy projectile setup
It allows the configuration function for projectile to be agnostic of
other packages.

Also fix wrong `SPC p s` key binding (it is `SPC p p`).
2016-05-31 23:19:54 -04:00
syl20bnr 47988be186 ivy: use :toggle keywork for counsel-projectile 2016-05-31 23:09:55 -04:00
ralesi 0c3ab2f3d1 Use counsel-projectile for projects with ivy. 2016-05-31 23:07:57 -04:00
Eivind Fonn 845c42d252 core: add predicate function for toggles
Also use output in Spacemacs help sources
2016-05-31 22:33:44 -04:00
Eivind Fonn 62fc64f745 core: special toggle API for minor modes 2016-05-31 22:33:44 -04:00
syl20bnr 5e448a60ed Remove loading of funcs.el and config.el for helm and ivy spacemacs help 2016-05-29 22:39:56 -04:00
syl20bnr a2de9a63af Use :toggle keyword instead of when forms 2016-05-29 22:39:21 -04:00
syl20bnr 818867e012 Fix package sources for ivy and helm 2016-05-29 21:12:54 -04:00
sooheon ec3ea5b41e Move custom-set-faces out of company config
Keep it in a recommendation in the README for the layer. Eval'ing the
custom-set-faces directly in the config makes it difficult to revert the
customizations.
2016-05-27 00:32:05 -04:00