1
0
Fork 0
mirror of https://github.com/pnx/tree-sitter-dotenv synced 2026-08-19 02:08:12 +02:00

test(nvim): add minimal main/master configs

This commit is contained in:
Henrik Hautakoski 2026-07-15 08:12:20 +02:00
parent 1f5baa64dd
commit 72ea51c5a0
3 changed files with 136 additions and 0 deletions

43
test/nvim/README.md Normal file
View file

@ -0,0 +1,43 @@
# Neovim test configs
This directory contains minimal Neovim configs for testing `tree-sitter-dotenv` with both
legacy and rewritten `nvim-treesitter`.
## Files
- `init-main.lua``nvim-treesitter` `main` (new API)
- `init-master.lua``nvim-treesitter` `master` (legacy API)
## Run
From the repository root, use isolated app names so test state does not mix:
```bash
NVIM_APPNAME=ts-dotenv-main nvim -u "$(pwd)/test/nvim/init-main.lua"
NVIM_APPNAME=ts-dotenv-master nvim -u "$(pwd)/test/nvim/init-master.lua"
```
## Install parser
Run:
```vim
:TSUpdate
:TSInstall dotenv
```
## Verify
Open a `.env` file and check:
```vim
:echo &filetype
```
Expected output: `dotenv`.
### Show the syntax tree
```vim
:InspectTree
```