{"id":13680032,"url":"https://github.com/fsharp/emacs-fsharp-mode","last_synced_at":"2025-05-16T11:05:01.124Z","repository":{"id":31939769,"uuid":"35509388","full_name":"fsharp/emacs-fsharp-mode","owner":"fsharp","description":"F# Emacs mode","archived":false,"fork":false,"pushed_at":"2025-04-03T19:25:13.000Z","size":1092,"stargazers_count":210,"open_issues_count":43,"forks_count":64,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-09T07:01:40.212Z","etag":null,"topics":["emacs-mode","fsharp","hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"dtbaker/bbPress-Support-Forums","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fsharp.png","metadata":{"files":{"readme":"README.org","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-05-12T19:52:43.000Z","updated_at":"2025-04-03T19:25:17.000Z","dependencies_parsed_at":"2023-01-14T20:09:54.615Z","dependency_job_id":"1e0c8278-130b-45e1-b8c2-70344b9de638","html_url":"https://github.com/fsharp/emacs-fsharp-mode","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsharp%2Femacs-fsharp-mode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsharp%2Femacs-fsharp-mode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsharp%2Femacs-fsharp-mode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsharp%2Femacs-fsharp-mode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fsharp","download_url":"https://codeload.github.com/fsharp/emacs-fsharp-mode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254518384,"owners_count":22084374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["emacs-mode","fsharp","hacktoberfest"],"created_at":"2024-08-02T13:01:12.305Z","updated_at":"2025-05-16T11:04:56.115Z","avatar_url":"https://github.com/fsharp.png","language":"Emacs Lisp","funding_links":[],"categories":["Emacs Lisp","Development Tools"],"sub_categories":["Editor Plugins"],"readme":"[[http://melpa.org/#/fsharp-mode][file:http://melpa.org/packages/fsharp-mode-badge.svg]]\n[[https://stable.melpa.org/#/fsharp-mode][file:https://stable.melpa.org/packages/fsharp-mode-badge.svg]]\n[[https://github.com/fsharp/emacs-fsharp-mode/actions][file:https://github.com/fsharp/emacs-fsharp-mode/workflows/CI/badge.svg]]\n* fsharp-mode\n\nProvides support for the F# language in Emacs. Includes the following features:\n\n- Syntax highlighting and indentation\n- Support for F# Interactive\n- Via [[https://github.com/joaotavora/eglot/issues][Eglot]] LSP-client integration:\n  - Displays type signatures and tooltips\n  - Flymake\n  - Completion\n  - Jump to definition [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Xref.html][Find Identifier References]] (Xref)\n\n** LSP mode\n\nThe current version of =fsharp-mode= installs =fsautocomplete.exe=\nautomatically via =eglot-fsharp.el= (part of this mono repo, [[https://melpa.org/#/eglot-fsharp][eglot-fsharp\non melpa]]) or [[https://github.com/emacs-lsp/lsp-mode][lsp-mode]] (untested).\n\n=fsharp-mode= is tested with Emacs 27.1+ and NET Core 6 (LTS)\n\n** Installation\n\n*** Package\n\n=fsharp-mode= is available on [[https://melpa.org][MELPA]] and can\nbe installed using the built-in package manager.\n\nIf you're not already using MELPA, add the following to your init.el:\n\n#+BEGIN_SRC elisp\n  ;;; Initialize MELPA\n  (require 'package)\n  (add-to-list 'package-archives '(\"melpa\" . \"http://melpa.org/packages/\"))\n  (unless package-archive-contents (package-refresh-contents))\n  (package-initialize)\n\n  ;;; Install fsharp-mode\n  (unless (package-installed-p 'fsharp-mode)\n    (package-install 'fsharp-mode))\n\n  (require 'fsharp-mode)\n#+END_SRC\n\nIf you are a user of [[https://github.com/jwiegley/use-package][use-package]] you can instead do\n\n#+BEGIN_SRC elisp\n(use-package fsharp-mode\n  :defer t\n  :ensure t)\n#+END_SRC\n\n*** From source\n\nI recommend to use [[https://cask.github.io/why-cask.html][Cask]]. Add this to your =Cask= file:\n\n#+BEGIN_SRC elisp\n(depends-on \"fsharp-mode\" :git \"https://github.com/fsharp/emacs-fsharp-mode.git\")\n#+END_SRC\n\n** Eglot integration\n\nThe =eglot-fsharp= integration is not part of [[https://melpa.org/#/fsharp-mode][fsharp-mode on melpa]].\n\nIt is available via the seperate package [[https://melpa.org/#/eglot-fsharp][eglot-fsharp on melpa]].\n\nAdd to your config:\n#+BEGIN_SRC elisp\n(require 'eglot-fsharp)\n#+END_SRC\n\nand execute =M-x eglot=\n\nWith eglot running use `xref-find-definitions` (bound to =M-.= pr. default) to go to definition. Completions are accessable via. `completion-at-point` (or a completion backend ex. company-mode [[https://melpa.org/#/company]])\n\n\n** Projects\n\n=fsharp-mode= has support for Emacs build-in project management via =project.el=\n\n** Configuration\n\n*** Compiler and REPL paths\n\nThe F# compiler and interpreter should be set to good defaults for\nyour OS as long as the relevant executables can be found on your PATH\nor in other standard locations. If you have a non-standard setup you\nmay need to configure these paths manually.\n\nOn Windows:\n\n#+BEGIN_SRC elisp\n(setq inferior-fsharp-program \"c:\\\\Path\\\\To\\\\Fsi.exe\")\n#+END_SRC\n\nOn Unix-like systems, you must use the *--readline-* flag to ensure F#\nInteractive will work correctly with Emacs. Typically =fsi= and =fsc= are\ninvoked through the shell scripts =fsharpi= and =fsharpc=:\n\n#+BEGIN_SRC elisp\n(setq inferior-fsharp-program \"path/to/fsharpi --readline-\")\n#+END_SRC\n\n***  Key Bindings\n\nIf you are new to Emacs, you might want to use the menu (call\n=menu-bar-mode= if you don't see it). However, it's usually faster to learn\na few useful bindings:\n\n| Key binding      | Description                               |\n|------------------+-------------------------------------------|\n| =C-c C-r=        | Evaluate region                           |\n| =C-c C-f=        | Load current buffer into toplevel         |\n| =C-c C-e=        | Evaluate current toplevel phrase          |\n| =C-M-x=          | Evaluate current toplevel phrase          |\n| =C-M-h=          | Mark current toplevel phrase              |\n| =C-c C-s=        | Show interactive buffer                   |\n| =C-c C-c=        | Compile with fsc                          |\n| =C-c x=          | Run the executable                        |\n| =C-c C-a=        | Open alternate file (.fsi or .fs)         |\n| =C-c l=          | Shift region to left                      |\n| =C-c r=          | Shift region to right                     |\n| =C-c \u003cup\u003e=       | Move cursor to the beginning of the block |\n| =C-c C-d=, =M-.= | Jump to definition of symbol at point     |\n| =C-c C-b=, =M-,= | Return to where point was before jump.    |\n\n\nTo interrupt the interactive mode, use =C-c C-c=. This is useful if your\ncode does an infinite loop or a very long computation.\n\nIf you want to shift the region by 2 spaces, use: =M-2 C-c r=\n\nIn the interactive buffer, use ==M-RET= to send the code without\nexplicitly adding the =;;= thing.\n\n\n** Editor\n\nIn order to change tab size it is possible to put this in emacs profile:\n\n#+BEGIN_SRC elisp\n(setq-default fsharp-indent-offset 2)\n#+END_SRC\n\nBecause the F# language is sensitive to indentation, you might wan't to highlight indentation:\n\n#+BEGIN_SRC elisp\n(add-hook 'fsharp-mode-hook 'highlight-indentation-mode)\n#+END_SRC\n\n** Troubleshooting\n\n=fsharp-mode= is still under development, so you may encounter some\nissues. Please report them so we can improve things! Open an issue on [[https://github.com/fsharp/emacs-fsharp-mode/][Github]].\n\n*** No autocompletion in FSX files\n\nThe root cause is documented in this Ionide issue:  [[https://github.com/ionide/ionide-vscode-fsharp/issues/1244][4.2.0 - No auto complete or typechecking in FSX files]]\n\nAs a workaround can add a reference to the facade netstandard assembly (path is platform/SDK-dependent).\n\nOn Arch Linux using [[https://aur.archlinux.org/packages/dotnet-sdk-lts-bin][dotnet sdk lts]] add this to your =fsx= file:\n#+BEGIN_SRC fsharp\n#r \"/opt/dotnet/sdk/2.1.801/ref/netstandard.dll\"\n#+END_SRC\n\n*** Project file issues\n\nIf your project file does not seem to be being parsed correctly, so\nthat you have missing references or other incorrect intellisense\nresults, it is possible to obtain a detailed log of LSP events in this buffers:\n\n\n- =*EGLOT (PROJECT/fsharp-mode) stderr*=\n- =*EGLOT (PROJECT/fsharp-mode) output*=\n- =*EGLOT (PROJECT/fsharp-mode) events*=\n\n** Contributing\n\nThis project is maintained by the\n[[http://fsharp.org/][F# Software Foundation]], with the repository hosted\non [[https://github.com/fsharp/emacs-fsharp-mode][GitHub]].\n\nPull requests are welcome. Please run the test-suite with [Eldev](https://doublep.github.io/eldev/) =eldev -dtT test=\nbefore submitting a pull request.\n\n*** Maintainers\n\nThe maintainers of this repository appointed by the F# Core Engineering Group are:\n\n - [[https://github.com/juergenhoetzel][Jürgen Hötzel]], [[http://github.com/forki][Steffen Forkmann]], [[http://github.com/kjnilsson][Karl Nilsson]] and [[http://github.com/guillermooo][Guillermo López-Anglada]]\n - The primary maintainer for this repository is [[https://github.com/juergenhoetzel][Jürgen Hötzel]]\n\nPrevious maintainers:\n - [[https://github.com/rneatherway][Robin Neatherway]]\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffsharp%2Femacs-fsharp-mode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffsharp%2Femacs-fsharp-mode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffsharp%2Femacs-fsharp-mode/lists"}