Closed I-Want-ToBelieve closed 2 months ago
Keys don't need to be wrapped in quotation marks unless they have certain characters right? It is a bug that [dart]
isn't in quotes but the rest is expected.
I've fixed it in https://github.com/uncenter/json-to-nix/commit/232b5d5da6c2dec0f76b63a47c108d428e4e438d. Your original JSON now becomes:
{
"[dart]" = {
editor.formatOnSave = true;
editor.formatOnType = true;
editor.rulers = [
90
];
editor.selectionHighlight = false;
editor.suggest.snippetsPreventQuickSuggestions = false;
editor.suggestSelection = "first";
editor.tabCompletion = "onlySnippets";
editor.wordBasedSuggestions = "off";
};
workbench.iconTheme = "catppuccin-mocha";
workbench.list.automaticKeyboardNavigation = false;
}
Only keys that have to be quoted are quoted.
@uncenter hi
Similar to workbench.iconTheme, quotation marks are also required because workbench.iconTheme is the name of the key.
Totally right! Let me make another fix, sorry!
I tried converting vscode's settings.json to nix and everything was fine, but I found that the property names were not in quotation marks
json:
nix:
Expected is:
nix: