Skip to content

fix(chunk): update Zig AST node names to snake_case - #189

Open
MattrHermanson wants to merge 1 commit into
shellRaining:mainfrom
MattrHermanson:main
Open

fix(chunk): update Zig AST node names to snake_case#189
MattrHermanson wants to merge 1 commit into
shellRaining:mainfrom
MattrHermanson:main

Conversation

@MattrHermanson

Copy link
Copy Markdown

What & why

Tree-sitter-zig parsers output AST node names in snake_case, but the plugin was checking for outdated PascalCase names. This PR updates the Zig node definitions so hlchunk.nvim can correctly identify and highlight code blocks (like functions, structs, and loops) in Zig files.

Changes

  • Updated node definitions in lua/hlchunk/utils/ts_node_type/zig.lua to use snake_case naming.
  • Added explicit node types for Zig structures such as function_declaration, struct_declaration, and enum_declaration to ensure accurate chunk boundary recognition.

Checklist

  • make selene && make stylua && make test passes locally
  • new behavior covered by test/features/*_spec.lua
  • user-facing change reflected in docs/en and docs/zh_CN
  • architectural change reflected in ARCHITECTURE.md / AGENTS.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant