Skip to content

feat: Add language modes for unsupported languages #2066

@cxxxr

Description

@cxxxr

Summary

This issue tracks the implementation of language modes for languages that are commonly supported by other editors (VS Code, Emacs, Neovim) but are currently missing in Lem.

Background

Lem currently supports 38 language modes. Other major editors support 60+ languages out of the box. This gap affects Lem's competitiveness as a general-purpose editor.


High Priority (Popular Languages)

These are widely-used languages that should be prioritized:

Medium Priority (Domain-Specific)

Languages important in specific domains:

  • LaTeX/TeX - Essential for academic/technical documents
  • R - Data science and statistics
  • Julia - Scientific computing (fast-growing)
  • F# - Functional programming on .NET
  • Groovy - Jenkins/Gradle build scripts
  • SCSS/Sass - CSS preprocessor, standard in web dev
  • Less - CSS preprocessor
  • Dockerfile - Container definitions, essential for DevOps
  • PowerShell - Windows administration
  • Objective-C - iOS/macOS legacy development
  • D - Systems programming language

Low Priority (Niche/Legacy)

  • CoffeeScript - JavaScript alternative (declining)
  • Svelte - Web framework
  • Handlebars - Template engine
  • Pug/Jade - HTML template
  • Slim - HTML template (Ruby)
  • Pascal/Delphi - Legacy
  • Visual Basic - Legacy
  • BibTeX - Bibliography management
  • INI - Config file format
  • ABAP - SAP
  • ShaderLab - Unity shaders
  • Razor - ASP.NET templates
  • XSL/XSLT - XML transformation
  • CUDA - GPU computing
  • Batch (.bat) - Windows scripts
  • Stylus - CSS preprocessor (declining)

Emerging Languages (Future Consideration)

  • Zig - Next-gen systems language
  • Gleam - Typed language on BEAM VM
  • Crystal - Ruby-like compiled language
  • Fennel - Lisp on Lua
  • Janet - Embeddable Lisp
  • Odin - Game development

Implementation Notes

Each language mode should ideally include:

  1. Syntax highlighting (regex-based or tree-sitter)
  2. Indentation support (calc-indent-function)
  3. LSP configuration (if language server exists)
  4. begin/end-of-defun navigation

Minimum Implementation

(define-major-mode <lang>-mode language-mode
  (:name "<Language>"
   :keymap *<lang>-mode-keymap*
   :syntax-table *<lang>-syntax-table*
   :mode-hook *<lang>-mode-hook*))

References

  • Existing modes: extensions/rust-mode/, extensions/go-mode/
  • LSP config examples: extensions/python-mode/lsp-config.lisp
  • Tree-sitter examples: extensions/json-mode/tree-sitter/

Contributing

Contributions are welcome! If you'd like to implement a language mode:

  1. Check if tree-sitter grammar exists for the language
  2. Check if LSP server exists
  3. Create a new directory under extensions/
  4. Follow existing mode patterns

Please comment on this issue if you're working on a specific language to avoid duplication.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions