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.
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.
To me it basically seems backwards. Of course I am not arguing against having a robust configuration for setting indentation settings, it's usually the ideal way to handle this sort of thing. However, it's ultimately still just a convenience feature; all you really need is the ability to set the indentation settings for the current buffer.
As far as editors that have automatic indentation features, Zed is definitely the first one I can think of where it had configuration for indentation settings per project/per language, but no ability to change it for the current buffer.
I'm sure in due time, it will probably gain most of these features as more people jump in and run into these problems.
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.