Add working fsharp installation
This commit is contained in:
parent
341a2b0ee7
commit
6e0b17c263
4 changed files with 56 additions and 4 deletions
30
languages/fsharp.el
Normal file
30
languages/fsharp.el
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
;;; fsharp.el --- summary
|
||||
|
||||
;; Author: Maciej Szlosarczyk
|
||||
;; Maintainer: Maciej Szlosarczyk
|
||||
;; Version: 0.1-snapshot
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Fsharp configuration
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require '05prog-mode "$HOME/.emacs.d/05prog-mode.el")
|
||||
(require '05flycheck "$HOME/.emacs.d/05flycheck.el")
|
||||
|
||||
(use-package fsharp-mode
|
||||
:requires (lsp-mode lsp-ui)
|
||||
:ensure t
|
||||
:defer t)
|
||||
|
||||
(defun activate-fsharp-mode ()
|
||||
"Activate F# goodies."
|
||||
(set-indent 4)
|
||||
(column-enforce-n 100)
|
||||
(lsp-deferred))
|
||||
|
||||
(add-hook 'fsharp-mode-hook 'activate-fsharp-mode)
|
||||
|
||||
(provide 'languages/fsharp)
|
||||
;;; fsharp.el ends here
|
||||
|
|
@ -58,10 +58,29 @@ _o_: Update opam env
|
|||
;; Use tuareg-opam with lock files
|
||||
(add-to-list 'auto-mode-alist '("\\.opam.locked\\'" . tuareg-opam-mode))
|
||||
|
||||
(defhydra my-reason/context-hydra (:color teal :hint nil)
|
||||
"
|
||||
Reason actions
|
||||
|
||||
^Reason^ ^Actions^
|
||||
^^^^^^^^-----------------------------------------------------------------------
|
||||
_f_: Format buffer
|
||||
_o_: Update opam env
|
||||
"
|
||||
("q" nil "cancel" :color blue)
|
||||
|
||||
("f" refmt)
|
||||
("o" tuareg-opam-update-env))
|
||||
|
||||
(defun my-reason-mode ()
|
||||
"Generate reason config."
|
||||
(define-key reason-mode-map (kbd "C-c l") 'my-reason/context-hydra/body))
|
||||
|
||||
;; Reason setup
|
||||
(add-hook 'reason-mode-hook
|
||||
(lambda ()
|
||||
(add-hook 'before-save-hook #'refmt-before-save)))
|
||||
(add-hook 'reason-mode-hook 'my-reason-mode)
|
||||
(add-hook 'reason-mode-hook 'merlin-mode)
|
||||
|
||||
(provide 'languages/ocaml)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue