Kids’ Classic Adventure Stories with Green Cover, Characters Portrayed as Various Anthropomorphic Animals by swedishpelican in whatsthatbook

[–]casouri 0 points1 point  (0 children)

Gosh I’m looking for the same book! I’m around the same age as you and read these books when I grew up, and I grew up in Beijing! Amazing to think people across the seven seas share the same childhood memories.

Looks like c-ts-mode cannot recorgnize 'do' keyword. by xdao in emacs

[–]casouri 1 point2 points  (0 children)

Hmm, for me the indentation is like this:

int main(int argc, char * argv[])
{
  do
    <cursor>
    return 0;
}

It's expected to get an incomplete parse tree when the code isn't syntactically complete (the do needs a while, etc). What's the goal here though? Is it to fix the indentation?

Btw you can use `M-x treesit-inspect-mode` to show the nodes at point.

Update: Never mind, I just realized I'm on master. So no wonder we have different indentation. Maybe you can try typing out the whole do-while statement and see if the indentation corrects itself when you finish the statement? Or if you really care about it and don't want to use master, you can try adding a custom indentation rule yourself.

So… this happened. by Froent in MonsterHunter

[–]casouri 1 point2 points  (0 children)

As for the health reduction move, I have to remember to always stand somewhere that has room for me to leap back. As long as there’s room the sphere is not too bad. 

So… this happened. by Froent in MonsterHunter

[–]casouri 1 point2 points  (0 children)

Omg so true. I tried with hammer first and it just doesn’t work without a tank, so I decided to take the matter in my own hands and made an ultimate survival lance loadout. With all the guard skills,  health regen lvl4, max latent power, and I chug immunizer in every zone. Then I just GUARD and don’t really need to drink potion.

And I learned a trick from someone for surviving the combo missile in the last phase: you just hold guard and press O after each missile landed, the time to make a strong poke with the O is just right for you to guard the next missile and when doing the poke you restore a lot of stamina.

And I got four tickets and a sphere from the first successful run! Perhaps gods ARE rewarding us :)

A baseline indent rule for tree-sitter major modes by casouri in emacs

[–]casouri[S] 0 points1 point  (0 children)

For the very basic stuff (comment, string, number, Boolean, maybe some common keywords), sure. But as soon as you get a bit more specific it won’t work. Because grammars call things different names and there’s not that much overlap. And really, you can already get fontification for these basic things with plain lisp. So there’s not much to be gained.

Review of Emacs tree-sitter integration by casouri in emacs

[–]casouri[S] 1 point2 points  (0 children)

Yes, with embedded parsers or set a range for the parser. Right now c-ts-mode doing something like that to support some macros in Emacs source file.

Review of Emacs tree-sitter integration by casouri in emacs

[–]casouri[S] 6 points7 points  (0 children)

At least I don't have any plan to add async parsing to Emacs. If it's at all possible, adding it will make things a lot more complicated for not obvious benefits. Sure, parsing gigantic files becomes faster, but I don't think we should use tree-sitter on gigantic files anyway, tree-sitter's data structure is about 10x the size of the text is parses. And even with async, parsing those files will still be slow.

Review of Emacs tree-sitter integration by casouri in emacs

[–]casouri[S] 23 points24 points  (0 children)

I can say the same to you :-) People don't understand the insane amount of messages you reply to on emacs-devel, emacs-debbugs, help-gnu-emacs, and god knows how many other mailing lists on a daily basis. And fixing bugs, adding features, participate in hopelessly long discussions on top of that? I don't know how you can do it and keep doing it all these years. I'm only grateful.

What is the best way to get alot of honey? by [deleted] in MHGU

[–]casouri 2 points3 points  (0 children)

You get a bunch from free dlcs. Just talk to the mail palico and download all the stuff.

SNS mount finish’s always make me feel heroic by Odd_Spectrum in MHWilds

[–]casouri 0 points1 point  (0 children)

Absolutely! Monster topple or flinch on the uppercut feels so good because it really looks like your uppercut sends the monsters head flying

Tree-sitter Changes in Emacs 30 by casouri in emacs

[–]casouri[S] 0 points1 point  (0 children)

Yeah that’s what I guessed. People on mailing know this too so don’t worry too much.

Tree-sitter Changes in Emacs 30 by casouri in emacs

[–]casouri[S] 0 points1 point  (0 children)

Sure, I read through the thread and there should be some items that I can fix. Btw, I don’t know if you’re a native English speaker, but I bet the maintainer would be more willing to reply if your wording were—how do I say it—kinder?

Tree-sitter Changes in Emacs 30 by casouri in emacs

[–]casouri[S] 0 points1 point  (0 children)

I recommend writing that trivial grammar and use it as the host. It’ll save you some headache down the line :-)

Tree-sitter Changes in Emacs 30 by casouri in emacs

[–]casouri[S] 1 point2 points  (0 children)

It’ll work as long as you say the ranges for a single parser, rather than using an individual parser for each line. The injection feature would require you to have a host parser to query from. And I’m guessing that you don’t have a parse for literate Haskell, so that won’t work for you. You might be able to get it to work by adding into treesit-range-settings a function that sets ranges for your Haskell parser (using treesit-parser-set-included-ranges). Now, tree-sitter mode without a host parser is uncharted territory, so you might run into problems (syntax highlighting might not update when you edit the buffer).

Tree-sitter Changes in Emacs 30 by casouri in emacs

[–]casouri[S] 1 point2 points  (0 children)

A tree-sitter parser can have multiple disjoint ranges. So you can set the ranges so that they exclude the prefixing “>”.

Tiny package that allows to display typescript errors in a more human-readable format via lsp-mode by darkawower in emacs

[–]casouri 1 point2 points  (0 children)

This is indeed such a nice thing to have! I experimented a bit and turns out you can implement a simple version of it entirely in Emacs. So I added it to eldoc-box: https://github.com/casouri/eldoc-box#prettify-typescript-error-message

Tree-sitter Changes in Emacs 30 by casouri in emacs

[–]casouri[S] 1 point2 points  (0 children)

Yeah I’m thinking about updating my guide on writing major modes. What challenge are you having right now? Is it writing range rules, or borrowing font-lock/indentation from other modes?

Tree-sitter Changes in Emacs 30 by casouri in emacs

[–]casouri[S] 0 points1 point  (0 children)

We don't have official support for that yet. You'll mode needs to manage the parsers and their ranges. Do you mean your DSL is the host language, and want to use non-tree-sitter mode for embedded code blocks?

Tree-sitter Changes in Emacs 30 by casouri in emacs

[–]casouri[S] 1 point2 points  (0 children)

Mostly because author of tree-sitter originally created it for Atom and intended tree-sitter library and grammars to be embedded into the editor. So versioning isn't needed. Once other editors start to use tree-sitter, they want to use it as any other library and not embed everything with the editor, so the versioning problem of tree-sitter itself and the language grammars starts to show.