Commit graph

334 commits

Author SHA1 Message Date
syl20bnr 9a3a1384ca helm: move functions to funcs.el 2018-05-21 01:18:37 -04:00
syl20bnr 9ff0d967d3 dump: require yasnippet while dumping
Unfortunately preactivating yasnippet while dumping double the loading time.
Not sure why exactly the loading time doubles, it should no be the case.

So for now we only require the library and let the hook for activate it.
2018-05-20 03:58:48 -04:00
syl20bnr 5d830fca43 dump: require some helm packages while dumping 2018-05-20 03:58:48 -04:00
Ting Zhou 8616f07b86 Add: use rjsx-mode for react framework
Fix: add yas-activate-extra-mode
Add: add lsp support for react layer
Add: Add rjsx-mode key-bindings doc
Clean: rename spacemacs//set-lsp-key-bindings to spacemacs//setup-lsp-jump-handler
Fix: remove buggy hooks
Clean: move fix-lsp-company-prefix to lsp layer
Fix: rjsx-mode company
Fix: rjsx-mode lsp backend
2018-05-18 01:25:29 -04:00
syl20bnr e5d8603290 Fix symbols's function definition is void: winum--window-list
fixes #10446
2018-05-18 01:25:29 -04:00
CeleritasCelery 2609538855 fix helm layer broken with smex package 2018-05-18 01:02:58 +03:00
duianto f4a3025174 Format symbol highlight transient state
Reduce the width of the listed key bindings by:
Moving the range and highlighted symbols counter to the right of the transient
state title.
Shorten some key description names.
Reduce three instances of "search" to just one.

And reorder the listed keys based on their search scope, small to large:
swoop, buffers, files, project.
2018-05-16 00:41:37 +03:00
syl20bnr 391bbc1498 fix backends when auto-completion-enable-snippets-in-popup is nil
fixes #10676
2018-05-14 21:32:53 -04:00
syl20bnr 40f41769bd auto-completion: add :call-hooks and rename :hooks to :append-hooks
Add these keywords to macro spacemacs|add-company-backends

:append-hooks controls wether we add the hooks to major mode hook variable
:call-hooks conrols wether we execute the created hooks function right away

Basically for multiple backends setup we want to pass :append-hooks to nil and
:call-hooks to t.
2018-05-12 02:26:37 -04:00
syl20bnr 40f28c7d12 auto-completion: fix duplicate addtion of backends
Reverting a buffer could put multiple entries of the same backend in the buffer
local `company-backends` variable.
This is due to the fact that we mutate `company-backends-xxxx-mode` variable
with:
         (setq ,backends-var-name
               (mapcar 'spacemacs//show-snippets-in-company
                      ,backends-var-name)))

Solution is to add a new variable that won't be mutated when we add the support
for snippets.
2018-05-12 02:03:33 -04:00
syl20bnr 439dafb4dd auto-completion: fix variables not set with multiple modes
When multiple modes where provided to macro spacemacs|add-company-backends along
with variables, only the first mode was taken into account as the `variables`
variable was nil after the first interation on `modes`.
2018-05-12 01:53:54 -04:00
Bet4 b0f77612e3 Call helm-mode when helm is initialized
Fixes #9826
2018-03-03 23:55:01 -05:00
syl20bnr ebe4c60264 Revert "Defer packages by default using use-package-always-defer"
This reverts commit 29c78ce841 and all other fixes
that have been made afterwards.

