Commit graph

39 commits

Author SHA1 Message Date
Jean-Christophe Petkovich
4a9083a109 Fix package loading in lang/ess
Originally `load-ess-on-demand` used `use-package` for the purposes of
actually loading `ess-site` and related elisp for dealing with R. But
since `use-package` doesn't return true or false when a package is
actually successfully loaded anymore, and the semantics of how it will
work aren't precisely clear, it makes sense to use `require` here
instead.

    (defun load-ess-on-demand ()
      (interactive)
      (-all? '---truthy? (list
                          (require 'ess-site)
                          (require 'ess-R-object-popup)
                          (require 'ess-R-data-view))))

All the normal hooks setup by `use-package` will work as normal. I
actually don't see a reason we should use `use-package` instead of
`require` in this specific instance. Since `use-package` often defers
loading packages, it's arguably clearer to use `require` in this
particular instance.
2015-05-06 22:27:38 -04:00
syl20bnr
5091f79d4d Remove company-yasnippet backends 2015-04-29 23:54:30 -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
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
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
5d8be137e7 Define missing init functions 2015-04-03 17:35:33 -04:00
syl20bnr
318bd23dc4 Add pre and post init functions support to configuration-layers
Now in addition to the <layer>/init-<pkg> function there are
- <layer>/pre-init-<pkg> (executed before <layer>/init-<pkg>)
- <layer>/post-init-<pkg> (executed after <layer>/init-<pkg>)

The init function is mandatory, if it is not present then the
package is ignored and not installed.

This mechanism allows soft (implicit) cross layers dependencies
between packages (see company for more info).

It is now possible to remove flycheck from spacemacs layer and
move it to its own syntax-checking layer.
2015-04-03 17:12:56 -04:00
syl20bnr
769d54da02 New layer auto-completion
Move company and auto-complete to a common layer.
They are not enabled globally anymore, each mode using them
must explicitly declare a hook.
Only one frontend is supported for a given mode, we have to
choose the best between the two.
Only one key binding to toggle auto-completion on `SPC t a` no
matter if it is company or auto-complete. The lighter in the
mode-line is Ⓐ for both frontends.
2015-04-03 00:28:13 -04:00
syl20bnr
46248b1e73 New local company backends 2015-03-31 22:24:01 -04:00
syl20bnr
0fa0409523 Restore reset of local company-backends and add with-yas param 2015-03-30 00:48:41 -04:00
Tristan Hume
cb43a91a15 Add company backend add macro and use it everywhere 2015-03-30 00:01:33 -04:00
Diego Berrocal
78f8c6aae0 Change condition for company-mode detection
changed configuration-layer/package-declaredp for
configuration-layer/layer-declaredp in company-mode
2015-03-29 23:49:37 -04:00
syl20bnr
5c936a5088 Remove unneeded empty init functions since the fix of non activated packages 2015-03-22 03:13:09 -04:00
syl20bnr
b1adef0626 Heavy refactoring of company-mode layer
- Enable lazy-loading of company.
- The company layer is now agnostic of any packages which use company
- company-backends is now buffer local and contains only the backends
which are relevant for the current modes
- New macro `spacemacs|reset-local-company-backends`
2015-03-22 02:23:12 -04:00
Jean-Christophe Petkovich
f5fa170147 Fix loading packages for new version of ess
`ess-R-object-popup` and `ess-R-data-view` no longer exist in the newest
version of the `ess` package. All we need to load now is `ess-site`.

Revert changes to ess lazy loading

Include two empty init functions for packages causing errors instead.
2015-03-20 23:28:43 -04:00
syl20bnr
4725769143 Move ess-smart-equals to ess-packages
This way it is always discoverable in helm-spacemacs
the :if keyword of use-package allow to enable it on demande with
ess-enable-smart-equals
2015-03-02 18:37:34 -05:00
Michel Kuhlmann
82422e8ee5 ess: make smart equals and underscore optional 2015-03-02 18:36:37 -05:00
syl20bnr
96723eb7eb Update wrong code snippets in READMEs 2015-02-17 22:36:12 -05:00
syl20bnr
f68e81e64a Update mi for msi in ESS layer
According to conventions
2015-02-17 22:08:58 -05:00
syl20bnr
b8d8a0fe2d Use configuration-layer/layer-decaredp in packages.el of ess layer 2015-02-10 23:23:33 -05:00
Jean-Christophe Petkovich
b1994f2ba6 Add company-ess to ess mode.
For bug #287
2015-02-10 23:16:14 -05:00
Jean-Christophe Petkovich
ca99343ec3 It's a horrible hack, but ess autoload works.
Up to you whether you want to include it.

Only call mode function again if ess is successfully loaded

This is to avoid an infinite loop.

Whoops, removed a line that shouldn't be there.
2015-02-07 23:19:08 -05:00
sooheon
d5b3785733 Replace ess-smart-underscore with ess-smart-equals
Add rainbow-delimiters hook, add R-mode to auto-mode-alist, add
convenience keybinding, and add edit default offsets.

Separate rainbow-delimiters and smart-equals hooks into own defuns.
2015-02-05 23:06:42 -05:00
syl20bnr
9e8ecf91af Update ESS layer key bindings to follow the conventions 2015-01-30 22:18:30 -05:00
Jean-Christophe Petkovich
eb964ed311 Add ESS noweb (knitr/sweave) keybindings
There are a number of functions included in ESS for dealing with knitr
and sweave "chunks" that are quite handy.

These are the bindings I use, which I humbly recommend for inclusion as
defaults.

The only potential problem that I see with their inclusion is that they
only really make sense in ess-noweb-mode (a minor mode) buffers, but
since evil-leader doesn't seem to like layering keybindings through
minor-modes, adding them to ess-mode is the best solution that I can
come up with for now.

Fix ess chunk bindings as per suggestions
2015-01-30 22:11:12 -05:00
syl20bnr
ceefe88b75 Update CONTRIBUTE.md and add file headers
Also add default file header to layer templates.
2015-01-13 23:12:56 -05:00
syl20bnr
fd0e9abbe7 Move layer images into img directories 2014-12-24 01:03:49 -05:00
syl20bnr
0051aa73c4 Update conventions for help/doc key bindings
`m d` goes under help commands so it is now `m h d`
2014-12-21 22:52:57 -05:00
syl20bnr
e02bb5b271 Refactor ESS layer README 2014-12-11 20:01:18 -05:00
syl20bnr
4add1b7a62 Remove absolute links in READMEs 2014-12-11 19:55:44 -05:00
syl20bnr
b7fa47adba Add R logo to readme and fix ruby 2014-12-10 00:00:39 -05:00
syl20bnr
68fbb286de Fix defvar instead of setq in readme 2014-12-09 23:50:48 -05:00
syl20bnr
225fd98b50 Remove s in send to REPL commands for ESS
according to the new convention
2014-12-09 23:42:36 -05:00
syl20bnr
724f05c31b Update ESS key bindings according to conventions 2014-12-08 20:53:46 -05:00
syl20bnr
c823414e33 Add package exclusion empty variable to some contrib layers 2014-11-11 23:02:50 -05:00
syl20bnr
9b7f8a8fbf Fix ess contrib layer: bad init function prefix 2014-11-11 00:08:23 -05:00
syl20bnr
c811795332 Move ESS packages into a lang contrib 2014-11-10 22:27:06 -05:00