|
1 |
| -;;; packages.el --- fsharp Layer packages File for Spacemacs |
| 1 | +;;; packages.el --- F# Layer packages File for Spacemacs |
| 2 | +;; |
| 3 | +;; Copyright (c) 2012-2014 Sylvain Benner |
| 4 | +;; Copyright (c) 2014-2015 Sylvain Benner & Contributors |
| 5 | +;; |
| 6 | +;; Author: Sylvain Benner <sylvain.benner@gmail.com> |
| 7 | +;; URL: https://github.com/syl20bnr/spacemacs |
| 8 | +;; |
| 9 | +;; This file is not part of GNU Emacs. |
| 10 | +;; |
| 11 | +;;; License: GPLv3 |
2 | 12 |
|
3 | 13 | (defvar fsharp-packages '(fsharp-mode))
|
| 14 | + |
4 | 15 | (defun fsharp/init-fsharp-mode ()
|
5 | 16 | (use-package fsharp-mode
|
6 | 17 | :defer t
|
| 18 | + :init |
| 19 | + (setq fsharp-doc-idle-delay .2 |
| 20 | + fsharp-build-command "/usr/local/bin/xbuild") |
7 | 21 | :config
|
8 | 22 | (progn
|
9 |
| - (setq fsharp-doc-idle-delay .2) |
10 |
| - (setq fsharp-build-command "/usr/local/bin/xbuild") |
11 |
| - ;;;;;;;;; Keybindings ;;;;;;;;;; |
| 23 | + |
| 24 | + (defun spacemacs/fsharp-load-buffer-file-focus () |
| 25 | + "Send the current buffer to REPL and switch to the REPL in |
| 26 | + `insert state'." |
| 27 | + (interactive) |
| 28 | + (fsharp-load-buffer-file) |
| 29 | + (switch-to-buffer-other-window inferior-fsharp-buffer-name) |
| 30 | + (evil-insert-state)) |
| 31 | + |
| 32 | + (defun spacemacs/fsharp-eval-phrase-focus () |
| 33 | + "Send the current phrase to REPL and switch to the REPL in |
| 34 | + `insert state'." |
| 35 | + (interactive) |
| 36 | + (fsharp-eval-phrase) |
| 37 | + (switch-to-buffer-other-window inferior-fsharp-buffer-name) |
| 38 | + (evil-insert-state)) |
| 39 | + |
| 40 | + (defun spacemacs/fsharp-eval-region-focus (start end) |
| 41 | + "Send the current phrase to REPL and switch to the REPL in |
| 42 | + `insert state'." |
| 43 | + (interactive "r") |
| 44 | + (fsharp-eval-region start end) |
| 45 | + (switch-to-buffer-other-window inferior-fsharp-buffer-name) |
| 46 | + (evil-insert-state)) |
| 47 | + |
12 | 48 | (evil-leader/set-key-for-mode 'fsharp-mode
|
13 | 49 | ;; Compile
|
14 | 50 | "mcc" 'compile
|
15 |
| - "mer" 'fsharp-eval-region |
16 |
| - "mep" 'fsharp-eval-phrase |
17 |
| - "mef" 'fsharp-load-buffer-file |
18 |
| - "mst" 'fsharp-ac/show-tooltip-at-point |
19 |
| - "mgd" 'fsharp-ac/gotodefn-at-point |
20 |
| - "mss" 'fsharp-show-subshell |
21 |
| - "mee" 'fsharp-run-executable-file |
| 51 | + |
22 | 52 | "mfa" 'fsharp-find-alternate-file
|
23 |
| - "men" 'next-error |
24 |
| - "mep" 'previous-error |
25 |
| - ) |
26 |
| - ))) |
| 53 | + |
| 54 | + "mgg" 'fsharp-ac/gotodefn-at-point |
| 55 | + |
| 56 | + "mht" 'fsharp-ac/show-tooltip-at-point |
| 57 | + |
| 58 | + "msb" 'fsharp-load-buffer-file |
| 59 | + "msB" 'spacemacs/fsharp-load-buffer-file-focus |
| 60 | + "msi" 'fsharp-show-subshell |
| 61 | + "msp" 'fsharp-eval-phrase |
| 62 | + "msP" 'spacemacs/fsharp-eval-phrase-focus |
| 63 | + "msr" 'fsharp-eval-region |
| 64 | + "msR" 'spacemacs/fsharp-eval-region-focus |
| 65 | + "mss" 'fsharp-show-subshell |
| 66 | + |
| 67 | + "mxf" 'fsharp-run-executable-file)))) |
| 68 | + |
| 69 | + |
0 commit comments