-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
519e46b
commit 02c5c82
Showing
4 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# F# contribution layer for Spacemacs | ||
|
||
![logo_fsharp](img/fsharp.png) | ||
|
||
## Description | ||
|
||
This layer adds support for F# language using [fsharpbindng](https://github.com/fsharp/fsharpbinding). | ||
|
||
## Packages Included | ||
|
||
- [fsharp-mode](https://github.com/fsharp/fsharpbinding) | ||
|
||
## Install | ||
|
||
To use this contribution add it to your `~/.spacemacs` | ||
|
||
```elisp | ||
(setq-default dotspacemacs-configuration-layers '(fsharp)) | ||
``` | ||
|
||
## Key Bindings | ||
|
||
### Compilation | ||
|
||
Key Binding | Description | ||
----------------------|------------------------------------------------------------ | ||
<kbd>mcc</kbd> | Build the project | ||
|
||
### Navigation | ||
|
||
Key Binding | Description | ||
----------------------|------------------------------------------------------------ | ||
<kbd>mcd</kbd> | Go to definition at point | ||
<kbd>men</kbd> | Next error | ||
<kbd>mep</kbd> | Previous error | ||
|
||
### REPL | ||
|
||
Key Binding | Description | ||
----------------------|------------------------------------------------------------ | ||
<kbd>mer</kbd> | Evaluate region | ||
<kbd>mep</kbd> | Evaluate phrase | ||
<kbd>mef</kbd> | Evaluate buffer | ||
<kbd>mss</kbd> | Start REPL | ||
|
||
### Helpers (documentation, info) | ||
|
||
Key Binding | Description | ||
----------------------|------------------------------------------------------------ | ||
<kbd>mst</kbd> | Show tooltip at point |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
(defvar fsharp-pre-extensions | ||
'( | ||
;; pre extension fsharps go here | ||
) | ||
"List of all extensions to load before the packages.") | ||
|
||
(defvar fsharp-post-extensions | ||
'( | ||
;; post extension fsharps go here | ||
) | ||
"List of all extensions to load after the packages.") | ||
|
||
;; For each extension, define a function fsharp/init-<extension-fsharp> | ||
;; | ||
;; (defun fsharp/init-my-extension () | ||
;; "Initialize my extension" | ||
;; ) | ||
;; | ||
;; Often the body of an initialize function uses `use-package' | ||
;; For more info on `use-package', see readme: | ||
;; https://github.com/jwiegley/use-package |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
;;; packages.el --- fsharp Layer packages File for Spacemacs | ||
|
||
(defvar fsharp-packages '(fsharp-mode)) | ||
(defun fsharp/init-fsharp-mode () | ||
(use-package fsharp-mode | ||
:defer t | ||
:config | ||
(progn | ||
(setq fsharp-doc-idle-delay .2) | ||
(setq fsharp-build-command "/usr/local/bin/xbuild") | ||
;;;;;;;;; Keybindings ;;;;;;;;;; | ||
(evil-leader/set-key-for-mode 'fsharp-mode | ||
;; Compile | ||
"mcc" 'compile | ||
"mer" 'fsharp-eval-region | ||
"mep" 'fsharp-eval-phrase | ||
"mef" 'fsharp-load-buffer-file | ||
"mst" 'fsharp-ac/show-tooltip-at-point | ||
"mgd" 'fsharp-ac/gotodefn-at-point | ||
"mss" 'fsharp-show-subshell | ||
"mee" 'fsharp-run-executable-file | ||
"mfa" 'fsharp-find-alternate-file | ||
"men" 'next-error | ||
"mep" 'previous-error | ||
) | ||
))) |