2016-12-02 18:42:11 +00:00
|
|
|
;;; packages.el --- Lua Layer packages File for Spacemacs
|
|
|
|
;;
|
2017-01-06 03:51:13 +00:00
|
|
|
;; Copyright (c) 2012-2017 Sylvain Benner & Contributors
|
2016-12-02 18:42:11 +00:00
|
|
|
;;
|
|
|
|
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
|
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
|
|
;;
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
;;
|
|
|
|
;;; License: GPLv3
|
|
|
|
|
2015-04-19 03:40:24 +00:00
|
|
|
(setq lua-packages
|
2016-12-02 18:42:11 +00:00
|
|
|
'(
|
|
|
|
company
|
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-21 10:27:59 +00:00
|
|
|
(company-lua :depends company)
|
2016-12-02 18:42:11 +00:00
|
|
|
flycheck
|
|
|
|
ggtags
|
|
|
|
helm-gtags
|
|
|
|
lua-mode
|
|
|
|
))
|
2015-01-14 03:31:40 +00:00
|
|
|
|
2015-04-04 05:02:37 +00:00
|
|
|
(defun lua/post-init-flycheck ()
|
2017-02-14 03:27:29 +00:00
|
|
|
(spacemacs/enable-flycheck 'lua-mode))
|
2015-04-04 05:02:37 +00:00
|
|
|
|
2015-01-14 03:31:40 +00:00
|
|
|
(defun lua/init-lua-mode ()
|
|
|
|
(use-package lua-mode
|
|
|
|
:defer t
|
|
|
|
:mode ("\\.lua\\'" . lua-mode)
|
|
|
|
:interpreter ("lua" . lua-mode)
|
2016-05-05 12:15:25 +00:00
|
|
|
:init
|
2015-01-14 03:31:40 +00:00
|
|
|
(progn
|
|
|
|
(setq lua-indent-level 2
|
|
|
|
lua-indent-string-contents t)
|
2016-05-05 12:15:25 +00:00
|
|
|
(spacemacs/set-leader-keys-for-major-mode 'lua-mode
|
|
|
|
"d" 'lua-search-documentation
|
|
|
|
"sb" 'lua-send-buffer
|
|
|
|
"sf" 'lua-send-defun
|
|
|
|
"sl" 'lua-send-current-line
|
|
|
|
"sr" 'lua-send-region))))
|
2015-05-28 18:06:50 +00:00
|
|
|
|
|
|
|
(defun lua/post-init-company ()
|
|
|
|
(add-hook 'lua-mode-hook 'company-mode))
|
2016-04-05 04:08:34 +00:00
|
|
|
|
2016-12-07 10:35:18 +00:00
|
|
|
(defun lua/init-company-lua ()
|
|
|
|
(use-package company-lua
|
|
|
|
:defer t
|
2017-05-15 01:26:41 +00:00
|
|
|
:init (spacemacs|add-company-backends
|
|
|
|
:backends company-lua
|
|
|
|
:modes lua-mode)))
|
2016-12-07 10:35:18 +00:00
|
|
|
|
2016-04-05 04:08:34 +00:00
|
|
|
(defun lua/post-init-ggtags ()
|
2016-08-15 19:24:44 +00:00
|
|
|
(add-hook 'lua-mode-local-vars-hook #'spacemacs/ggtags-mode-enable))
|
2016-04-05 04:08:34 +00:00
|
|
|
|
|
|
|
(defun lua/post-init-helm-gtags ()
|
|
|
|
(spacemacs/helm-gtags-define-keys-for-mode 'lua-mode))
|