diff options
| author | stuebinm | 2026-07-24 21:08:18 +0200 |
|---|---|---|
| committer | stuebinm | 2026-07-24 21:08:18 +0200 |
| commit | ddba451b5249fea786177b9698ea136310857c75 (patch) | |
| tree | 6002cd156b5b9e46ec79b750fd90b70c67237c4c | |
| parent | b55577a710a6a7a4fd82339602e19307edb29b3a (diff) | |
forester-ts-mode (thanks, Asta!)
| -rw-r--r-- | config.el | 15 | ||||
| -rw-r--r-- | packages.el | 13 |
2 files changed, 28 insertions, 0 deletions
@@ -182,8 +182,23 @@ (setq lsp-ui-sideline-show-code-actions nil) (setq lsp-signature-render-documentation nil) +(after! forester-ts-mode + (setq treesit-font-lock-level 5) + (unless (treesit-ready-p 'forester) + (treesit-install-language-grammar 'forester)) + (add-to-list 'auto-mode-alist '("\\.tree\\'" . forester-ts-mode))) + (after! (lsp-ui helm-lsp) (lsp-signature-activate) + + (add-to-list 'lsp-language-id-configuration + '(forester-ts-mode . "forester")) + (lsp-register-client + (make-lsp-client :new-connection (lsp-stdio-connection '("forester" "lsp")) + :major-modes '(forester-ts-mode) + :activation-fn (lsp-activate-on "forester") + :server-id 'forester)) + ;; custom version which will not blindly apply a single code action ;; if only one is available without asking about it first. ;; Source taken from https://github.com/emacs-lsp/helm-lsp/blob/master/helm-lsp.el diff --git a/packages.el b/packages.el index 92bc71b..31454ef 100644 --- a/packages.el +++ b/packages.el @@ -38,6 +38,19 @@ :repo "gleam-lang/gleam-mode" :files (:defaults "tree-sitter-gleam"))) + +(package! forester-ts-mode + :recipe (:type git + :repo "https://codeberg.org/ahfrom/tree-sitter-forester.git" + ;; :branch "main" + :files ("emacs/*.el"))) + ;; :mode ("\\.tree\\'" . forester-ts-mode) + ;; :custom (treesit-font-lock-level 5) + ;; :config + ;; (unless (treesit-ready-p 'forester) + ;; (treesit-install-language-grammar 'forester))) + + ;; To install a package directly from a remote git repo, you must specify a ;; `:recipe'. You'll find documentation on what `:recipe' accepts here: ;; https://github.com/raxod502/straight.el#the-recipe-format |
