forked from idris-hackers/idris-mode
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathidris-settings.el
124 lines (95 loc) · 3.67 KB
/
idris-settings.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
;;; idris-settings.el --- Contains settings for idris-mode
;; Copyright (C) 2013 Hannes Mehnert and David Raymond Christiansen
;; Author: Hannes Mehnert <[email protected]>
;; License:
;; Inspiration is taken from SLIME/DIME (http://common-lisp.net/project/slime/) (https://github.com/dylan-lang/dylan-mode)
;; Therefore license is GPL
;; This file 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, or (at your option)
;; any later version.
;; This file 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 GNU Emacs; see the file COPYING. If not, write to
;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
(require 'idris-core)
;;;; Main settings
(defgroup idris nil "Idris mode" :prefix 'idris :group 'languages)
(defcustom idris-interpreter-path "idris"
"The path to the Idris interpreter"
:type 'file
:group 'idris)
(defcustom idris-interpreter-flags '()
"The command line arguments passed to the Idris interpreter"
:type '(repeat string)
:group 'idris)
(defcustom idris-warnings-printing (list 'warnings-tree)
"How to print warnings: tree view ('warnings-tree) in REPL ('warnings-repl)"
:group 'idris
:type '(repeat symbol)
:options '(warnings-tree warnings-repl))
(defface idris-semantic-type-face
'((t (:foreground "blue")))
"The face to be used to highlight types"
:group 'idris-faces)
(defface idris-semantic-data-face
'((t (:foreground "red")))
"The face to be used to highlight data and constructors"
:group 'idris-faces)
(defface idris-semantic-function-face
'((t (:foreground "green")))
"The face to be used to highlight defined functions"
:group 'idris-faces)
(defface idris-semantic-bound-face
'((t (:foreground "purple")))
"The face to be used to highlight bound variables"
:group 'idris-faces)
(defface idris-semantic-implicit-face
'((t (:slant italic)))
"The face to be used to highlight implicit arguments"
:group 'idris-faces)
(defcustom idris-mode-hook '(turn-on-idris-indentation)
"Hook to run upon entering Idris mode."
:type 'hook
:options '(turn-on-idris-indentation)
:group 'idris)
(defcustom idris-use-yasnippet-expansions t
"Use yasnippet if available for completing interactive Idris commands"
:type 'boolean
:group 'idris)
;;;; REPL settings
(defgroup idris-repl nil "Idris REPL" :prefix 'idris :group 'idris)
(defface idris-repl-prompt-face
'((t (:inherit font-lock-keyword-face)))
"Face for the prompt in the Idris REPL."
:group 'idris-repl)
(defface idris-repl-output-face
'((t (:inherit font-lock-string-face)))
"Face for Idris output in the Idris REPL."
:group 'idris-repl)
(defface idris-repl-input-face
'((t (:bold t)))
"Face for previous input in the Idris REPL."
:group 'idris-repl)
(defface idris-repl-result-face
'((t ()))
"Face for the result of an evaluation in the Idris REPL."
:group 'idris-repl)
(defcustom idris-repl-history-file "~/.idris/idris-history.eld"
"File to save the persistent REPL history to."
:type 'string
:group 'idris-repl)
(defcustom idris-repl-history-size 200
"*Maximum number of lines for persistent REPL history."
:type 'integer
:group 'idris-repl)
(defcustom idris-repl-history-file-coding-system
'utf-8-unix
"*The coding system for the history file."
:type 'symbol
:group 'idris-repl)
(provide 'idris-settings)