https://github.com/oxy2dev/tree-sitter-lua_patterns
Tree-sitter parser for Lua patterns
https://github.com/oxy2dev/tree-sitter-lua_patterns
Last synced: about 1 year ago
JSON representation
Tree-sitter parser for Lua patterns
- Host: GitHub
- URL: https://github.com/oxy2dev/tree-sitter-lua_patterns
- Owner: OXY2DEV
- License: mit
- Created: 2025-02-08T15:54:44.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-29T04:52:36.000Z (about 1 year ago)
- Last Synced: 2025-04-29T05:31:13.842Z (about 1 year ago)
- Language: JavaScript
- Size: 129 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tree-sitter-lua_patterns
[![CI][ci]](https://github.com/tree-sitter/tree-sitter-lua_patterns/actions/workflows/ci.yml)
[![discord][discord]](https://discord.gg/w7nTvsVJhm)
[![matrix][matrix]](https://matrix.to/#/#tree-sitter-chat:matrix.org)
Lua patterns grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter).
[ci]: https://img.shields.io/github/actions/workflow/status/OXY2DEV/tree-sitter-lua_patterns/ci.yml?logo=github&label=CI
[discord]: https://img.shields.io/discord/1063097320771698699?logo=discord&label=discord
[matrix]: https://img.shields.io/matrix/tree-sitter-chat%3Amatrix.org?logo=matrix&label=matrix
## 📥 Installation
### 💡 nvim-treesitter
Now, put this in your `nvim-treesitter` config,
```lua
local parser_configs = require("nvim-treesitter.parsers").get_parser_configs();
parser_configs.lua_patterns = {
install_info = {
url = "https://github.com/OXY2DEV/tree-sitter-lua_patterns",
files = { "src/parser.c" },
branch = "main",
},
}
```
Now, quit & open Neovim and run this command,
```vim
:TSInstall lua_patterns
```
### 💡 manual
Copy the `lua_patterns.so` file to `~/.config/nvim/parser/`.
## 💥 Syntax highlighting
First clone this repository to your machine. I cloned it to `~/.config/nvim/parsers/nvim-treesitter-lua_patterns`.
> Or just copy the `highlights.scm` file to `~/.config/nvim/queries/lua_patterns/highlights.scm`.
To get syntax highlighting you need to copy the `queries/highlights.scm` to `~/.config/nvim/queries/lua_patterns/`.