Skip to content

fe-lang/emacs-fe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

emacs-fe

Tree-sitter major mode for the Fe language in Emacs.

Prerequisites

  1. fe CLI (includes the language server) must be installed and available in your PATH:

    curl -fsSL https://raw.githubusercontent.com/argotorg/fe/master/feup/feup.sh | bash

    Or build from source:

    cargo install --git https://github.com/argotorg/fe.git fe
  2. Emacs 29.1 or later (for built-in tree-sitter support)

  3. C compiler (GCC or Clang, for building the tree-sitter grammar on first use)

Install

Add this to your ~/.emacs.d/init.el:

(use-package fe
  :vc (:url "https://github.com/fe-lang/emacs-fe"
       :branch "main"))

Usage

  • Open a .fe file to enable fe-mode automatically.
  • fe-mode provides tree-sitter syntax highlighting, indentation, and imenu.

LSP (optional)

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.

Emacs distros (Doom, Spacemacs, etc.)

(use-package! fe
  :mode ("\\.fe\\'" . fe-mode)
  :custom
  (fe-mode-lsp-auto t))

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors