zed icon indicating copy to clipboard operation
zed copied to clipboard

Use consistent formatting for settings JSON keys

Open eth0net opened this issue 2 years ago • 1 comments

Check for existing issues

  • [X] Completed

Describe the bug

Currently, nearly all settings use snake_case, but the language server settings within the lsp field use kebab-case, and the language settings use natural language formatting.

Could these be made consistent in snake_case?

To reproduce

Read through Zed default settings.

Expected behavior

All keys follow consistent formatting rules.

Environment

Zed 0.55.0 – /Applications/Zed.app macOS 12.6 architecture x86_64

If applicable, add mockups / screenshots to help explain present your vision of the feature

Screenshot 2022-09-27 at 21 31 38

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue

No response

eth0net avatar Sep 27 '22 20:09 eth0net

This comes down to what values are coming from Zed vs from the language server itself.

The keys of lsp are the names of the language server. It looks like we're using kebab-case here to match the convention that language servers use in their names (rust-analyzer, typescript-language-server, etc.).

The contents of initialization_options are passed directly to the language server, so the casing of these values would depend on what the language server accepts (which is most often going to be camelCase, since that's what the Language Server Protocol uses itself).

maxdeviant avatar Jan 27 '24 23:01 maxdeviant