Merge pull request #1327 from TOTBWF/lang-fsharp

Add :lang fsharp module
This commit is contained in:
Henrik Lissner 2019-05-28 17:04:58 -04:00 committed by GitHub
commit ad9541acc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 78 additions and 0 deletions

View file

@ -107,6 +107,7 @@
;;elm ; care for a cup of TEA? ;;elm ; care for a cup of TEA?
emacs-lisp ; drown in parentheses emacs-lisp ; drown in parentheses
;;ess ; emacs speaks statistics ;;ess ; emacs speaks statistics
;;fsharp ; ML stands for Microsoft's Language
;;go ; the hipster dialect ;;go ; the hipster dialect
;;(haskell +intero) ; a language that's lazier than I am ;;(haskell +intero) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python ;;hy ; readability of scheme w/ speed of python

View file

@ -0,0 +1,54 @@
#+TITLE: lang/fsharp
#+DATE: May 22, 2019
#+SINCE: {replace with next tagged release version}
#+STARTUP: inlineimages
* Table of Contents :TOC_3:noexport:
- [[#description][Description]]
- [[#module-flags][Module Flags]]
- [[#plugins][Plugins]]
- [[#hacks][Hacks]]
- [[#prerequisites][Prerequisites]]
- [[#mono][Mono]]
- [[#osx][OSX]]
- [[#arch-linux][Arch Linux]]
- [[#features][Features]]
- [[#configuration][Configuration]]
- [[#troubleshooting][Troubleshooting]]
* Description
# A summary of what this module does.
# + If possible, include a brief list of feature highlights here
# + Like code completion, syntax checking or available snippets
# + Include links to packages & external things where possible
This module adds [[https://fsharp.org/][F#]] support.
+ Code completion
+ eldoc support
+ Syntax checking
** Module Flags
This module provides no flags.
** Plugins
+ [[https://github.com/fsharp/emacs-fsharp-mod+e][fsharp-mode]]
** Hacks
None so far.
* Prerequisites
** Mono
To get code completion/syntax checking, you will need to install [[https://www.mono-project.com/][mono]].
*** OSX
Do *NOT* install mono via brew. See this [[https://github.com/fsharp/FsAutoComplete/issues/331][issue]].
*** Arch Linux
#+BEGIN_SRC sh
sudo pacman -S mono
#+END_SRC
* Features
An in-depth list of features, how to use them, and their dependencies.
* Configuration
How to configure this module, including common problems and how to address them.
* Troubleshooting
Common issues and their solution, or places to look for help.

View file

@ -0,0 +1,14 @@
;;; lang/fsharp/config.el -*- lexical-binding: t; -*-
(after! fsharp-mode
(setq fsharp-ac-use-popup nil) ; Use a buffer for docs rather than a pop-up
(set-lookup-handlers! 'fsharp-mode :async t :definition #'fsharp-ac/gotodefn-at-point)
(set-company-backend! 'fsharp-mode 'fsharp-ac/company-backend)
(set-repl-handler! 'fsharp-mode #'run-fsharp)
(map! :localleader
:map fsharp-mode-map
"b" #'fsharp-ac/pop-gotodefn-stack ; Useful for re-tracing your steps
"e" #'fsharp-eval-region
"l" #'fsharp-load-buffer-file
"q" #'fsharp-ac/stop-process
"t" #'fsharp-ac/show-tooltip-at-point))

View file

@ -0,0 +1,5 @@
;;; lang/fsharp/doctor.el -*- lexical-binding: t; -*-
(when (require 'fsharp-mode nil t)
(unless (cl-some #'fsharp-mode--executable-find '("fsharpc" "fsc"))
(warn! "Cannot find the F# compiler. Most features will not work.")))

View file

@ -0,0 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; lang/fsharp/packages.el
(package! fsharp-mode)