mirror of
https://github.com/JellyApple102/tree-sitter-dfraw.git
synced 2024-11-22 14:09:20 +02:00
update README
This commit is contained in:
parent
12ca7e6ced
commit
a13fd2709b
10
README.md
10
README.md
|
@ -12,10 +12,7 @@ A simple language parser and highlighter made with [tree-sitter](https://github.
|
||||||
|
|
||||||
# Using with [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter)
|
# Using with [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter)
|
||||||
|
|
||||||
Please refer to the [adding parsers](https://github.com/nvim-treesitter/nvim-treesitter#advanced-setup) section on the nvim-treesitter page.
|
Please refer to the [adding parsers](https://github.com/nvim-treesitter/nvim-treesitter#advanced-setup) section on the nvim-treesitter page for more information.
|
||||||
|
|
||||||
In order for syntax highlighting to work you copy `queries/highlights.scm` file from this repo to your nvim-treesitter location `queries/dfraw/highlights.scm`.
|
|
||||||
More information can be found on the nvim-treesitter page.
|
|
||||||
|
|
||||||
Example config:
|
Example config:
|
||||||
```lua
|
```lua
|
||||||
|
@ -31,7 +28,10 @@ parser_config.dfraw = {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
Wrap in `lua << EOF` and `EOF` to use in `init.vim`.
|
Wrap in `lua << EOF` and `EOF` to use in `init.vim`.
|
||||||
Then run `:TSInstall dfraw`.
|
Then run `:TSInstall dfraw` to install the parser.
|
||||||
|
|
||||||
|
In order for syntax highlighting to work you copy `queries/highlights.scm` file from this repo to your nvim-treesitter location `queries/dfraw/highlights.scm`.
|
||||||
|
More information can be found on the nvim-treesitter page.
|
||||||
|
|
||||||
By default it is setup to start for any file of type 'text' or 'dfraw'. If you would not like to use it for all text files you can add a custom filetype to neovim.
|
By default it is setup to start for any file of type 'text' or 'dfraw'. If you would not like to use it for all text files you can add a custom filetype to neovim.
|
||||||
Example `.config/nvim/scripts.vim`:
|
Example `.config/nvim/scripts.vim`:
|
||||||
|
|
Loading…
Reference in New Issue