Skip to content

Commit 8b3e3c8

Browse files
committed
add showGoalNames to the settings
1 parent dc7063d commit 8b3e3c8

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

client/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ function App() {
157157
"editor.semanticHighlighting.enabled": true,
158158
"editor.acceptSuggestionOnEnter": preferences.acceptSuggestionOnEnter ? "on" : "off",
159159
"lean4.input.eagerReplacementEnabled": true,
160-
"lean4.infoview.showGoalNames": false,
160+
"lean4.infoview.showGoalNames": preferences.showGoalNames,
161161
"lean4.infoview.emphasizeFirstGoal": true,
162162
"lean4.infoview.showExpectedType": false,
163163
"lean4.infoview.showTooltipOnHover": false,

client/src/Popups/Settings.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ const SettingsPopup: FC<{
8787
checked={preferences.acceptSuggestionOnEnter} />
8888
<label htmlFor="acceptSuggestionOnEnter">Accept Suggestion on Enter</label>
8989
</p>
90+
<p>
91+
<Switch id="showGoalNames" onChange={() => {modifyPreferences("showGoalNames", !preferences.showGoalNames)}}
92+
checked={preferences.showGoalNames} />
93+
<label htmlFor="showGoalNames">Show Goal Names</label>
94+
</p>
9095

9196
<h2>User settings</h2>
9297
<p>

client/src/config/settings.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Note that more Editor options are set in `App.tsx` directly.
1010
export interface IPreferencesContext {
1111
abbreviationCharacter: string
1212
acceptSuggestionOnEnter: boolean
13+
showGoalNames: boolean
1314
compress: boolean, // compress the `code=` in the URL into `codez=` using LZ-string
1415
mobile: boolean
1516
saveInLocalStore: boolean
@@ -21,6 +22,7 @@ export interface IPreferencesContext {
2122
const settings: IPreferencesContext = {
2223
abbreviationCharacter: '\\',
2324
acceptSuggestionOnEnter: false,
25+
showGoalNames: true,
2426
compress: true,
2527
mobile: false, // value irrelevant as it will be overwritten with `width < 800` in App.tsx
2628
saveInLocalStore: false, // should be false unless user gave consent.

0 commit comments

Comments
 (0)