external-reality | 8f34d23 | 2014-02-22 21:35:47 -0500 | [diff] [blame] | 1 | ;;; shm-customizations.el --- Structured Haskell Mode |
| 2 | |
| 3 | ;; Copyright (c) 2014 Chris Done. All rights reserved. |
| 4 | |
| 5 | ;; This file is free software; you can redistribute it and/or modify |
| 6 | ;; it under the terms of the GNU General Public License as published by |
| 7 | ;; the Free Software Foundation; either version 3, or (at your option) |
| 8 | ;; any later version. |
| 9 | |
| 10 | ;; This file is distributed in the hope that it will be useful, |
| 11 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | ;; GNU General Public License for more details. |
| 14 | |
| 15 | ;; You should have received a copy of the GNU General Public License |
| 16 | ;; along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 | |
| 18 | ;;; Code: |
| 19 | |
| 20 | |
| 21 | ;; Group |
| 22 | |
| 23 | (defgroup shm nil |
| 24 | "Structured editing mode for Haskell" |
| 25 | :group 'haskell) |
| 26 | |
| 27 | |
| 28 | ;; Faces |
| 29 | |
| 30 | (defface shm-quarantine-face |
| 31 | '((((class color)) :background "#443333")) |
| 32 | "Face for quarantines." |
| 33 | :group 'shm) |
| 34 | |
| 35 | (defface shm-current-face |
| 36 | '((((class color)) :background "#373737")) |
| 37 | "Face for the current node." |
| 38 | :group 'shm) |
| 39 | |
| 40 | |
| 41 | ;; Customizations |
| 42 | |
| 43 | (defcustom shm-auto-insert-skeletons |
| 44 | t |
| 45 | "Auto-insert skeletons for case, if, etc." |
| 46 | :group 'shm |
| 47 | :type 'boolean) |
| 48 | |
| 49 | (defcustom shm-auto-insert-bangs |
| 50 | t |
| 51 | "Auto-insert bangs when inserting :: in record fields." |
| 52 | :group 'shm |
| 53 | :type 'boolean) |
| 54 | |
| 55 | (defcustom shm-skip-applications |
| 56 | t |
| 57 | "Skip successive applications to the top parent. |
| 58 | |
| 59 | So if you have |
| 60 | |
| 61 | foo| bar mu |
| 62 | |
| 63 | And go up a parent, it will go to |
| 64 | |
| 65 | foo bar mu| |
| 66 | |
| 67 | instead of |
| 68 | |
| 69 | foo bar| mu |
| 70 | |
| 71 | I tend to want the former behaviour more often than the latter, |
| 72 | but others may differ." |
| 73 | :group 'shm |
| 74 | :type 'boolean) |
| 75 | |
| 76 | (defcustom shm-program-name |
| 77 | "structured-haskell-mode" |
| 78 | "The path to call for parsing Haskell syntax." |
| 79 | :group 'shm |
| 80 | :type 'string) |
| 81 | |
| 82 | (defcustom shm-packages-config-directory nil |
| 83 | "The package configuration to use" |
| 84 | :group 'shm |
| 85 | :type 'string) |
| 86 | |
| 87 | (defcustom shm-indent-spaces |
| 88 | (if (boundp 'haskell-indent-spaces) |
| 89 | haskell-indent-spaces |
| 90 | 2) |
| 91 | "The number of spaces to indent by default." |
| 92 | :group 'shm |
| 93 | :type 'string) |
| 94 | |
| 95 | (defcustom shm-lambda-indent-style |
| 96 | nil |
| 97 | "Specify a particular style for indenting lambdas?" |
| 98 | :group 'shm |
| 99 | :type '(choice (const leftmost-parent) (const nil))) |
| 100 | |
| 101 | (defcustom shm-use-presentation-mode |
| 102 | nil |
| 103 | "Use haskell-presentation-mode?" |
| 104 | :group 'shm |
| 105 | :type 'boolean) |
| 106 | |
| 107 | (defcustom shm-display-quarantine |
| 108 | t |
| 109 | "Display quarantine?" |
| 110 | :group 'shm |
| 111 | :type 'boolean) |
| 112 | |
| 113 | (defcustom shm-use-hdevtools |
| 114 | nil |
| 115 | "Use hdevtools for type information?" |
| 116 | :group 'shm |
| 117 | :type 'boolean) |
| 118 | |
| 119 | (defcustom shm-type-info-fallback-to-ghci |
| 120 | t |
| 121 | "Fallback to GHCi when the type-info backend returns nothing?" |
| 122 | :group 'shm |
| 123 | :type 'boolean) |
| 124 | |
| 125 | (defcustom shm-idle-timeout |
| 126 | 0.2 |
| 127 | "Number of seconds before re-parsing." |
| 128 | :group 'shm |
| 129 | :type 'string) |
| 130 | |
| 131 | |
| 132 | ;; Provide |
| 133 | |
| 134 | (provide 'shm-customizations) |
| 135 | |
| 136 | ;;; shm.el ends here |
| 137 | ;; End: |