aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-11-10 15:22:44 +0100
committerThomas Voss <mail@thomasvoss.com> 2023-11-10 15:22:44 +0100
commit63c7e63769231f5196ec09cd4ff031a1d8ca8cb1 (patch)
tree0275f44700ea34996713d68e8ac656baa1b783bc /README.md
parent33f304af71bfdafc92d384fca79e5b77db002ed6 (diff)
Add a READMEv1.1.0
Diffstat (limited to 'README.md')
-rw-r--r--README.md40
1 files changed, 40 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..1e3abf3
--- /dev/null
+++ b/README.md
@@ -0,0 +1,40 @@
+# tree-sitter-gsp
+
+This is a tree-sitter parser for the [GSP][1] language. It has complete support
+for the GSP grammar including the ‘>’ node prefix that existed before GSP v3.
+This repository also comes with queries for syntax highlighting, code folding,
+indentation, etc., as well as automatic filetype detection for Neovim.
+
+## Neovim Support
+
+If you would like to use this parser in Neovim, the following configuration is
+required.
+
+### Plugin Installation
+
+The plugin installation syntax will depend on your package manager. To install
+the plugin via Packer, do the following. This will enable the syntax
+highlighting amongst other things, and automatic filetype detection.
+
+```lua
+use 'https://git.sr.ht/~mango/tree-sitter-gsp'
+```
+
+### TS Parser Installation
+
+The Tree-Sitter parser needs to be specified manually in your nvim-treesitter
+configuration. The following should be sufficient. When you’re done, simply
+run `:TSInstall gsp`
+
+```lua
+local config = require('nvim-treesitter.parsers').get_parser_configs()
+config.gsp = {
+ install_info = {
+ url = 'https://git.sr.ht/~mango/tree-sitter-gsp',
+ files = {'src/parser.c'},
+ },
+ filetype = 'gsp',
+}
+```
+
+[1]: https://sr.ht/~mango/gsp