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.
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.
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.
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.
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.
- 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`
`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.
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.
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.
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