Add hover and quick suggestion options

This commit is contained in:
Zack Rauen 2022-02-05 18:13:38 -05:00
parent b3ec18b9af
commit fdd47f83e8
3 changed files with 17 additions and 1 deletions

View File

@ -91,6 +91,14 @@
"name": "Minimap",
"note": "Enables showing the code minimap on the side of the editor"
},
"hover": {
"name": "Reference Tooltips",
"note": "Enables showing the reference tooltips when hovering rules and selectors"
},
"quickSuggestions": {
"name": "Quick Suggestions",
"note": "Enables showing the autocomplete suggestions as you type"
},
"renderWhitespace": {
"name": "Show Whitespace",
"note": "When whitespace should be shown by the editor",

View File

@ -40,8 +40,10 @@ export default [
shown: false,
settings: [
{type: "switch", id: "lineNumbers", value: true},
{type: "number", id: "fontSize", min: 2, value: 14},
{type: "switch", id: "minimap", value: true},
{type: "switch", id: "hover", value: true},
{type: "switch", id: "quickSuggestions", value: true},
{type: "number", id: "fontSize", min: 2, value: 14},
{type: "dropdown", id: "renderWhitespace", value: "selection", options: [{value: "none"}, {value: "all"}, {value: "selection"}]}
]
},

View File

@ -39,6 +39,12 @@ export default class CodeEditor extends React.Component {
fontSize: Settings.get("settings", "editor", "fontSize"),
lineNumbers: Settings.get("settings", "editor", "lineNumbers"),
minimap: {enabled: Settings.get("settings", "editor", "minimap")},
hover: {enabled: Settings.get("settings", "editor", "hover")},
quickSuggestions: {
other: Settings.get("settings", "editor", "quickSuggestions"),
comments: Settings.get("settings", "editor", "quickSuggestions"),
strings: Settings.get("settings", "editor", "quickSuggestions")
},
renderWhitespace: Settings.get("settings", "editor", "renderWhitespace")
});