The motivation is that use-package is seen by many as a replacement for
`require`. Is use-package always defer the loading of packages then is breaks
this use case, this does not respect POLA so even if it was making Spacemacs
loading faster (up to 3s faster on some startup on my machine) we just cannot
use it, it would be irresponsible. Spacemacs should be easy to use, loading
performance will come with time but it is not a priority.
2018-03-03 23:40:10 -05:00
Ayush Goyal d3bb27cbab Fix spacemacs/swiper-all-region-or-symbol function
spacemacs/swiper-all-region-or-symbol function doesn't work. This is probably
due to using old swiper api which has changed.
2018-03-03 15:02:21 +02:00
bmag f294d42ae5 use-package-always-defer: fix regressions in ivy layer
These changes were missed in commit 29c78ce841
2018-02-28 22:18:23 +02:00
Cormac Cannon 9cb48f2403 Added :commands section to export helm-xref-show-xrefs
Fixes a missing symbol error on my system.
2018-02-27 23:32:52 -05:00
syl20bnr e2b1cecb77 Update documentation for :defer t 2018-02-27 23:32:52 -05:00
syl20bnr 29c78ce841 Defer packages by default using use-package-always-defer
Warning now `:defer t` is implied, to force a package to load `:demand t` is
now necessary.
2018-02-27 23:32:52 -05:00
syl20bnr 13961e8ea1 helm: change default rg max-columns value to 512 and add doc 2018-02-24 19:49:39 -05:00
mike-work 658c34b9cc Configure rg max column number for search. 2018-02-24 19:49:39 -05:00
syl20bnr 2a5670e8df lsp: move helm-xref and ivy-xref ownership to helm and ivy layers 2018-02-18 22:48:12 -05:00
Muneeb Shaikh 6c476a3bd1 spacemacs-layouts: fix S/ivy-persp-switch-project
Fix #10177

counsel-projectile has updated custom actions mechanism[1] and
counsel-projectile-switch-project-actions is no more defined

Also,
 - moved counsel-projectile into spacemacs-layouts from ivy layer as
 perspective/layout based project switching depends on it instead of swiper
 - removed swiper from spacemacs-layouts

[1] a4e9a34d7f
2018-01-19 22:57:27 -05:00
Jack Kamm da64ca5a0b fix autoloading for spacemacs/helm-find-files #9826 2018-01-17 23:26:09 -05:00
syl20bnr 091800b25d auto-completion: use add-to-list instead of push
Also remove unneeded addtion of yasnippet-snippets directory as it is done
automatically in the package.

