2015-10-24 01:59:49 +00:00
|
|
|
;;; packages.el --- Octave Layer packages File for Spacemacs
|
|
|
|
;;
|
2021-03-22 20:11:29 +00:00
|
|
|
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
|
2015-10-24 01:59:49 +00:00
|
|
|
;;
|
|
|
|
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
|
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
|
|
;;
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
;;
|
2021-03-24 03:31:44 +00:00
|
|
|
;; This program is free software; you can redistribute it and/or modify
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
;; (at your option) any later version.
|
|
|
|
;;
|
|
|
|
;; This program is distributed in the hope that it will be useful,
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
;;
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
|
|
|
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2015-10-24 01:59:49 +00:00
|
|
|
|
|
|
|
(setq octave-packages
|
2018-11-20 19:55:37 +00:00
|
|
|
'(
|
|
|
|
ggtags
|
|
|
|
counsel-gtags
|
|
|
|
helm-gtags
|
|
|
|
(octave :location built-in)
|
|
|
|
))
|
2015-10-24 01:59:49 +00:00
|
|
|
|
|
|
|
(defun octave/init-octave ()
|
|
|
|
(use-package octave
|
|
|
|
:mode ("\\.m\\'" . octave-mode)
|
|
|
|
:commands (run-octave)
|
2016-01-26 16:31:15 +00:00
|
|
|
:init (spacemacs/register-repl 'octave 'run-octave "octave")
|
2016-01-03 19:09:50 +00:00
|
|
|
:config (spacemacs/set-leader-keys-for-major-mode 'octave-mode
|
2015-10-24 01:59:49 +00:00
|
|
|
;; helpers
|
2016-01-03 19:09:50 +00:00
|
|
|
"hh" 'octave-help
|
|
|
|
"hi" 'octave-lookfor
|
2015-10-24 01:59:49 +00:00
|
|
|
;; REPL
|
2016-01-26 16:31:15 +00:00
|
|
|
"'" 'run-octave
|
2016-01-03 19:09:50 +00:00
|
|
|
"sb" 'octave-send-buffer
|
|
|
|
"sf" 'octave-send-defun
|
|
|
|
"si" 'run-octave
|
|
|
|
"sl" 'octave-send-line
|
|
|
|
"sr" 'octave-send-region)))
|
2016-04-05 04:08:34 +00:00
|
|
|
|
|
|
|
(defun octave/post-init-ggtags ()
|
2016-08-15 19:24:44 +00:00
|
|
|
(add-hook 'octave-mode-local-vars-hook #'spacemacs/ggtags-mode-enable))
|
2016-04-05 04:08:34 +00:00
|
|
|
|
2017-08-26 21:18:09 +00:00
|
|
|
(defun octave/post-init-counsel-gtags ()
|
|
|
|
(spacemacs/counsel-gtags-define-keys-for-mode 'octave-mode))
|
|
|
|
|
2016-04-05 04:08:34 +00:00
|
|
|
(defun octave/post-init-helm-gtags ()
|
|
|
|
(spacemacs/helm-gtags-define-keys-for-mode 'octave-mode))
|