https://github.com/nvim-treesitter/nvim-treesitter/issues/87...
Could you possibly chime into that discussion and help them with any possible insights you might have on that? That would be really awesome! TIA <3
[1] https://github.com/tree-sitter/tree-sitter/tree/master/lib/s...
I agree about the Objective-C grammar! Although it looks like somebody's started work on it:
Would tree-sitter be able to be used for that? (What I want is to feed tree-sitter a stream of keystroke changes and get out a stream of minimal AST changes as a result).
I was wondering if this is a case I could open an issue about? Is this for the main tree sitter repo or should I open one language-by-language?
I was looking into automating some stuff across all languages with tree-sitter but handling all of the languages comments syntaxes made it very hard.
Are you talking about conventions like JSDoc, for putting structured data inside of comments? On GitHub, we handle that by parsing JSDoc comments in a separate pass, using a separate parser. We do it this way because JSDoc isn't really part of the JavaScript language, not all projects use JSDoc, and not all applications are interested in parsing the text inside of comments.
/* This comment
* Should just be alphanumeric.
*/ /* Something */
or { Something }
into: " Something "
Or, even better, into: "Something"So, I would say that it's not on our near-term roadmap.
exec_wasm(generate_wasm(generate_c(grammar)))
Now if you can make that whole fn chain incremental, then a delta_grammar -> delta_c -> delta_wasm -> delta_recomputed_wasm_call stack, this will propagate deltas down to exec_wasm and you could dynamically execute the generated code as the grammar changes.
Edit: sorry, I just saw that you had answered that below.
In the near future, we'll create some more GitHub-specific documentation that walks you through how to add advanced language support for any programming language on GitHub, by writing a Tree-sitter grammar, and then by writing the tree queries that are used for syntax highlighting, simple code navigation, and someday soon... precise code navigation.