Skip to content

Commit

Permalink
Add fsharp layer
Browse files Browse the repository at this point in the history
  • Loading branch information
ryansroberts authored and syl20bnr committed Mar 14, 2015
1 parent 519e46b commit 02c5c82
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 0 deletions.
50 changes: 50 additions & 0 deletions contrib/lang/fsharp/README.md
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
21 changes: 21 additions & 0 deletions contrib/lang/fsharp/extensions.el
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
Binary file added contrib/lang/fsharp/img/fsharp256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions contrib/lang/fsharp/packages.el
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
)
)))

0 comments on commit 02c5c82

Please sign in to comment.