M README.md => README.md +35 -1
@@ 1,3 1,37 @@
# deno-ts-mode
-WIP
+A major mode for Deno, based on `typescript-ts-mode`.
+
+## Installation
+
+Requires Emacs 29+ with tree-sitter installed.
+
+```elisp
+(package-vc-install "https://git.sr.ht/~mgmarlow/deno-ts-mode")
+```
+
+### Installing tree-sitter parsers
+
+`deno-ts-mode` depends on tree-sitter. You need the following parsers:
+
+```elisp
+(setq treesit-language-source-alist
+ '((typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src")
+ (tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src")))
+```
+
+Run `treesit-install-language-grammer` for both `typescript` and `tsx`.
+
+## Eglot example
+
+```elisp
+(use-package deno-ts-mode
+ :config
+ (deno-setup-auto-mode-alist))
+
+(use-package eglot
+ :ensure t
+ :hook ((deno-ts-mode . eglot-ensure))
+ :config
+ (deno-setup-eglot))
+```
M deno-ts-mode.el => deno-ts-mode.el +7 -2
@@ 1,4 1,4 @@
-;;; deno-ts-mode.el --- Useful extensions when working with Deno -*- lexical-binding: t; -*-
+;;; deno-ts-mode.el --- Major mode for Deno -*- lexical-binding: t; -*-
;; Copyright (C) 2023 Graham Marlow
@@ 23,7 23,12 @@
;;; Commentary:
-;;
+;; Major mode for Deno. `deno-ts-mode' is derived from
+;; `typescript-ts-mode', so it depends on the TypeScript tree-sitter
+;; parser and definitions. Since Deno uses the same file extension as
+;; TypeScript, `deno-ts-mode' helps alleviate some of the common
+;; issues that come out of swapping between Deno projects and regular
+;; TS projects.
;;; Code: