Comment by jchw
1 year ago
Neovim has felt frustrating. I still sort of manage a Neovim configuration, but have been gradually moving to Zed as well. (Similar reasons overall.)
I think everyone has their own personal list of gripes and wants for a text editor. Here's some issues that I think many people will immediately be struck by:
- Zed does not yet support EditorConfig. https://github.com/zed-industries/zed/issues/8534
- Zed does not yet support auto-detecting indentation in the current file. https://github.com/zed-industries/zed/issues/4681
- Zed does not yet support configuring indentation in the current file. (edit: clarified wording) https://github.com/zed-industries/zed/issues/4867
- The core editing experience is still less polished than Monaco. Example: Selecting a block of spaces and striking "delete" may lead to an uneven number of characters being deleted. It seems to interact poorly with indentation.
- No settings UI (yet?).
As a Linux (and specifically NixOS) user, there's also a few other problems that I would love to have solved:
- Zed can't be configured to not auto-update, which can simply never work on immutable distros or e.g. inside of Flatpak. It just tries and fails, wasting bandwidth. https://github.com/zed-industries/zed/issues/9224
- Zed can't re-use all already-installed language servers yet, so some language servers can't be used on platforms where the auto-download feature can not work. https://github.com/zed-industries/zed/issues/4978
- Zed doesn't really integrate well with direnv. VSCode is in the same boat, but Vim is not. https://github.com/zed-industries/zed/issues/4977
Overall Zed has been very nice. It definitely feels like it's still pre 1.0, but it is a very strong pre 1.0 to me. I am a bit weary on the focus on collaboration and AI features so soon, but I do realize that people actually like these features, so hopefully it's not a sign that the core editing experience is going to be neglected.
On indentation, most files are going to be autoformatted by the LSP, and there are tab_size settings in the languages section, needing specific file settings seems like an edge case.
As for collaboration and AI features, I have no use for them personally, but I think that's their avenue for future monetization, so I can't really complain that they are focussing on that when I get an amazing piece of software for free.
> On indentation, most files are going to be autoformatted by the LSP, and there are tab_size settings in the languages section, needing specific file settings seems like an edge case.
Wow, absolutely not!
Just so we're clear, when I say "per-file" settings, I don't mean in the configuration. I mean at runtime overriding the indentation settings for an open file.
This is needed for many, many cases that I definitely don't consider edge cases.
- Configuration files: Loose configuration files might be in a bespoke format with no language server to begin with. JSON and YAML files can have pretty much any indentation style, and in many cases when editing configuration files there will be no "project-specific" configuration files to read from. I use my editor of choice to edit configuration files in various places including just in my home directory.
- You are not necessarily allowed to fully reformat files in a given project, even if the project has inconsistently-formatted files. Some LSPs are cooperative with this and won't change the indentation, since not all languages have a canonical format. Auto-detection is very important here.
- Even when an LSP is being used, that doesn't mean Zed is synced up with it. The Nix LSP will use whatever nixfmt binary you are using. I'm using nixfmt-rfc-style, which uses 2-space indentation, but the default in Zed seems to be 4-space indentation for Nix files, which means that without configuration it will be out-of-sync. (Generally this would be better to just configure globally but I'm just trying to say that having an LSP in and of itself doing formatting is not a panacea.)
In almost any editor I can think of, from Vim, to Visual Studio Code, to IntelliJ, to Notepad++, to kwrite, to gedit... I can at least override the indentation style if it is wrong for some reason. In Neovim I use vim-sleuth, and my indentation settings in Vim are very rarely incorrect no matter what file I'm editing where.
Modern text editors can and should do better than this, and almost always do; being able to change the current indentation settings is something most editors support before supporting most other basic functions. It's not a weird edge case, it's just flat-out a missing basic feature.
They probably should have the option to change the tab size on an open file, but my point is, why wouldn't you have autoformatting on for YAML and JSON? You have a preference for indent size, and you want the same for every file, barring an edge case.
"languages": { "JSON": { "tab_size": 4 }, "JSONC": { "tab_size": 4 }, "YAML": { "tab_size": 4 } }
Edit: Yeah I see your point when you are not in control of the project and have to stick to someone elses style, I guess that only seems like an edge case to me, but could be normal for other people. In that case you would want a convenient way to override your formatting settings, like an auto detect indent button that only applies to the current open file.
1 reply →