diff options
Diffstat (limited to '')
| -rw-r--r-- | settings/sane-defaults.el | 2 | ||||
| -rw-r--r-- | settings/setup-auto-insert-mode.el | 2 | ||||
| -rw-r--r-- | settings/setup-lisp-mode.el | 35 | ||||
| -rw-r--r-- | settings/setup-slime-mode.el | 32 | ||||
| -rw-r--r-- | settings/setup-web-mode.el | 2 | ||||
| -rw-r--r-- | settings/setup-yasnippet.el | 2 |
6 files changed, 72 insertions, 3 deletions
diff --git a/settings/sane-defaults.el b/settings/sane-defaults.el index ef7e213..a793498 100644 --- a/settings/sane-defaults.el +++ b/settings/sane-defaults.el @@ -7,7 +7,7 @@ ;; Auto refresh buffers (global-auto-revert-mode 1) -;; setup eval elsip +;; setup eval elisp (define-key global-map (kbd "C-x C-e") 'eval-last-sexp) ;; define browsers diff --git a/settings/setup-auto-insert-mode.el b/settings/setup-auto-insert-mode.el index 81284db..639a4f0 100644 --- a/settings/setup-auto-insert-mode.el +++ b/settings/setup-auto-insert-mode.el @@ -5,7 +5,7 @@ (yas-expand-snippet (buffer-string) (point-min) (point-max))) (custom-set-variables - '(auto-insert-directory (locate-user-emacs-file "auto-insert"))) + '(auto-insert-directory (locate-user-emacs-file "templates/auto-insert"))) ;; Activate globally (auto-insert-mode) diff --git a/settings/setup-lisp-mode.el b/settings/setup-lisp-mode.el new file mode 100644 index 0000000..c014d17 --- /dev/null +++ b/settings/setup-lisp-mode.el @@ -0,0 +1,35 @@ +;;; setup-lisp-mode.el --- lisp mode settings -*- lexical-binding: t; -*- + +;; Copyright (C) 2018 Benj Bellon + +;; Author: Benj Bellon <benj@benj-ad1> +;; Keywords: lisp + +;; 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 <https://www.gnu.org/licenses/>. + +;;; Commentary: + +;; Basic settings forlisp mode + +;;; Code: + +(add-hook 'lisp-mode-hook 'enable-paredit-mode) + +(slime-mode) + +;; setup eval inferior lisp in slime +;; (define-key global-map (kbd "C-c C-e") 'slime-eval-last-expression) + +(provide 'setup-lisp-mode) +;;; setup-lisp-mode.el ends here diff --git a/settings/setup-slime-mode.el b/settings/setup-slime-mode.el new file mode 100644 index 0000000..cbba516 --- /dev/null +++ b/settings/setup-slime-mode.el @@ -0,0 +1,32 @@ +;;; setup-slime-mode.el --- slime mode settings -*- lexical-binding: t; -*- + +;; Copyright (C) 2018 Benj Bellon + +;; Author: Benj Bellon <benj@benj-ad1> +;; Keywords: lisp + +;; 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 <https://www.gnu.org/licenses/>. + +;;; Commentary: + +;; Basic settings for slime + +;;; Code: + +(require 'slime) + +(setq inferior-lisp-program "/usr/bin/sbcl") + +(provide 'setup-slime-mode) +;;; setup-slime-mode.el ends here diff --git a/settings/setup-web-mode.el b/settings/setup-web-mode.el index 92cfec2..8aedb56 100644 --- a/settings/setup-web-mode.el +++ b/settings/setup-web-mode.el @@ -4,6 +4,7 @@ (add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.tpl\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.js\\'" . web-mode)) +(add-to-list 'auto-mode-alist '("\\.json\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.[agj]sp\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.as[cp]x\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode)) @@ -25,6 +26,7 @@ (defun indent-offset () "Hooks for web mode." (setq web-mode-markup-indent-offset 2) + (setq web-mode-code-indent-offset 2) (setq web-mode-css-indent-offset 2) (setq web-mode-style-padding 2) (setq web-mode-script-padding 2)) diff --git a/settings/setup-yasnippet.el b/settings/setup-yasnippet.el index 5441327..ddaf46e 100644 --- a/settings/setup-yasnippet.el +++ b/settings/setup-yasnippet.el @@ -1,6 +1,6 @@ (require 'yasnippet) -(setq yas-snippet-dirs '("~/.emacs.d/snippets")) +(setq yas-snippet-dirs `(,(locate-user-emacs-file "templates/snippets"))) (yas-global-mode 1) ;; Jump to end of snippet definition |