push is to avoid in :init blocks because it will add duplicated entries when
the user reload the configuration with SPC f e R.
2018-01-14 23:28:28 -05:00
syl20bnr c8984d102f auto-completion: sort packages configuration 2018-01-14 23:24:48 -05:00
Jack Kamm 4f0a5e3aee add yasnippet-snippets 2018-01-14 23:21:43 -05:00
syl20bnr 41e546f040 Move all use-package hook declaration to pre-init functions
Had to create dummy init functions at some places since the owner of a package
is the last layer that defines the init function of a package. And a package
can be installed only if it has an owner.
2018-01-10 23:57:18 -05:00
syl20bnr 014ed73109 ivy: change layer variable name for ivy-rich and add doc 2018-01-10 22:19:04 -05:00
Alejandro Catalina 43b35d5f05 Make ivy-rich a variable that controls whether to install it or not. 2018-01-10 22:10:26 -05:00
duianto ed0dfb73d0 Update Auto-completion docs, removed binding C-f
The `C-f` binding was removed by this PR:
Remove mapping <c-f> to select the frist completion. #10039
2018-01-10 22:07:50 -05:00
Chao Shen 031aaa164e Remove mapping <c-f> to select the frist completion. 2018-01-09 23:52:40 -05:00
syl20bnr 0ccc0067c7 helm: minor formating edit 2018-01-09 23:19:57 -05:00
Nir Friedman 4e7147375d Add better helm default multi action for files/buffers 2018-01-09 23:09:21 -05:00
Benjamin Hipple a08fe56671 autocomplete: Make idle-delay configurable
Adds an autocomplete-idle-delay layer variable that gets passed to company-idle-delay
or ac-delay.
2018-01-09 23:04:33 -05:00
Chirantan Ekbote 759a65cb71 Replace counsel--git-dir with (ivy-state-directory ivy-last)
abo-abo/swiper@4f57b5a9 removed the counsel--git-dir variable.  Code
that used that variable is now expected to use (ivy-state-directory
ivy-last) instead.  Update the code to reflect this change.

Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
2018-01-06 22:49:03 -05:00
Nikita Leshenko d0089a23de ivy: spacemacs-help: Fix candidate layers with no packages
When a layer doesn't have a package, its name was added to the candidate list as
a symbol instead of a string, breaking actions such as
layer-action-open-packages which expect a string.
2018-01-06 22:29:15 -05:00
syl20bnr 70925f3fba ivy: sort packages 2018-01-06 21:44:58 -05:00
Alan Ferguson 3467aa8433 ivy: add ivy-rich display transformer for ivy-switch-buffer 2018-01-06 21:40:53 -05:00
syl20bnr 46c5dfa4a7 cl-loop instead of loop 2018-01-06 21:38:13 -05:00
syl20bnr 14b206492b ivy: use post-init to add hook for org-ctrl-c-ctrl-c 2018-01-06 11:51:19 -05:00
syl20bnr 326965d4ce Happy New Year 2018! 2018-01-04 02:00:25 -05:00
smile13241324 a9e57f6c83 Fix documentation for sphinx, confluence, helm and ivy layer 2017-12-16 14:20:41 +02:00
syl20bnr 41e91a9dcf core: move all dotspacemacs-helm-* variables to layer variables
Add support for backward compatibility via a macro instrad of defvaralias as the
latter was not sufficient to support all the use-cases.
2017-10-08 10:29:34 -04:00
Ruslan Kamashev a7e30bfcb4 Fix typo (issue #9655) 2017-09-29 12:47:35 +03:00
syl20bnr 3bce69aba1 Fix warnings about unrecognized keys without helm or ivy layers
In perspective transient state. b and l keys in the docstring have no
corresponding functions declared whenever both helm and ivy layers are not
used.

Add two private variables to fix the issue:
- spacemacs--persp-display-buffers-func
- spacemacs--persp-display-perspectives-func

These variables are set to the correct functions by the helm and ivy layers via
a use-package hook.

Default is `ignore` function so b and l does nothing if both helm and ivy layers
are not used, TODO: we should find a better default function.
2017-09-26 00:10:00 -04:00
syl20bnr dc58801c7d core: refactor shadow mechanism
Shadowing is now control by layer property ':can-shadow' only.
can-shadow is a commutative relation, if layer1 can shadow layer2 then layer2
can shadow layer1.
the shadow operator is a binary operator accepting two layer names, it is not
commutative and the order of the operands is determined by the order of the
layers in the dotfile (like the ownership stealing mechanism).

If ':can-shadow' is set explicity to nil in the dotfile then the layer won't
shadow any layer.
For instance to install both ivy and helm layer:

   (setq dotspacemacs-configuration-layers
   '(
     ivy
     (helm :can-shadow nil)
     )

note that due to the commutative relation the above example can also be
written (in this case, ':can-shadow' should be read ':can-be-shawdowed'):

   (setq dotspacemacs-configuration-layers
   '(
     (ivy :can-shadow nil)
     helm
     )
2017-09-25 23:07:22 -04:00
syl20bnr 95699ee61c core: add layer shadowing system
Layers can now declare in their layers.el file that they shadow one or more
layers using the following functions:

- configuration-layer/shadow-layers
- configuration-layer/shadow-layer

Those function are commutative so:
    (configuration-layer/shadow-layer 'layer1 'layer2)
is the same as
    (configuration-layer/shadow-layer 'layer2 'layer1)
and means that
layer1 shadows layer2
and
layer2 shadows layer1

The typical use-case is helm and ivy layers. Helm shadows the ivy layer and
Ivy shadows the helm layer.

Shadowing is sensitive to the order of declaration of layers in the dotfile,
for instance:

    (setq dotspacemacs-configuration-layers '(
      helm
      ivy
     ))

