writing.exchange is one of the many independent Mastodon servers you can use to participate in the fediverse.
A small, intentional community for poets, authors, and every kind of writer.

Administered by:

Server stats:

324
active users

#treesitter

0 posts0 participants0 posts today
robinm<p><span class="h-card" translate="no"><a href="https://mamot.fr/@mdk" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>mdk</span></a></span> I'm using [mergiraf](mergiraf.org/) since about 2 months. It's has much fewer false positive than the default line based merge algorithm, but a bit more false negative. It does use tree sitter to compare and merge, a bit like what [difftastic](difftastic.wilfred.me.uk/) does for diffing files.</p><p><a href="https://fosstodon.org/tags/treesitter" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>treesitter</span></a> <a href="https://fosstodon.org/tags/mergiraf" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>mergiraf</span></a> <a href="https://fosstodon.org/tags/difftastic" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>difftastic</span></a></p>
shom ✊🏽🐧📷🤿🏔️🪚<p>Hey language/IDE nerds, check out <a href="https://bablr.org/" rel="nofollow noopener noreferrer" target="_blank">Bablr-lang</a> by <span class="h-card"><a href="https://fosstodon.org/@stirlhoss" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>stirlhoss</span></a></span>, I resonate with the mission</p><blockquote><p>The BABLR organization's mission is to build a new ecosystem of next-generation developer tools to radically raise computer code literacy around the world. It aims to do this by creating a common "math-y" system for representing code to that unlocks new coding workflows for all developers while changing the way that language and tooling authors collaborate to deliver rich IDE functionality.</p></blockquote><p>A lot of the specifics are a beyond my pay-grade but <a href="https://gts.shom.dev/tags/lsp" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>LSP</span></a> and <a href="https://gts.shom.dev/tags/treesitter" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>treesitter</span></a> have really moved the needle in this space and I think innovation is better than a mono-culture. Love that people are making cool things, <a href="https://gts.shom.dev/tags/bablr" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>bablr</span></a>!</p>
razzlom is always sad<p><span>Do tree-sitter works out of the box in Emacs 30 or I need configure something?<br><br></span><a href="https://quietplace.xyz/tags/Emacs" rel="nofollow noopener noreferrer" target="_blank">#Emacs</a> <a href="https://quietplace.xyz/tags/TreeSitter" rel="nofollow noopener noreferrer" target="_blank">#TreeSitter</a></p>
Bozhidar Batsov (a.k.a. Bug)<p>With <a href="https://hachyderm.io/tags/Emacs" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Emacs</span></a> 30 recently released I finally felt that the time has come to go all in on <a href="https://hachyderm.io/tags/TreeSitter" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>TreeSitter</span></a>. (I am rarely an early adopter of anything these days) Over the weekend I had a lot of fun playing with TreeSitter and I started a prototype of an <a href="https://hachyderm.io/tags/OCaml" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>OCaml</span></a> major mode using it <a href="https://github.com/bbatsov/neocaml" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/bbatsov/neocaml</span><span class="invisible"></span></a></p>
SallyABL<p>View from tonight's sunset walk in Canberra. </p><p><a href="https://aus.social/tags/Sunset" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Sunset</span></a> <a href="https://aus.social/tags/TreetrunkTuesday" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>TreetrunkTuesday</span></a> <a href="https://aus.social/tags/Nature" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Nature</span></a> <a href="https://aus.social/tags/Photography" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Photography</span></a> <a href="https://aus.social/tags/PhotoOfTheDay" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>PhotoOfTheDay</span></a> <a href="https://aus.social/tags/Bushland" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Bushland</span></a> <a href="https://aus.social/tags/Landscape" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Landscape</span></a> <a href="https://aus.social/tags/treesitter" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>treesitter</span></a> </p><p><span class="h-card" translate="no"><a href="https://fuzzies.wtf/@altbot" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>altbot</span></a></span></p>
Floris Bruynooghe<p>I'm so glad <a href="https://mastodon.social/tags/treesitter" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>treesitter</span></a> didn't end up using JSON-RPC for the library API. (Dear <a href="https://mastodon.social/tags/lsp" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>lsp</span></a>... wtf)</p>
Programming Languages Delft<p>Master thesis by Hendy Liang: "Property-Based ASTs: Enabling Language Parametricity in Refactoring Tools"</p><p>"By leveraging Tree-Sitter, a parser generator that creates parsers that produce generic, property-based ASTs, this research adapts Renaissance, an existing industrial refactoring tool, to support multi-language extensibility with minimal additional effort."</p><p><a href="https://repository.tudelft.nl/record/uuid:6e143a35-32b8-4f7e-928e-52057ea57566" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">repository.tudelft.nl/record/u</span><span class="invisible">uid:6e143a35-32b8-4f7e-928e-52057ea57566</span></a></p><p><a href="https://akademienl.social/tags/LanguageParametricity" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>LanguageParametricity</span></a> <a href="https://akademienl.social/tags/refactoring" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>refactoring</span></a> <a href="https://akademienl.social/tags/treesitter" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>treesitter</span></a> <a href="https://akademienl.social/tags/thesis" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>thesis</span></a></p>
aemogie<p>now idk how concurrency or multithreading the text editor works with this. but all im doing is changing what amounts to the "calling convention" so i doubt much would change from whatever traditional constructs the language provides. it's not really actor model anymore if i enforce that all actors are synchronous. it's only asynchronous is if you make it. something like that, i just dont wanna bother implementing a message queue and some thread safe concurrent message distribution mechanism and whatever else.</p><p>i didnt need actor models, i just need a global vtable. plus, if the implementation allows for it, it might potentially be possible to make it just inline the lookups at compile time if i can guarantee that no dynamic dispatch is necessary. maybe. havent thought about it much.</p><p>might go back to my <a href="https://tech.lgbt/tags/rustlang" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>rustlang</span></a> arc. iirc <a href="https://tech.lgbt/tags/treesitter" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>treesitter</span></a> also has upstream rust bindings iirc, which is always a good sign. plus theres quite a bit of text editors to use as reference too. i just dont want to write C.</p>
Antonin Delpeuch<p>I am looking into starting an organization for collective maintenance of <a href="https://mamot.fr/tags/treesitter" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>treesitter</span></a> grammars, in the spirit of <span class="h-card" translate="no"><a href="https://fosstodon.org/@jazzband" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>jazzband</span></a></span>. Would anyone be interested in joining?<br>If anyone has insights about how <a href="https://mamot.fr/tags/jazzband" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>jazzband</span></a> (or similar) has been doing, I am also keen to learn more.</p>
aemogie<p>i've only ever seen proper structural editing with lisps. in emacs you have things like paredit. and i get it, parsing lisp is trivial, text wrapped in pairs of parantheses are your parse nodes. but we have treesitter. we can do so much more.</p><p>i could just write code and not care about syntax at all. i shouldn't ever have to fight it. and my editor should be a parse tree editor, not a text editor. text just isn't my interface most of the time. if i'm writing prose, maybe. but usually, i'm not.</p><p>when i hit <code>w</code> in vim style binds often mean to go to the next sibling node. but i'm having to spam that and some amount of <code>h</code> or <code>l</code> to get to where i want to go. when writing code i don't think in words or characters. when i hit <code>j</code> i often mean to go to the next statement or expression.</p><p><a href="https://tech.lgbt/tags/lisp" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>lisp</span></a> <a href="https://tech.lgbt/tags/paredit" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>paredit</span></a> <a href="https://tech.lgbt/tags/emacs" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>emacs</span></a> <a href="https://tech.lgbt/tags/vim" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>vim</span></a> <a href="https://tech.lgbt/tags/treesitter" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>treesitter</span></a></p>
aemogie<p>and most of these modern text editors have the parse trees, for syntax highlighting. treesitter supports how many languages, now?</p><p>why dont they leverage the already existing infrastructure? no extra dependencies to be added or anything. just use what you already bring in, but better.</p><p>theres already selection that leverages treesitter in most editors. im not sure of neovim, but in helix it's built-in with alt-o, and in emacs you can use the expreg package (i think that's what it's called). but why is that all we have? and it's in addition to the existing selection, not in-place of it. why don't we have similar things for the other editing ui, like navigation, deletion, copy, cut, etc.</p><p>i think i know, and i believe it's because selection is the only thing that's been way too painful with traditional line based or word based selection. it's imprecise, cumbersome, and just overall painful. but everything else, it's just okay enough that people are fine with it.</p><p><a href="https://tech.lgbt/tags/treesitter" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>treesitter</span></a> <a href="https://tech.lgbt/tags/structuralediting" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>structuralediting</span></a></p>
Space Hobo<p>EDIT: I am not looking to set up TreeSitter on neovim. I have that working fine, but only for bog standard 2024 syntax like awk or C or Makefiles. I want a *new* syntax definition for an old assembler that targets 12-bit minicomputers from the 1960s.</p><p>Hey, are there any <a href="https://teh.entar.net/tags/NeoVim" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>NeoVim</span></a> nerds here who can help folks with slightly older versions? I have a goal of "don't make my vi installation a full-time job" and I'm doing a lot of <a href="https://teh.entar.net/tags/PDP8" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>PDP8</span></a> assembly in PAL. I can supply a <a href="https://teh.entar.net/tags/Kate" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Kate</span></a> syntax file that does well enough (I use it for <a href="https://teh.entar.net/tags/pandoc" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>pandoc</span></a>), but I need a <a href="https://teh.entar.net/tags/TreeSitter" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>TreeSitter</span></a> syntax wotsit that I can just Install without having to upgrade NeoVim or TreeSitter past what's in Debian (this is non-negotiable: anything else has always become a full-time job for me).</p><p>All the TreeSitter tutorials say to use an init command that doesn't exist in my copy, and I lost patience right then. The architecture makes it seem like this is only a pain for setting up a new project, but I don't have the attention to devote to this. I'd also like it if PAL8 syntax made it into whatever mainstream syntax repositories TS grabs from.</p>
Antonin Delpeuch<p>New blog post: <a href="https://mergiraf.org" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">mergiraf.org</span><span class="invisible"></span></a>, a syntax-aware merge driver for <a href="https://mamot.fr/tags/Git" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Git</span></a>.</p><p>Supports <a href="https://mamot.fr/tags/Java" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Java</span></a>, <a href="https://mamot.fr/tags/Rust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Rust</span></a>, <a href="https://mamot.fr/tags/Golang" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Golang</span></a>, <a href="https://mamot.fr/tags/javascript" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>javascript</span></a>, <a href="https://mamot.fr/tags/cpp" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>cpp</span></a>, <a href="https://mamot.fr/tags/csharp" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>csharp</span></a>, <a href="https://mamot.fr/tags/html" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>html</span></a>, <a href="https://mamot.fr/tags/json" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>json</span></a>, <a href="https://mamot.fr/tags/yaml" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>yaml</span></a> and <a href="https://mamot.fr/tags/xml" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>xml</span></a> so far, and it's quite easy to add support for more thanks to <a href="https://mamot.fr/tags/treesitter" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>treesitter</span></a>.</p><p><a href="https://antonin.delpeuch.eu/posts/mergiraf-a-syntax-aware-merge-driver-for-git/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">antonin.delpeuch.eu/posts/merg</span><span class="invisible">iraf-a-syntax-aware-merge-driver-for-git/</span></a></p><p>Get it on <a href="https://mamot.fr/tags/Codeberg" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Codeberg</span></a>: <a href="https://codeberg.org/mergiraf/mergiraf" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">codeberg.org/mergiraf/mergiraf</span><span class="invisible"></span></a></p>
Bharath M. Palavalli<p>Pfft, <a href="https://mastodon.sdf.org/tags/eglot" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>eglot</span></a> broke again, does anyone have a simple way to set it up with <a href="https://mastodon.sdf.org/tags/treesitter" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>treesitter</span></a> for <a href="https://mastodon.sdf.org/tags/emacs" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>emacs</span></a>? I just haven’t been able to figure out how to set it up without it breaking on me often. I mostly need it for R, Shell, Python, LaTeX, and Go.</p>
musicmatze :rust: :nixos:<p>I started playing with <a href="https://social.linux.pizza/tags/typst" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>typst</span></a> and so far I like it.</p><p>I do not have a usecase right now, but that might change in the future... So I build a template for a paper that I can build with nix and also did some setup for my <a href="https://social.linux.pizza/tags/neovim" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>neovim</span></a> with <a href="https://social.linux.pizza/tags/treesitter" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>treesitter</span></a> for typst.</p><p>(For reference: <a href="https://github.com/matthiasbeyer/typst-template-paper" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/matthiasbeyer/typst</span><span class="invisible">-template-paper</span></a> )</p>
Filip 🌱 🦀<p>Anyone knows how to get <a href="https://infosec.exchange/tags/treeSitter" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>treeSitter</span></a> <a href="https://infosec.exchange/tags/rust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>rust</span></a> to compile for wasm32-unknown-unknown in an easy manner? So far all I have seen is waaaay to much too maintain for a small basically throwaway tool Im writing.</p><p><a href="https://infosec.exchange/tags/WASM" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>WASM</span></a> <a href="https://infosec.exchange/tags/RustLang" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>RustLang</span></a> <a href="https://infosec.exchange/tags/WebAssembly" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>WebAssembly</span></a></p>
bram dingelstad :nb_flag:<p>yoo, shout out to wldmr on github that made an <a href="https://gamedev.lgbt/tags/Ink" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Ink</span></a> <a href="https://gamedev.lgbt/tags/treesitter" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>treesitter</span></a> implementation</p><p>i know have super neat syntax highlighting on <a href="https://gamedev.lgbt/tags/HelixEditor" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>HelixEditor</span></a> ✨<br><a href="https://github.com/wldmr/tree-sitter-ink/tree/main" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/wldmr/tree-sitter-i</span><span class="invisible">nk/tree/main</span></a></p>
Michael Henriksen<p>I've just opened a PR on the tree-sitter-svelte grammar project, which resolves the annoying issue where syntax highlighting b0rks when HTML tags contain periods like `&lt;Card.Root&gt;`.</p><p>Hopefully, it will be merged soon 🤞 </p><p><a href="https://github.com/tree-sitter-grammars/tree-sitter-svelte/pull/4" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/tree-sitter-grammar</span><span class="invisible">s/tree-sitter-svelte/pull/4</span></a></p><p><a href="https://chaos.social/tags/Neovim" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Neovim</span></a> <a href="https://chaos.social/tags/Svelte" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Svelte</span></a> <a href="https://chaos.social/tags/TreeSitter" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>TreeSitter</span></a></p>
Christian Tietze<p>Building the Zed Text Editor (with Nathan Sobo) <a href="https://www.youtube.com/watch?v=fV4aPy1bmY0" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">youtube.com/watch?v=fV4aPy1bmY</span><span class="invisible">0</span></a></p><p>I don't know how <span class="h-card" translate="no"><a href="https://mastodon.social/@krisajenkins" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>krisajenkins</span></a></span> does it, but I believe this is my favorite interview podcast, period.</p><p>This time, it's about <a href="https://mastodon.social/tags/Rustlang" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Rustlang</span></a> and the <a href="https://mastodon.social/tags/Zed" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Zed</span></a> editor, <a href="https://mastodon.social/tags/treesitter" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>treesitter</span></a> and <a href="https://mastodon.social/tags/lsp" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>lsp</span></a>, and most importantly (for me): data structures for a modern editor! <a href="https://mastodon.social/tags/CRDT" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CRDT</span></a>'s and stuff.</p>
petrisch<p>Just wrote a new blogpost to not forget how my setup works.<br>No really, no need to read it, its just me rambling about how AWESOME, the foss community is.</p><p>On todays take <a href="https://social.librem.one/tags/neovim" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>neovim</span></a> <a href="https://social.librem.one/tags/treesitter" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>treesitter</span></a> <a href="https://social.librem.one/tags/nushell" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>nushell</span></a>.<br>There should be a <a href="https://social.librem.one/tags/vimday" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>vimday</span></a> or something to appreciate this lovely piece of software.</p><p>So here it is: <a href="https://petrisch.codeberg.page/blog/love-for-neovim/" rel="nofollow noopener noreferrer" target="_blank"><span class="invisible">https://</span><span class="ellipsis">petrisch.codeberg.page/blog/lo</span><span class="invisible">ve-for-neovim/</span></a></p>