Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FSharpbinding support #800

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
)
)))