Commit graph

53 commits

Author SHA1 Message Date
Patrik Storm c6d9c18f28 Fixed docs 2015-07-04 18:45:48 -04:00
person808 bc197a288c Add option to show snippets in the company popup. 2015-07-01 01:22:34 -04:00
syl20bnr f4ba6bdab5 Fix various key bindings in converted READMEs 2015-06-11 21:31:42 -04:00
Christoph Paulik ff8cd06046 Fix various issues with org markup
- lists were not correctly indented sometimes
- **note** and such things do not exist in org
- Note and Important
- Change Feature list to heading
- Change TODOS to actual org TODOS
- Add TOC to python layer
- list indentation
- some typos I could not leave unchanged
- TODO formatting
- List indentation
- typos
- wrong markup

fix conversion issues
2015-06-11 21:31:42 -04:00
Diego Berrocal 460ce54006 Org conversion of all READMEs ! 2015-06-11 21:31:42 -04:00
Diego Berrocal 4401b2bd34 Add JIT load for spacemacs snippets at startup
It seems that there is a weird issue with the loading of snippets, the
same goes to snippets in the private directory.
2015-06-08 02:11:34 -04:00
Diego Berrocal 7d53585795 Add Spacemacs Snippets
There are many stuff that we have in spacemacs which are creating new
layers and also creating micro-states. This Snippets try to help with
the process (the micro-state is a work in progress).

I also set the binding `C-s-/` to `(yas-next-field-or-maybe-expand)`
because `tab` doesn't have the behaviour I quite want (to be able to
expand a snippet like (defun) inside the new-package snippet and still
be able to continue in the outer snippet afterwards. With `tab` this
is *not* possible, but with `C-M-/` it *is*.

Changed variable name

Changed keybinding

Renamed snip-dir to spacemacs-snippets-dir

