3 releases (stable)

1.4.0 Dec 8, 2025
1.3.0 May 27, 2025
0.0.1 May 27, 2025

#475 in Parser implementations

Download history 6276/week @ 2026-06-28 5206/week @ 2026-07-05 7738/week @ 2026-07-12 13349/week @ 2026-07-19 13673/week @ 2026-07-26 11595/week @ 2026-08-02 14487/week @ 2026-08-09 13578/week @ 2026-08-16 17586/week @ 2026-08-23 20918/week @ 2026-08-30 19798/week @ 2026-09-06 17237/week @ 2026-09-13 19116/week @ 2026-09-20 21856/week @ 2026-09-27 18830/week @ 2026-10-04

62,559 downloads per month
Used in 34 crates (19 directly)

Apache-2.0

34KB
965 lines

tree-sitter-ini

This grammar implements the INI format.

Overview

Example INI file:

[section 1]
some_key = some_value
another-key = another value

[another section]
# Keys may contain whitespace.
key 1 = value 1
# Value may be empty.
key_2 =

See test/corpus/ for more examples.

Notes

  • Section name must appear on a line by itself.
  • Equals sign (=) and semicolon (;) are reserved characters and cannot appear in the key. Any whitespace surrounding the key is stripped.
  • Comments (; or #) must start at column 1. Trailing comments are not supported yet. #13
  • Duplicate names are not checked.
  • Line continuations (\) are not supported.
  • setting_value includes whitespace. #3. Should values exclude surrounding whitespace?
  • Quoted keys/values are not supported yet.
  • Escape sequences are not supported.

Reference

Release

Steps to perform a release:

  1. Bump and tag the version (choose patch/minor/major as appropriate).
    npm version patch -m "release %s"
    
  2. Bump to prerelease, without creating a tag .
    npm version --no-git-tag-version prerelease --preid dev && git add package*.json && git commit -m bump
    
  3. Push.
    git push --follow-tags
    
  4. Release the tagged commit: https://github.com/justinmk/tree-sitter-ini/releases/new

Dependencies

~5–330KB