Skip to content

Commit 671853e

Browse files
committed
doc: Remove the copied list of bundled languages; mention csharp-mode
1 parent 9b6c2c7 commit 671853e

File tree

1 file changed

+6
-31
lines changed

1 file changed

+6
-31
lines changed

doc/emacs-tree-sitter.org

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -165,37 +165,12 @@ The variable ~tree-sitter-load-path~ is a list of directories that the function
165165

166166
The package ~tree-sitter-langs~ is a language bundle that contains shared libraries for some languages (as well as syntax highlighting queries). When it is loaded, its shared libraries are prioritized over the CLI's directory.
167167

168-
Currently, there are *no language major modes* built on top of ~tree-sitter~. Instead, syntax-aware functionalities are provided by ~tree-sitter-mode~ and its dependent minor modes. They determine the language object to use by consulting the variable ~tree-sitter-major-mode-language-alist~. This list is empty by default, and gets populated by ~tree-sitter-langs~ when it is loaded.
168+
Syntax-aware language-agnostic mechanisms are meant to be defined by ~tree-sitter-mode~ and its dependent minor modes. They determine the language object to use by consulting the variable ~tree-sitter-major-mode-language-alist~. This list is empty by default, and gets populated by ~tree-sitter-langs~ when it is loaded, and by language major modes that are ~tree-sitter~-aware.
169+
170+
Language major modes use these generic mechanisms to provide functionalities specific to their languages. Currently, there are *not many language major modes* built on top of ~tree-sitter~. An example is [[https://github.com/emacs-csharp/csharp-mode/][csharp-mode]].
171+
172+
For the full list of languages bundled by ~tree-sitter-langs~, see the submodules under its [[https://github.com/ubolonton/tree-sitter-langs/tree/master/repos][repos/]] directory.
169173

170-
#+begin_src emacs-lisp
171-
'((agda-mode . agda)
172-
(sh-mode . bash)
173-
(c-mode . c)
174-
(csharp-mode . c-sharp)
175-
(c++-mode . cpp)
176-
(css-mode . css)
177-
(elm-mode . elm)
178-
(go-mode . go)
179-
(haskell-mode . haskell)
180-
(html-mode . html)
181-
(java-mode . java)
182-
(js-mode . javascript)
183-
(js2-mode . javascript)
184-
(json-mode . json)
185-
(jsonc-mode . json)
186-
(julia-mode . julia)
187-
(ocaml-mode . ocaml)
188-
(php-mode . php)
189-
(python-mode . python)
190-
(rjsx-mode . javascript)
191-
(ruby-mode . ruby)
192-
(rust-mode . rust)
193-
(rustic-mode . rust)
194-
(scala-mode . scala)
195-
(swift-mode . swift)
196-
(tuareg-mode . ocaml)
197-
(typescript-mode . typescript))
198-
#+end_src
199174
* Syntax Highlighting
200175
:PROPERTIES:
201176
:EXPORT_HUGO_SECTION: syntax-highlighting
@@ -219,7 +194,7 @@ To enable it whenever possible (assuming the language major modes were already i
219194
(add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode)
220195
#+end_src
221196

222-
The package ~tree-sitter-langs~ provides syntax highlighting queries for some languages:
197+
The package ~tree-sitter-langs~ provides syntax highlighting [[https://github.com/ubolonton/tree-sitter-langs/tree/master/queries][queries]] for some languages:
223198
- C
224199
- C++
225200
- *CSS*

0 commit comments

Comments
 (0)