means that ivy shadows helm so helm layer is effectively ignored,
whereas

    (setq dotspacemacs-configuration-layers '(
      ivy
      helm
     ))

means that helm shadows ivy so ivy layer is effectively ignored.

This mechanism can be turned off using the :can-shadow keyword:

    (setq dotspacemacs-configuration-layers '(
      ivy
      (helm :can-shadow nil)
     ))

means that both ivy and helm layers will be installed (not recommended in this
case)

Note that the `:can-shadow` mechanism will be fully implemented in a next
commit.
2017-09-21 23:56:09 -04:00
bmag 84751cbc53 counsel: rename git dir variable
counsel--git-grep-dir was renamed upstream to counsel--git-dir.
2017-09-10 19:54:33 +03:00
bmag f221d7ed73 helm-bookmarks: don't change keys to early
helm-bookmark-map might not be available yet when helm-mode is enabled, so don't
change bindings until it is available. (fixes a void-variable error)
2017-09-07 13:49:55 +03:00
syl20bnr b804aef694 yasnippet: fix check for dotspacemacs-directory-snippets-dir
An error occurred when dotspacemacs-directory was nil.
2017-08-27 22:44:18 -04:00
Wojciech Wojtyniak 24ed4bce59 Check if dotspacemacs-directory-snippets-dir exists before adding it
dotspacemacs-directory-snippets-dir contains a path to a directory with yas
snippets in ~/.spacemacs.d (or arbitrary picked dotspacemacs direcotry).
However, while it's not always present (user has to create it manually)
it is always checked while yas is loaded which generates errors.

This diffs forces checking whether the assumed path exists before adding
it to the yas-snippet-dirs.
2017-08-27 22:26:51 -04:00
JAremko 06301b2212 Improve exporting/testing 2017-08-18 20:50:21 +03:00
d12frosted c35b5b3dc3
set ivy-use-selectable-prompt to t
Following #8571.
2017-08-01 16:51:19 +03:00
d12frosted 6f5c50127f
remove duplication of key bindings in ivy readme 2017-07-30 14:52:55 +03:00
d12frosted 3c408b45a4
mention C-M-j key binding for using current input in ivy mini buffer
Fixes #8571
2017-07-29 20:33:41 +03:00
bmag 9e2da0037c Ivy: add counsel-mark-ring 2017-07-09 18:19:38 +03:00
James Wang 804bdb817b counsel-find-file: Bind `find-file-other-window' to "j"
By default, "M-o w" binding has already been used by ivy package. So we bind
`find-file-other-window' to "M-o j" here.
2017-07-07 12:32:21 +02:00
Eivind Fonn f4b53d2a4f Rename :depends to :requires 2017-07-03 09:54:53 +02:00
syl20bnr e2e532bb49 core: change <function>p to <function>-p suffixes for consistency
Also defined aliases for backward compatibility with `usedp` functions.
2017-07-02 10:09:39 -04:00
Eivind Fonn ebc6ba015e Implement directory search for ivy as well 2017-07-01 12:41:26 +02:00
Tim Jäger 0b2dfd0297 Implement helm-dir-search
This is equivalent to helm-file-search with the current directory as the scope
2017-07-01 12:41:03 +02:00
Eivind Fonn 08561d8631 core: implement :depends for package declarations
This replaces the older pattern
:toggle (configuration-layer/package-usedp ..)

This implementation ensures that :disabled-for honors dependent packages, i.e.
if package a depends on package b, which is owned by layer c, and layer c is
disabled for layer d, then neither package a nor b will be configured for layer
d. Previously, this was only true for package a, but not b.

This commit also fixes:

- configuration-layer/describe-package now shows which post-init and pre-init
  functions are disabled, if any
- Does not recreate all layer objects unconditionally when calling
  configuration-layer/discover-layers. Previously, this led to all layers being
  recreated after e.g. `SPC h SPC`, without any of the dotfile information.
  Since this information is now necessary for
  configuration-layer/describe-package, it’s important that we don’t clear the
  indexed layers when invoking this function.
