Add text to the "Emacs Tree-sitter" section

This commit is contained in:
Gerard Vermeulen 2023-05-28 14:19:21 +02:00
parent 925f9055e3
commit 51993cf300

View File

@ -394,9 +394,15 @@ the contents of packages and allows to update packages to the latest version.
:CUSTOM_ID: sec:emacs-tree-sitter
:END:
#+caption[Setup Emacs Tree-sitter]:
#+caption: Setup Emacs Tree-sitter.
#+name: lst:setup-emacs-tree-sitter
Mickey Peterson's post [[https://www.masteringemacs.org/article/how-to-get-started-tree-sitter?utm_source=newsletter&utm_medium=rss][How To Get Started with Tree-Sitter]] explains how to use
=tree-sitter= in Emacs-29.0.91. Listing [[lst:setup-treesit-sources][Setup =treesit= grammar sources]]
configures where to find the different =tree-sitter= grammar sources for
different languages. Listing [[lst:setup-go][Setup Go programming]] shows how to configure
~tab-width~ for ~go-ts-mod~ and ~go-mode-ts-mode~.
#+caption[Setup =treesit= grammar sources]:
#+caption: Setup =treesit= grammar sources.
#+name: lst:setup-treesit-sources
#+begin_src emacs-lisp -n :results silent
(when (require 'treesit nil 'noerror)
(setopt