aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2023-01-19 20:13:54 +0200
committerEli Zaretskii2023-01-19 20:13:54 +0200
commit78b83a744fa28abb3bb631e2688c19bd68896425 (patch)
tree9f1b0ed326320cd6d26eb0c4a82569221005bc54
parentfb82d4e3286935286b51765c4823f290428f25aa (diff)
downloademacs-78b83a744fa28abb3bb631e2688c19bd68896425.tar.gz
emacs-78b83a744fa28abb3bb631e2688c19bd68896425.zip
; * etc/NEWS: Rearrange instructions for building tree-sitter grammars.
-rw-r--r--etc/NEWS36
1 files changed, 19 insertions, 17 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 9f735bec443..38f2db26a1a 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -53,29 +53,31 @@ yourself. Many libraries can be downloaded from the tree-sitter site:
53 53
54 https://github.com/tree-sitter 54 https://github.com/tree-sitter
55 55
56To compile such a library, compile the files "scanner.c" and "parser.c"
57(sometimes named "scanner.cc" and "parser.cc") in the "src" subdirectory
58of the library's source tree using the C or C++ compiler, then link
59these two files into a shared library named "libtree-sitter-LANG.so",
60where LANG is the name of the language supported by the grammar as it
61is expected by the Emacs major mode (for example, "c" for 'c-ts-mode',
62"cpp" for 'c++-ts-mode', "python" for 'python-ts-mode', etc.). Then place
63the shared library you've built in the same directory where you keep
64the other shared libraries used by Emacs, or in the "tree-sitter"
65subdirectory of your 'user-emacs-directory', or in a directory
66mentioned in the variable 'treesit-extra-load-path'.
67
68You only need to install language grammar libraries required by the
69Emacs modes you will use, as Emacs loads these libraries only when the
70corresponding mode is turned on in some buffer for the first time in
71an Emacs session.
72
73Emacs provides a user command, 'treesit-install-language-grammar', 56Emacs provides a user command, 'treesit-install-language-grammar',
74that automates the download and build process of a grammar library. 57that automates the download and build process of a grammar library.
75It prompts for the language, the URL of the language grammar's VCS 58It prompts for the language, the URL of the language grammar's VCS
76repository, and then uses the installed C/C++ compiler to build the 59repository, and then uses the installed C/C++ compiler to build the
77library and install it. 60library and install it.
78 61
62You can also do this manually. To compile such a library after
63cloning its Git repository, compile the files "scanner.c" and
64"parser.c" (sometimes named "scanner.cc" and "parser.cc") in the "src"
65subdirectory of the library's source tree using the C or C++ compiler,
66then link these two files into a shared library named
67"libtree-sitter-LANG.so", where LANG is the name of the language
68supported by the grammar as it is expected by the Emacs major mode
69(for example, "c" for 'c-ts-mode', "cpp" for 'c++-ts-mode', "python"
70for 'python-ts-mode', etc.). Then place the shared library you've
71built in the same directory where you keep the other shared libraries
72used by Emacs, or in the "tree-sitter" subdirectory of your
73'user-emacs-directory', or in a directory mentioned in the variable
74'treesit-extra-load-path'.
75
76You only need to install language grammar libraries required by the
77Emacs modes you will use, as Emacs loads these libraries only when the
78corresponding mode is turned on in some buffer for the first time in
79an Emacs session.
80
79+++ 81+++
80** Emacs can be built with built-in support for accessing SQLite databases. 82** Emacs can be built with built-in support for accessing SQLite databases.
81This uses the popular sqlite3 library, and can be disabled by using 83This uses the popular sqlite3 library, and can be disabled by using