Tree-sitter major mode for the Fe language in Emacs.
-
feCLI (includes the language server) must be installed and available in your PATH:curl -fsSL https://raw.githubusercontent.com/argotorg/fe/master/feup/feup.sh | bashOr build from source:
cargo install --git https://github.com/argotorg/fe.git fe
-
Emacs 29.1 or later (for built-in tree-sitter support)
-
C compiler (GCC or Clang, for building the tree-sitter grammar on first use)
Add this to your ~/.emacs.d/init.el:
(use-package fe
:vc (:url "https://github.com/fe-lang/emacs-fe"
:branch "main"))- Open a
.fefile to enablefe-modeautomatically. fe-modeprovides tree-sitter syntax highlighting, indentation, and imenu.
The package auto-registers fe lsp with both Eglot and lsp-mode when either is loaded — no manual client registration needed.
To auto-start Eglot:
(use-package fe
:vc (:url "https://github.com/fe-lang/emacs-fe"
:branch "main")
:custom
(fe-mode-eglot-auto t))To auto-start lsp-mode:
(use-package fe
:vc (:url "https://github.com/fe-lang/emacs-fe"
:branch "main")
:custom
(fe-mode-lsp-auto t))Use either Eglot or lsp-mode per buffer, not both at once.
(use-package! fe
:mode ("\\.fe\\'" . fe-mode)
:custom
(fe-mode-lsp-auto t))