Skip to content

Commit

Permalink
Update README now that templ-ts-mode is in MELPA
Browse files Browse the repository at this point in the history
  • Loading branch information
danderson committed Jan 8, 2024
1 parent c91c222 commit 8379be6
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ Emacs major mode for editing [Templ](https://templ.guide) files.

## Installing

templ-ts-mode requires two tree-sitter grammars: the Javascript
templ-ts-mode is [available in
MELPA](https://melpa.org/#/templ-ts-mode). Install it however you
usually install your emacs packages from MELPA!

The mode does require two tree-sitter grammars: the Javascript
grammar, which should have shipped with your Emacs installation; and
the [Templ grammar](https://github.com/vrischmann/tree-sitter-templ),
which probably hasn't.
Expand All @@ -17,19 +21,14 @@ options to set the source repository for the grammar, and to either
always or never install the grammar if it's missing.

If you're a Nix/NixOS user, this repository is a flake that packages
both the major mode and the tree-sitter grammar as a convenience,
until nixpkgs starts carrying them upstream. I recommend using the
[community emacs
both the major mode and the tree-sitter grammar as a convenience. I
recommend using the [community emacs
overlay](https://github.com/nix-community/emacs-overlay) to manage
your emacs configs, and you can peek at [my emacs nix
configuration](https://github.com/danderson/homelab/blob/main/home/emacs2.nix)
for an example of how to add the parser and major mode to your
installation.

templ-ts-mode is [pending addition to
MELPA](https://github.com/danderson/templ-ts-mode/issues/1), in the
meantime you need to install the mode by hand.

## Usage

The package automatically sets `templ-ts-mode` for `.templ`
Expand Down

0 comments on commit 8379be6

Please sign in to comment.