2017-06-22 11:53:05 +02:00
Paulo Schneider 92b0f47c20 Fix docstring for searching in files with Helm
Although the functions search in files, the description references opened
buffers.

Addresses issue #9025.
2017-06-12 12:22:56 +02:00
David Florness 81dd44ef72 Fix typo 2017-06-04 21:39:56 -05:00
Aaron Jensen ed64e5fa29 Prefer .spacemacs.d/snippets over .emacs.d/private/snippets 2017-05-24 12:41:44 +02:00
Kristoffer Haugsbakk 79ed1a6b4b Use proper markup for code in readmes
By convention, code markup (`~`) is reserved for keybindings in Org-based
documentation in Spacemacs.  Verbatim markup (`=`) is reserved for code and
other code-like things.  So change several readmes to reflect this convention.

Use verbatim markup for things like (non-exhaustive list):

- Emacs Lisp functions, modes, buffers, etc.
- Environment variables
- Directory paths
- Code in general
2017-05-24 11:57:17 +02:00
MadAnd 8fea6f134d ivy: Use new API to register additional transient state bindings
This is a follow-up commit after #8155 has been merged. It applies the same
changes to code of the `ivy` layer. It is not part of #8155 because there was
no `ivy` layer when that PR was submitted.
2017-05-24 09:12:48 +02:00
Eivind Fonn 909d23f412 Use symbols instead of strings 2017-05-23 16:04:40 +02:00
MadAnd 5eeaed75d9 transient-state: Improve handling of additional bindings
Add two new functions: `spacemacs/transient-state-register-add-bindings`
and `spacemacs/transient-state-register-remove-bindings` to prevent layer
authors and end users from dealing with the underlying variables' subtleties.
2017-05-23 16:03:03 +02:00
JAremko 6c5a0b2b14 update docs to the new toc-org format 2017-05-22 18:35:37 +03:00
Aaron Jensen c4ce10ad82 helm/ivy: Limit rg results to 150 columns
Emacs doesn't handle long line lengths very well. If you accidentally rg a file
a file that has very long line lengths it can freeze emacs. This prevents rg
from returning any results with more than 150 characters. Instead, it will
indicate that there were results in that file but they were elided.
2017-05-07 22:07:42 -04:00
JAremko c1e4556882 Format and cleanup docs. Fix links. 2017-04-28 23:29:14 -04:00
Muneeb Shaikh f93730b19c ivy: counsel-faces -> counsel-describe-face
Mistakenly added `counsel-faces` while the intended command that should go under
`SPC h d F` is `counsel-describe-face`.
2017-04-28 22:24:21 -04:00
Adrian Staniec 29605f57eb add perm. highlight and swoop/swiper to Symbol Highlight Transient State 2017-04-23 19:42:32 -04:00
Kristoffer Haugsbakk a9a8f1e905 docs: correct keybinding for helm-resume
The keybinding has changed from `SPC h l` to `SPC r l`; see the changelog, entry
0.200.0 (2016/10/02). So correct the documentation to reflect that.

`SPC h l` is currently bound to `helm-spacemacs-help-layers` (on branch
`develop`).
2017-04-20 23:13:37 -04:00
Kristoffer Haugsbakk 31a11abd54 Use RET instead of return for return key
It is an Emacs-wide convention to use `RET` when referring to the act of
pressing the return key.  Spacemacs seems to follow that convention as well.  So
fix some Org files that were deviating from this convention.

In particular, replace usages of `<return>` and `return` with `RET`.

Also update the description of an `M-RET` keybinding[1] based on the docstring
of `ido-select-text`.

[1]: Suggested-by: bmag <bmag@users.noreply.github.com>
2017-04-20 23:09:46 -04:00
Muneeb Shaikh 52ffc018b1 ivy: Add counsel-faces 2017-04-20 22:43:26 -04:00
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