From edfb9bf03df4555bba520f47bea8db966d4c739e Mon Sep 17 00:00:00 2001 From: Albert Cervin Date: Thu, 12 Sep 2024 20:46:42 +0200 Subject: Update the expectations on grammars Outside the Nix setup, it will be the responsibility of something else (might be a script) to provide the treesitter grammars. --- README.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 5b44750..c32d60f 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ expected pre-1.0.0. - [x] Terminal only - [x] Mouse-free editing - [x] Naive and incorrect unicode handling -- [ ] LSP Client implementation +- [ ] LSP Client implementation (in progress) ## Contributing @@ -41,7 +41,25 @@ needed dependencies, issue: $ nix develop ``` -Currently, tree-sitter grammars can only be automatically fetched when using the Nix setup. +Tree-sitter grammars are automatically fetched and bundled when using the Nix setup. +When not using the Nix setup, download/build needed treesitter grammars and set the env +var $BUNDLE_TREESITTER_GRAMMARS to a folder containing built treesitter grammars. The +structure should be like + +``` +/ + / + parser # the parser binary as a DSO + queries/ + highlights.scm # treesitter queries for highlights + / + parser + queries/ + highlights.scm + ... +``` + +where `` is for example `cpp` which corresponds to the language id, see man page. To build the editor, first create the build folder -- cgit v1.2.3