eonpatapon / tree-sitter-cue Goto Github PK
View Code? Open in Web Editor NEWCue grammar for tree-sitter
License: MIT License
Cue grammar for tree-sitter
License: MIT License
They shipped with the first v0.6 alpha :) https://github.com/cue-lang/cue/releases/tag/v0.6.0-alpha.1
Hi, I'd like to be a contributor/maintainer of this repo so that I can add it to upstream nvim-treesitter. It seems to be a bit dead atm, so I'll maintain a fork unless a current maintainer is active or I am added as a contributor. Let me know ๐
Thanks,
-Amaan
I'm finding that sometimes fields of the form
foo: (name): "value"
break highlighting. Highlighting will stop for a while and pick up at other parenthesized expressions. As a workaround, I've found that reverting to "old" style fields:
foo: "\(name)": "value"
works, but it's unlovely and I don't relish explaining to colleagues why that's the preferred syntax.
Hey @eonpatapon, I hope you've been well. We at nvim-treesitter (and potentially more folks from other teams interested in an ecosystem-wide effort to maintain grammars) have decided to move all of our own grammars collectively into one org, to make it easier for us all to fix bugs or keep things up to date (scanner crashes, regenerating with the latest abi, etc.) without having to rely on one sole maintainer (you).
This is 100% optional, and please don't feel pressured or feel like you have an obligation of moving the grammar to the org, but it will help everyone a lot, us at nvim-treesitter, other users downstream, to know that a grammar won't ever die should a maintainer call it quits or go MIA. We also have org-wide actions that we maintain (out of sight, out of mind for you) and a grammar template (soon for newbies) in place to ensure authors have a better experience with working on and fixing tree-sitter grammars. It also enables anyone looking to find grammars for a specific language to only have to search in one spot
Our org is here: https://github.com/tree-sitter-grammars
If you want to participate (and don't worry, you'll still have full write perms to your repo, just no admin access), that'd be great! All you have to do is transfer the repo to me in the repository settings and I'll handle it from there. Thanks a lot, and again no worries if the answer is no!
Hello,
thanks for writing this plugin, I have a question, I installed this tree-sitter plugin following your instructions but highlighting doesn't seem to work, according to TSModuleInfo
:
>> default autotag context_commentstring highlight incremental_selection indent rainbow
...
cue โ โ โ โ โ โ
...
>> textobjects lsp_interop move select swap
...
cue โ โ โ โ
...
Thanks!
The parser consider only raw strings of the form # ... #
but cue spec allows to use multiple #
to define a raw string.
I noticed that when I inspect the s-expression view of tree-sitter parse, before a top-level struct and before each field in a struct I see the tag "alias". For the following input file, I see the output that follows:
{
id: 1
}
alias:
(struct_lit {
alias:
(field
(label (identifier))
:
(value (number)))
})
What do the "alias:" lines mean there on the first and third lines? Is that tree-sitter indicating that an optional identifier and following =
character are acceptable there but absent?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.