Moved `setq` outsidde of inizialization function, and the keybindning
too
2015-06-08 00:59:44 -04:00
Tu Do 0c92467eba [Fix #1512] Don't enable smartparens when expanding snippets
Otherwise the snippets will be messed up when expanding with
hippie-expand.
2015-06-08 00:58:56 -04:00
Brian Hicks 9852e225d6 yasnippet: default helm-yas-display-key-on-candidate to t 2015-06-02 22:52:59 -04:00
syl20bnr 4489de827b Now :variables values must be quoted like in setq sexps
Fixes #1596
2015-05-31 20:55:46 -04:00
Tu Do 8ef3b52a9f Explicitly enable yas-minor-mode
yas-global-mode is always enabled to ensure snippets are loaded
properly, but to use the snippets, a major mode must have yas-minor-mode
enabled. This commit ensure such condition happen.
2015-05-25 23:08:59 -04:00
Tu Do 0cb6acb7af [Fix #1553] Make sure yasnippet is actually loaded
By checking if the yas-minor-mode is enabled. If so, load yasnippet. We
must do so because some package might load yasnippet and make
yas-minor-mode definition available, thus prevent Spacemacs to load
yasnippet properly. By checking yas-global-mode variable, we can assure
that yas-global-mode is enabled properly.

Also exclude yasnippet from eshell.
2015-05-22 23:16:02 -04:00
syl20bnr 5ee7203ab5 Modifiy auto-yasnippet key bindings and auto switch to insert state on expand 2015-05-16 22:07:28 -04:00
Tu Do 745d3e0845 Add auto-yasnippet
Make it easy to create snippets.
2015-05-16 11:59:13 -04:00
Diego Berrocal 553e85cb15 yas-new-snippet tries to create a Snippet in ~/.emacs.d/snippets
This is because the list of snippet dirs had our
~/.emacs.d/private/snippets at the end so it doesn't guess that.
Something must have changed upstream. Also it's better to have our own
custom snippets to be first so as to override the default ones if we
pleased.
2015-05-16 00:52:22 -04:00
Chris Ewald 7d07909146 remove unneeded yasnippet-snippets submodule
This submodule is already part of yasnippet
update yas-snippet-dirs to use yas-installed-snippets-dir
2015-05-13 22:33:59 -04:00
syl20bnr 68eb5fcc35 auto-completion layer: SPC t a toggle company backend by default
fixes #1289
2015-05-10 10:52:39 -04:00
Tu Do b89ce54df3 Fix company and fci-mode incompatibility
It is reported in this issue: https://github.com/company-mode/company-mode/issues/180
that company has distorted completion popup with fci-mode turned on.
Company maintainer proposed a fix for this issue that is added in this
commit.
2015-05-10 01:35:32 -04:00
Tu Do 128a420a4f [Fix] Disable company-tooltip-flip
Currently by default company knows when to flip the popup. However, when
the above option is set to t, it causes a strange behaviour: when the
tooltip is flipped, press down (i.e. M-n or arrow key) go up and press
up (i.e. M-p or arrow key) go down.
2015-05-06 22:23:53 -04:00
syl20bnr d149c5beae auto-completion layer: rename auto-completion-sort-by-usage
to auto-completion-enable-sort-by-usage
When it is possible we try to use the verb `enable`.
2015-05-06 22:22:01 -04:00
person808 866f59e41f Add support for company-statistics. 2015-05-06 22:18:48 -04:00
syl20bnr 640d8fc19c auto-completion layer: improve implementation of key sequence to complete
default value `auto-completion-complete-with-key-sequence` is now nil
resolves conflict with evil-escape
fixes #1491
2015-05-05 22:32:28 -04:00
syl20bnr c634baceec auto-completion layer: rename auto-completion-enable-company-help-tooltip
to auto-completion-enable-help-tooltip
2015-05-04 00:15:58 -04:00
syl20bnr 441fa05f12 auto-completion layer: new UX variables 2015-05-04 00:14:25 -04:00
syl20bnr 8a6bcacb09 Correctly complete the selection when pressing jk 2015-04-30 00:35:13 -04:00
syl20bnr e9f09d03e6 [WIP] Implement new auto-completion UX using company and yasnippet
- RET is not used anymore
- TAB complete the common prefix and cycle between candidates
- To complete the selection use C-l or `jk` pressed quickly
- Yasnippet expand uses hippie-expand and M-/ or C-p
2015-04-29 23:49:59 -04:00
syl20bnr 914ee405b8 company: add terminal support for S-TAB 2015-04-27 05:56:59 -04:00
syl20bnr d9bc198d1f company: tab now complete common prefix and cycle, RET is back 2015-04-26 23:14:34 -04:00
syl20bnr d8cc7c9a31 company: remove ESC binding to abort company
resolve #1372
2015-04-26 22:54:21 -04:00
syl20bnr f96b23646f company: unbind RET to auto-complete 2015-04-26 22:53:26 -04:00
syl20bnr 3ddd2f4e64 company: use tab to auto-complete and complete common prefix
Now we need to find a way to cycle between the candidates when
the common prefix is completed.
2015-04-26 22:47:08 -04:00
syl20bnr 845126dac0 Move yasnippet and hippie-exp to auto-completion layer 2015-04-22 22:03:04 -04:00
syl20bnr fdd4e944ef Reload dotfile and layer anywhere with SPC f e R
Replace `SPC m c c` and `C-c C-c` in the dotfile

Resolve #1210
2015-04-18 23:40:24 -04:00
syl20bnr cdd1eddd3d Abort company when pressing escape 2015-04-18 00:48:11 -04:00
Miloš Mošić e5a4ebdfb7 Fix formatting for the auto-completion README.md 2015-04-15 22:45:00 -04:00
syl20bnr c9209dc6c1 auto-completion layer: update README 2015-04-11 00:42:03 -04:00
syl20bnr e674c10a0a Disable globally enabled company 2015-04-09 08:09:00 -04:00
syl20bnr cef3ca6653 auto-completion layer: defer 1 instead of 2 for company 2015-04-09 01:54:40 -04:00
syl20bnr 965dc56817 Re-enable company globally with :defer 2 2015-04-09 01:17:49 -04:00
syl20bnr e72afd6086 auto-completion layer: update README 2015-04-09 00:55:37 -04:00
syl20bnr 0c6682cbd1 Refactor one more time the auto-completin macros
It is important to define the buffer local backend variables
in a config.el otherwise it is not available in the layer
configuration if the auto-completion layer is removed.
There were also some issues by hiding the explicit
configuration of company inside a macro, for instance
helm-spacemacs is unable to display the company package
configured in a given layer if the auto-completion layer
is removed.
2015-04-09 00:03:51 -04:00
Tristan Hume f04412893e Change company macro name and use push 2015-04-08 12:39:25 -04:00
Tristan Hume ad86ab8fb1 Add a helper for simple company initialization.
Adds the spacemacs|init-layer-company helper to set up company
completion for a language layer and replaces existing simple company
initializations. More complex initializations should use the new
architecture directly and remain untouched by this commit.
2015-04-07 15:21:13 -04:00
Tristan Hume 3ab9cb0af3 Global company temporary stopgap 2015-04-07 12:15:31 -04:00
syl20bnr 5caa5750e0 Rework the toggles of the mode-line
Now the symbol corresponds to the key binding.
The global version of the toggle when available is performed
with `control` modifier.
2015-04-06 16:02:14 -04:00
syl20bnr 106909d1bc Change auto-completion toggle message 2015-04-05 23:52:34 -04:00
syl20bnr de4a2db6bc Fix enable company and auto-complete macros 2015-04-04 00:57:09 -04:00
syl20bnr 25316d6a00 auto-completion layer: Fix typo in funcs.el 2015-04-03 22:08:51 -04:00
syl20bnr 57fcb93799 Rename *-declarep functions to *-usedp functions
Makes more sense from a user view point.
2015-04-03 19:13:52 -04:00
syl20bnr 9f3f2b9741 Fix automatic global toggle of auto-complete when loaded 2015-04-03 13:30:26 -04:00