3 ms·
Tree sitter support is half baked in the same way official LSP support is, only kind of worse. Eglot won't help you get your system ready for LSP work, it will
by dleslie 1mo ago
Tree sitter support is half baked in the same way official LSP support is, only kind of worse.
Eglot won't help you get your system ready for LSP work, it will only avail itself if what's there. It doesn't even auto detect and configure that, either. There's no user prompting, so you'll have to read the docs to know that this even needs to be done.
Similarly, tree sitter support doesn't include the grammars! And those aren't typically sitting in your package repository, so users have to find a grammar and compile it themselves. There's not even a good recommendation given by Emacs on where to get them, leaving users to hope that whatever repository showed up on a Google search is both in good working order and safe to use.
It's really quite a failure on Emacs.
- femiagbabiaka 1mo agoIn Emacs 31 none of what you’re saying is true. Grammars auto install and setting them up is easy. https://www.reddit.com/r/emacs/comments/1utghab/treesitter_support_in_emacs_31/ https://www.reddit.com/r/emacs/comments/1utghab/treesitter_s...
- deleted 1mo ago[deleted]
- dleslie 1mo agoWell that's a nice change; I'm still on Emacs 30. But note that this is not the default. Users have to enable that behaviour, and know to enable it. That's a bad default.
- BeetleB 1mo agoI speak only for myself and not the Emacs team, but ... IMO it shouldn't do this by default - unless there is a clear "winner" among all the choices. IIRC, for eglot I had to install a Python language server. There are a bunch of them. Why would I want it to pick one by default? I don't know if Emacs will ever have an IDE with TS and LSP working "out of the box" without some configuration. From my experience with Eglot, if it were enabled by default, it would confuse the heck out of some users who just want to, say, edit a Python script. There are always opinionated releases like Doom Emacs or Spacemacs that can set whatever nice defaults you think should be there. Leave vanilla Emacs to be, well, vanilla. Emacs, while it can be a decent IDE, is not an IDE and shouldn't default to being one.
- dleslie 1mo agoEmacs makes many opinionated choices about defaults; if it didn't, it would launch to little more than an elisp REPL by default. What's important is that _you can change it_. Good defaults ensure that Emacs doesn't repel new users and casual users and users who are not interested in fiddling. And this isn't a matter of color theme default, or font default; this is a shipped feature that _does not function_ without changes to the defaults! By default, it does not work.
- BeetleB 1mo ago> if it didn't, it would launch to little more than an elisp REPL by default. I'm confused. Have things changed? The scratch buffer it starts with is for writing elisp. > this is a shipped feature that _does not function_ without changes to the defaults! Do you know how many shipped features come with Emacs that don't function without changes to defaults? A huge number of them! Stuff like hippie-expand, ibuffer, etc. This isn't something new - it's been that way for decades. > Good defaults ensure that Emacs doesn't repel new users and casual users and users who are not interested in fiddling. This has been argued to death forever. While even I think they can and should change some defaults, the reality is that Emacs as an ecosystem is doing just fine without so many new/casual users, and will continue to do so. They don't want to be something for everyone. And while I don't have the latest Emacs, in my experience with eglot - it's simply not ready for the masses. I frequently get timeouts, and would often have to shut down and restart eglot. It's been a while since I had to, so perhaps they've fixed all the issues, but it's simply not as robust as what you'd get with other IDEs. I'd rather they address those issues than the ease of use.
- dleslie 1mo agoIt launches with a scratch buffer, menu bar with populated menus, a functional mini buffer, and so on. All of this is opinionated defaults and configurable with elisp. And yes, much of Emacs is broken out of the box and it's been that way a long while. That's not a good thing. Emacs isn't ready for the masses. Broken defaults, and a brittle experience once features are made working is standard. I've used Emacs for thirty years now. I don't recommend it to new users.
- tpmoney 1mo ago“ask” mode for installing tree-sitter grammars is the default setting. Tree-sitter modes broadly aren’t enabled by default, but that seems at least consistent with eMacs defaulting to very few modes enabled by default.
- jhoechtl 1mo agoThe critique converning lsp and eglot support is nonetheless true.
- chroma_zone 1mo agoIf it can't find an LSP binary, Eglot will prompt you to pick one, and tell you which one it was looking for. That seems reasonable to me. I wouldn't want Emacs to download and install random binaries on my system automatically.
- dleslie 1mo agoMy experience with Emacs 30 is that Eglot will prompt and show nothing of meaningful assistance beyond a name. That leaves me to run a google search to find whatever binaries fit the description. They host binaries already; why not host all of the binaries necessary for the supported features to function?
- skydhash 1mo agoShould they install make for you too (default command for compilation-mode) or the various sql client (for the sql-mode) pr a lisp runtime (for the repl)?