# OpenACC tree-sitter parser

**URL:** <https://fortran-lang.discourse.group/t/openacc-tree-sitter-parser/11000>\
**Category:** Uncategorized\
**Created:** [July 10, 2026, 2:22pm UTC](https://fortran-lang.discourse.group/t/openacc-tree-sitter-parser/11000 "2026-07-10T14:22:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LoicReynier](https://avatars.discourse-cdn.com/v4/letter/l/6f9a4e/32.png) [@LoicReynier](https://fortran-lang.discourse.group/u/LoicReynier)\
**Post date:** [July 10, 2026, 2:22pm UTC](https://fortran-lang.discourse.group/t/openacc-tree-sitter-parser/11000/1 "2026-07-10T14:22:37Z")

</div>

For everyone interested, I made an experimental tree-sitter parser for OpenACC directives to provide a minimal (directive) syntax highlighting for Neovim: [GitHub - loicreynier/tree-sitter-openacc: OpenACC grammar for tree-sitter · GitHub](http://github.com/loicreynier/tree-sitter-openacc)

I chose to create an external parser rather than contribute to [`tree-sitter-fortran`](https://github.com/stadelmanma/tree-sitter-fortran) as the syntax highlighting could be used with parsers for different languages via injections.

This idea was briefly discussed in an issue on the latter’s repository: [Highlight openmp statements · Issue #164 · stadelmanma/tree-sitter-fortran · GitHub](https://github.com/stadelmanma/tree-sitter-fortran/issues/164)

---

<div class="post-metadata">

**Author:** ![certik](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/certik/32/4_2.png) [@certik](https://fortran-lang.discourse.group/u/certik)\
**Post date:** [July 11, 2026, 3:06am UTC](https://fortran-lang.discourse.group/t/openacc-tree-sitter-parser/11000/2 "2026-07-11T03:06:22Z")

</div>

@LoicReynier awesome, thanks for creating it and welcome to the forum!
