commit | author | age
|
5cb5f7
|
1 |
;;; smartparens-ml.el --- Additional configuration for ML languages -*- lexical-binding: t; -*- |
C |
2 |
|
|
3 |
;; Copyright (C) 2016-2017 Ta Quang Trung |
|
4 |
;; Copyright (C) 2017 Matus Goljer |
|
5 |
|
|
6 |
;; Author: Ta Quang Trung <taquangtrungvn@gmail.com> |
|
7 |
;; Matus Goljer <matus.goljer@gmail.com> |
|
8 |
;; Louis Roché <louis@louisroche.net> |
|
9 |
;; Maintainer: Matus Goljer <matus.goljer@gmail.com> |
|
10 |
;; Created: 14 July 2016 |
|
11 |
;; Keywords: smartparens, ML, ocaml, reason |
|
12 |
;; URL: https://github.com/Fuco1/smartparens |
|
13 |
|
|
14 |
;; This file is not part of GNU Emacs. |
|
15 |
|
|
16 |
;;; License: |
|
17 |
|
|
18 |
;; This file is part of Smartparens. |
|
19 |
|
|
20 |
;; Smartparens is free software; you can redistribute it and/or modify |
|
21 |
;; it under the terms of the GNU General Public License as published by |
|
22 |
;; the Free Software Foundation, either version 3 of the License, or |
|
23 |
;; (at your option) any later version. |
|
24 |
|
|
25 |
;; Smartparens is distributed in the hope that it will be useful, |
|
26 |
;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
27 |
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
28 |
;; GNU General Public License for more details. |
|
29 |
|
|
30 |
;; You should have received a copy of the GNU General Public License |
|
31 |
;; along with Smartparens. If not, see <http://www.gnu.org/licenses/>. |
|
32 |
|
|
33 |
;;; Commentary: |
|
34 |
|
|
35 |
;; This file provides some additional configuration for ML languages. |
|
36 |
;; To use it, simply add: |
|
37 |
;; |
|
38 |
;; (require 'smartparens-ml) |
|
39 |
;; |
|
40 |
;; into your configuration. You can use this in conjunction with the |
|
41 |
;; default config or your own configuration. |
|
42 |
;; |
|
43 |
;; If you have good ideas about what should be added please file an |
|
44 |
;; issue on the github tracker. |
|
45 |
;; |
|
46 |
;; For more info, see github readme at |
|
47 |
;; https://github.com/Fuco1/smartparens |
|
48 |
|
|
49 |
;;; Code: |
|
50 |
|
|
51 |
(require 'smartparens) |
|
52 |
|
|
53 |
;;; Local pairs for ML-family languages |
|
54 |
|
|
55 |
(sp-with-modes '(fsharp-mode) |
|
56 |
(sp-local-pair "(*" "*)" )) |
|
57 |
|
|
58 |
(sp-with-modes '(tuareg-mode) |
|
59 |
;; Disable ` because it is used in polymorphic variants |
|
60 |
(sp-local-pair "`" nil :actions nil) |
|
61 |
;; Disable ' because it is used in value names and types |
|
62 |
(sp-local-pair "'" nil :actions nil) |
|
63 |
(sp-local-pair "(*" "*)" )) |
|
64 |
|
|
65 |
(sp-with-modes '(reason-mode) |
|
66 |
;; Disable ` because it is used in polymorphic variants |
|
67 |
(sp-local-pair "`" nil :actions nil) |
|
68 |
;; Disable ' because it is used in value names and types |
|
69 |
(sp-local-pair "'" nil :actions nil) |
|
70 |
(sp-local-pair "/*" "*/" )) |
|
71 |
|
|
72 |
(provide 'smartparens-ml) |
|
73 |
;;; smartparens-ml.el ends here |