The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning. Learn more →
Top 20 C tree-sitter Projects
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
The markdown treesitter grammar accepts environment variables when building to tweak it's behavior. How can I pass these? Currently I am using
Project mention: Ask HN: What are some unpopular technologies you wish people knew more about? | news.ycombinator.com | 2023-12-02(1) Zulip Chat - https://zulip.com/ - seems to be reasonably popular, but more people should know about it
I’ve been using it for over 5 years now [1], and it’s as good as ever. It’s way faster than any other chat app I’ve used. It has a good UI and conversation model. It has a simple and functional API that lets me curl threads and write blog posts based on them.
(only problem is that I Ctrl-+ in my browser to make the font bigger – I think it’s too dense for most people)
(2) re2c regex to state machine compiler - https://re2c.org
A gem from the 90’s, which people have done a great job maintaining and improving (getting Go and Rust target support in the last few years). I started using it in 2016, and used for a new program a few months ago. I came to the conclusion that it should have been built into C, because C has shitty string processing – and Ken Thompson both invented C AND brought regular languages to computing !!
In comparison, treesitter lexers are very low level, fiddly, and error prone. I recently saw dozens of ad hoc fixes to the tree-sitter-bash lexer, which is unsurprising if you look at the structure of the code (manually crawling through backslashes and braces in C).
https://github.com/tree-sitter/tree-sitter-bash/blob/master/...
These fixes are definitely appreciated, but I think it indicates a problem with the model itself.
(based on https://lobste.rs/s/endspx/software_you_are_thankful_for#c_y...)
[1] https://www.oilshell.org/blog/2018/04/26.html
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.
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))
I followed the instructions for https://github.com/ngalaiko/tree-sitter-go-template and replaced `yml` injection with `html` injection.
Project mention: Difftastic, a structural diff tool that understands syntax | news.ycombinator.com | 2024-03-21That may require a tree-sitter implementation for erb templated html; it may exist but if so it's less of a mainstream thing.
Some quick googling turns up https://github.com/tree-sitter/tree-sitter-embedded-template which may or may not meet your needs.
Tree sitter for syntax highlighting on editors such as neovim that support it - ecsact-dev/tree-sitter-ecsact
C tree-sitter related posts
- Linus Torvalds adds arbitrary tabs to kernel code
- Tree-Sitter
- How to pass environment variables to treesitter grammar
- adding go html template highlight in lazyvim
- what terminal editor was intended to replace emacs in macOS with emacs bindings?
- Custom Grammar not recognized as Highlighting
- K8s Treesitter Module
-
A note from our sponsor - WorkOS
workos.com | 26 Apr 2024
Index
What are some of the best open-source tree-sitter projects in C? This list will help you:
Project | Stars | |
---|---|---|
1 | go-tree-sitter | 359 |
2 | tree-sitter-markdown | 355 |
3 | tree-sitter-bash | 187 |
4 | tree-sitter-php | 131 |
5 | tree-sitter-comment | 122 |
6 | tree-sitter-html | 117 |
7 | tree-sitter-go-template | 60 |
8 | tree-sitter-tlaplus | 52 |
9 | tree-sitter-elisp | 52 |
10 | tree-sitter-embedded-template | 51 |
11 | tree-sitter-gitcommit | 49 |
12 | tree-sitter-twig | 35 |
13 | tree-sitter-fish | 27 |
14 | tree-sitter-racket | 27 |
15 | grove | 15 |
16 | tree-sitter-rasi | 7 |
17 | tree-sitter-formula | 3 |
18 | tree-sitter-xml | 2 |
19 | tree-sitter-visitor | 1 |
20 | tree-sitter-ecsact | 0 |
Sponsored