Emacs config utilizing prelude as a base
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.6 KiB

  1. ;;; prelude-fsharp.el --- Emacs Prelude: F# programming support.
  2. ;;
  3. ;; Author: Andre Boechat <andre.boechat@tutanota.com>
  4. ;; This file is not part of GNU Emacs.
  5. ;;; Commentary:
  6. ;; Basic setup for F# programming based on fsharp-mode and Eglot.
  7. ;;; License:
  8. ;; This program is free software; you can redistribute it and/or
  9. ;; modify it under the terms of the GNU General Public License
  10. ;; as published by the Free Software Foundation; either version 3
  11. ;; of the License, or (at your option) any later version.
  12. ;;
  13. ;; This program is distributed in the hope that it will be useful,
  14. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. ;; GNU General Public License for more details.
  17. ;;
  18. ;; You should have received a copy of the GNU General Public License
  19. ;; along with GNU Emacs; see the file COPYING. If not, write to the
  20. ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  21. ;; Boston, MA 02110-1301, USA.
  22. ;;; Code:
  23. (require 'prelude-programming)
  24. (prelude-require-packages '(fsharp-mode eglot-fsharp))
  25. (with-eval-after-load 'fsharp-mode
  26. (defun prelude-fsharp-mode-defaults ()
  27. ;; A reasonable default path to the F# compiler and interpreter on
  28. ;; Unix-like systems.
  29. ;; https://github.com/fsharp/emacs-fsharp-mode#compiler-and-repl-paths
  30. (setq inferior-fsharp-program "dotnet fsi --readline-")
  31. (require 'eglot-sharp))
  32. (setq prelude-fsharp-mode-hook 'prelude-fsharp-mode-defaults)
  33. (add-hook 'fsharp-mode-hook (lambda ()
  34. (run-hooks 'prelude-sharp-mode-hook))))
  35. (provide 'prelude-fsharp)
  36. ;;; prelude-fsharp.el ends here