C tree-sitter

Open-source C projects categorized as tree-sitter

Top 19 C tree-sitter Projects

  • tree-sitter-markdown

    A markdown grammar for tree-sitter

    Project mention: How to pass environment variables to treesitter grammar | /r/NixOS | 2023-07-27

    The markdown treesitter grammar accepts environment variables when building to tweak it's behavior. How can I pass these? Currently I am using

  • go-tree-sitter

    Golang bindings for tree-sitter https://github.com/tree-sitter/tree-sitter

  • SonarLint

    Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.

  • tree-sitter-bash

    Bash grammar for tree-sitter

    Project mention: Emacs and Java Development: Corfu + Cape + LSP-Mode + Treesit | /r/emacs | 2023-05-19

    (use-package treesit :ensure nil :custom ;; Some stuff taken from here: https://robbmann.io/posts/emacs-treesit-auto/ (treesit-extra-load-path '("/usr/lib64/")) (treesit-language-source-alist '((bash . ("https://github.com/tree-sitter/tree-sitter-bash")) (c . ("https://github.com/tree-sitter/tree-sitter-c")) (c++ . ("https://github.com/tree-sitter/tree-sitter-cpp")) (csharp . ("https://github.com/tree-sitter/tree-sitter-c-sharp")) (css . ("https://github.com/tree-sitter/tree-sitter-css")) (elixir ("https://github.com/elixir-lang/tree-sitter-elixir")) (html . ("https://github.com/tree-sitter/tree-sitter-html")) (java . ("https://github.com/tree-sitter/tree-sitter-java")) (javascript . ("https://github.com/tree-sitter/tree-sitter-javascript")) (json . ("https://github.com/tree-sitter/tree-sitter-json")) (lua . ("https://github.com/Azganoth/tree-sitter-lua")) (makefile . ("https://github.com/alemuller/tree-sitter-make")) (org . ("https://github.com/milisims/tree-sitter-org")) (python . ("https://github.com/tree-sitter/tree-sitter-python")) (tsx . ("https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src")) (typescript . ("https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src")) (ruby . ("https://github.com/tree-sitter/tree-sitter-ruby")) (rust . ("https://github.com/tree-sitter/tree-sitter-rust")) (sql . ("https://github.com/m-novikov/tree-sitter-sql")) (toml . ("https://github.com/tree-sitter/tree-sitter-toml")) (yaml . ("https://github.com/ikatyang/tree-sitter-yaml")))) (major-mode-remap-alist '((c-mode . c-ts-mode) (c++-mode . c++-ts-mode) (csharp-mode . csharp-ts-mode) (css-mode . css-ts-mode) (html-mode . html-ts-mode) (java-mode . java-ts-mode) (js-mode . js-ts-mode) (json-mode . json-ts-mode) (makefile-mode . makefile-ts-mode) ;; (org-mode . org-ts-mode) ;; not mature yet (python-mode . python-ts-mode) (typescript-mode . typescript-ts-mode) (ruby-mode . ruby-ts-mode) (rust-mode . rust-ts-mode) (toml-mode . toml-ts-mode) (yaml-mode . yaml-ts-mode))) (treesit-auto-fallback-alist '((toml-ts-mode . conf-toml-mode) (typescript-ts-mode . nil) (tsx-ts-mode . nil))) (treesit-font-lock-settings t) (treesit-simple-indent t) (treesit-defun-type-regexp t)) (use-package treesit-auto :demand t :config (setq treesit-auto-install t) (global-treesit-auto-mode))

  • tree-sitter-comment

    Tree-sitter grammar for comment tags like TODO, FIXME(user).

    Project mention: Documentation Comment highlighting with TreeSitter | /r/neovim | 2023-05-13

    As far as I know there is currently no treesitter parser for Doxygen style comments. There is a language agnostic comment parser that is supported by nvim-treesitter that will highlight things like TODO: and NOTE: in comments. Until this recent commit nvim-treesitter provided a query for this parser that highlighted @ text in comments. It was meant to highlight a reference to a user but it doubled as a doxygen tag highlight for me for a while. I just noticed that this query has been removed and I'm not sure why but you can add it as a custom query in your Neovim config. I have yet to try this so you'll have to refer to the Neovim treesitter docs for where to add the query.

  • tree-sitter-html

    HTML grammar for Tree-sitter

    Project mention: Emacs and Java Development: Corfu + Cape + LSP-Mode + Treesit | /r/emacs | 2023-05-19

    (use-package treesit :ensure nil :custom ;; Some stuff taken from here: https://robbmann.io/posts/emacs-treesit-auto/ (treesit-extra-load-path '("/usr/lib64/")) (treesit-language-source-alist '((bash . ("https://github.com/tree-sitter/tree-sitter-bash")) (c . ("https://github.com/tree-sitter/tree-sitter-c")) (c++ . ("https://github.com/tree-sitter/tree-sitter-cpp")) (csharp . ("https://github.com/tree-sitter/tree-sitter-c-sharp")) (css . ("https://github.com/tree-sitter/tree-sitter-css")) (elixir ("https://github.com/elixir-lang/tree-sitter-elixir")) (html . ("https://github.com/tree-sitter/tree-sitter-html")) (java . ("https://github.com/tree-sitter/tree-sitter-java")) (javascript . ("https://github.com/tree-sitter/tree-sitter-javascript")) (json . ("https://github.com/tree-sitter/tree-sitter-json")) (lua . ("https://github.com/Azganoth/tree-sitter-lua")) (makefile . ("https://github.com/alemuller/tree-sitter-make")) (org . ("https://github.com/milisims/tree-sitter-org")) (python . ("https://github.com/tree-sitter/tree-sitter-python")) (tsx . ("https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src")) (typescript . ("https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src")) (ruby . ("https://github.com/tree-sitter/tree-sitter-ruby")) (rust . ("https://github.com/tree-sitter/tree-sitter-rust")) (sql . ("https://github.com/m-novikov/tree-sitter-sql")) (toml . ("https://github.com/tree-sitter/tree-sitter-toml")) (yaml . ("https://github.com/ikatyang/tree-sitter-yaml")))) (major-mode-remap-alist '((c-mode . c-ts-mode) (c++-mode . c++-ts-mode) (csharp-mode . csharp-ts-mode) (css-mode . css-ts-mode) (html-mode . html-ts-mode) (java-mode . java-ts-mode) (js-mode . js-ts-mode) (json-mode . json-ts-mode) (makefile-mode . makefile-ts-mode) ;; (org-mode . org-ts-mode) ;; not mature yet (python-mode . python-ts-mode) (typescript-mode . typescript-ts-mode) (ruby-mode . ruby-ts-mode) (rust-mode . rust-ts-mode) (toml-mode . toml-ts-mode) (yaml-mode . yaml-ts-mode))) (treesit-auto-fallback-alist '((toml-ts-mode . conf-toml-mode) (typescript-ts-mode . nil) (tsx-ts-mode . nil))) (treesit-font-lock-settings t) (treesit-simple-indent t) (treesit-defun-type-regexp t)) (use-package treesit-auto :demand t :config (setq treesit-auto-install t) (global-treesit-auto-mode))

  • tree-sitter-tlaplus

    A tree-sitter grammar for TLA⁺ and PlusCal

    Project mention: Writing a TLA⁺ tree-sitter grammar: my foray into free software | news.ycombinator.com | 2023-01-12

    Not an emacs person myself (yet!) - Carl Thuringer created tla-mode that apparently uses the grammar: https://github.com/carlthuringer/tla-mode

    Haven't tested it out myself. Happy to take any PRs if emacs needs its own set of query files; they would live in https://github.com/tlaplus-community/tree-sitter-tlaplus/tre... and they can be added to CI runs to ensure they stay in sync with changes to the parser.

  • tree-sitter-gitcommit

    A tree-sitter grammar for gitcommit messages

    Project mention: gitcommit tree-sitter parser for neovim looking for testers :) | /r/neovim | 2022-11-20
  • InfluxDB

    Collect and Analyze Billions of Data Points in Real Time. Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.

  • tree-sitter-elisp

    tree-sitter grammar for emacs lisp

    Project mention: RMS – EmacsConf Talk | news.ycombinator.com | 2022-12-06

    Here is the tree-sitter grammar of Elisp:

    https://github.com/Wilfred/tree-sitter-elisp/blob/main/gramm... (approx. 200 lines)

    and here is the grammar of JavaScript:

    https://github.com/tree-sitter/tree-sitter-javascript/blob/m... (approx. 1200 lines)

    JavaScript evolved into a language of similar complexity as Perl 5 (the corresponding tree sitter syntax table counts almost 2000 lines, currently).

  • tree-sitter-embedded-template

    Tree-sitter grammar for embedded template languages like ERB, EJS

  • tree-sitter-go-template

    Golang template grammar for tree-sitter

    Project mention: adding go html template highlight in lazyvim | /r/neovim | 2023-06-19

    I followed the instructions for https://github.com/ngalaiko/tree-sitter-go-template and replaced `yml` injection with `html` injection.

  • tree-sitter-twig

    Twig grammar for Tree-sitter

  • tree-sitter-cmake

    A Tree-sitter parser for CMake

    Project mention: Increased startup time when opening CMakeLists.txt with treesitter highlight | /r/neovim | 2023-06-07
  • tree-sitter-racket

    Racket grammar for tree-sitter

  • tree-sitter-fish

    Fish grammar for tree-sitter

  • grove

    Universal AST parser built on Tree-sitter (by mintlify)

  • tree-sitter-rasi

    RASI grammar for tree-sitter

  • tree-sitter-formula

    Formula grammar for tree-sitter

  • tree-sitter-xml

    XML Grammar for Tree-Sitter

    Project mention: Custom Grammar not recognized as Highlighting | /r/neovim | 2023-03-29

    parser_config.xml = { install_info = { url = "https://github.com/RenjiSann/tree-sitter-xml", -- local path or git repo files = { "src/parser.c" }, branch = "main", generate_requires_npm = false, requires_generate_from_grammar = false, }, filetype = "xml", }

  • tree-sitter-visitor

    Procedural macro for generating a visitor trait for Tree Sitter Rust bindings

  • Mergify

    Updating dependencies is time-consuming.. Solutions like Dependabot or Renovate update but don't merge dependencies. You need to do it manually while it could be fully automated! Add a Merge Queue to your workflow and stop caring about PR management & merging. Try Mergify for free.

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2023-07-27.

C tree-sitter related posts

Index

What are some of the best open-source tree-sitter projects in C? This list will help you:

Project Stars
1 tree-sitter-markdown 282
2 go-tree-sitter 257
3 tree-sitter-bash 161
4 tree-sitter-comment 109
5 tree-sitter-html 96
6 tree-sitter-tlaplus 47
7 tree-sitter-gitcommit 45
8 tree-sitter-elisp 44
9 tree-sitter-embedded-template 44
10 tree-sitter-go-template 37
11 tree-sitter-twig 28
12 tree-sitter-cmake 28
13 tree-sitter-racket 27
14 tree-sitter-fish 25
15 grove 15
16 tree-sitter-rasi 5
17 tree-sitter-formula 3
18 tree-sitter-xml 1
19 tree-sitter-visitor 1
Updating dependencies is time-consuming.
Solutions like Dependabot or Renovate update but don't merge dependencies. You need to do it manually while it could be fully automated! Add a Merge Queue to your workflow and stop caring about PR management & merging. Try Mergify for free.
blog.mergify.com