4 ms·
> older editors that are doing syntax highlighting via regex. I mean, Emacs, which can probably be considered the oldest code editor at this point, got built-i
by flexagoon 3y ago
> older editors that are doing syntax highlighting via regex.
I mean, Emacs, which can probably be considered the oldest code editor at this point, got built-in tree-sitter (which is what Zed uses under the hood) support in the last release. So it's not really related to editors being new or old
- The_Colonel 3y agoAs I understand, tree-sitter implementation in Emacs is currently more like a foundation for development / adoption by plugins, it's not really usable as-is today.
- chlorion 3y agoThere are multiple tree-sitter based major modes that are usable right now! I use python-ts-mode, rust-ts-mode, c++-ts-mode, bash-ts-mode and a few more right now and they work well. You can write your own modes with it also, but I have not yet looked too deeply into this. It's definitely usable today in emacs-29, but not every language has a tree-sitter mode yet. Whoops my tab was outdated and I didn't see that others already replied.
- nequo 3y agoEmacs already had tree-sitter before 29, just not built in. You can do syntax highlighting[1] and structured editing with it.[2] What is missing for it to be usable in your view? [1] https://emacs-tree-sitter.github.io/syntax-highlighting/ https://emacs-tree-sitter.github.io/syntax-highlighting/ [2] https://github.com/meain/evil-textobj-tree-sitter https://github.com/meain/evil-textobj-tree-sitter
- epcoa 3y agoYour understanding is outdated/incorrect. Already a number of major modes have corresponding ts modes and I use them daily. This includes C++, Rust, Python, yaml, toml, json, Java, typescript, dockerfile and cmake. True not every major mode has treesitter in the official release but I’d hardly call the above “not usable”
- sswezey 3y agoAs a note, the zed editor team were the creators of the tree-sitter project
- thrwwycbr 3y agoIt's ironic that you say that, even though the people building zed were the ones building the tree sitter in the first place.
- dnsco 3y agoIt's not just tree-sitter that makes zed feel snappy. If you're using a reasonably fast language-server, which rust-analyzer apparently is (I didn't know this using vscode), the autocomplete & intentions feel instantaneous. I think the team has learned a lot from previous editor implementations (they were the core team of atom that was notoriously slow), and so they've had an opportunity to do a lot of stuff right. FWIW they also are the team that originally wrote tree-sitter. The quickness feels more like it's in the core of the editor. I was shocked how much it impacted the editing experience when I tried it in early beta.
- FridgeSeal 3y ago> If you're using a reasonably fast language-server, which rust-analyzer apparently is (I didn't know this using vscode) Some more anecdata to back this up: initial workspace load in VScode I can watch RA tick through its progress. Clean and boot up Zed and the same process is so fast that it’s almost unbelievable.
- widdershins 3y agoI've been impressed with the C++ clangd language server snappiness in Zed compared to both CLion (my old favorite) and Emacs (apple of my eye for 2.5 yrs). I always thought the major slowness was coming from clangd itself, so I'm surprised and impressed to see that Zed appears to be quicker on this front. I might be using Zed as a 'second opinion' editor because of this. However, now I'm used to the infinite customizability and coziness of Emacs, it's going to be hard for me to move across to Zed permanently.
- erk__ 3y agoEmacs have some issues with LSP speed because of the json parsing not being the fastest which have lead to work like this: https://github.com/blahgeek/emacs-lsp-booster https://github.com/blahgeek/emacs-lsp-booster.
- widdershins 3y agoAh, thanks for the link, I hadn't seen that. I will give Eglot another go with this set up!