diff --git a/contrib/lang/fsharp/README.md b/contrib/lang/fsharp/README.md new file mode 100644 index 000000000000..02754f44bfaa --- /dev/null +++ b/contrib/lang/fsharp/README.md @@ -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 +----------------------|------------------------------------------------------------ +mcc | Build the project + +### Navigation + + Key Binding | Description +----------------------|------------------------------------------------------------ +mcd | Go to definition at point +men | Next error +mep | Previous error + +### REPL + + Key Binding | Description +----------------------|------------------------------------------------------------ +mer | Evaluate region +mep | Evaluate phrase +mef | Evaluate buffer +mss | Start REPL + +### Helpers (documentation, info) + + Key Binding | Description +----------------------|------------------------------------------------------------ +mst | Show tooltip at point diff --git a/contrib/lang/fsharp/extensions.el b/contrib/lang/fsharp/extensions.el new file mode 100644 index 000000000000..0a742f348625 --- /dev/null +++ b/contrib/lang/fsharp/extensions.el @@ -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- +;; +;; (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 diff --git a/contrib/lang/fsharp/img/fsharp256.png b/contrib/lang/fsharp/img/fsharp256.png new file mode 100644 index 000000000000..f98449050bd1 Binary files /dev/null and b/contrib/lang/fsharp/img/fsharp256.png differ diff --git a/contrib/lang/fsharp/packages.el b/contrib/lang/fsharp/packages.el new file mode 100644 index 000000000000..819c5d99efcd --- /dev/null +++ b/contrib/lang/fsharp/packages.el @@ -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 + ) + )))