Skip to content

Commit 1a0aa2f

Browse files
committed
Fixes #109
1 parent cdc6d99 commit 1a0aa2f

File tree

3 files changed

+23
-10
lines changed

3 files changed

+23
-10
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ The following Visual Studio Code settings along with their *default* values that
6767

6868
```javascript
6969
{
70-
"idris.executablePath": "idris", // The full path to the idris executable.
71-
"idris.hoverMode": "fallback", // Controls the hover behavior. 'info' will display Idris documentation, 'type' will display Idris type, 'fallback' will try 'info' first and fallback to 'type' if we can not get the documentation, and 'none' will disable hover tooltips.
72-
"idris.suggestMode": "allWords" // Controls the auto-completion behavior. 'allWords' will always include all words from the currently opened documentation, 'replCompletion' will get suggestions from Idris REPL process.
73-
"idris.warnPartial": true // Show warning when a function is partial.
70+
"idris.executablePath": "idris", // The full path to the idris executable.
71+
"idris.hoverMode": "fallback", // Controls the hover behavior. 'info' will display Idris documentation, 'type' will display Idris type, 'fallback' will try 'info' first and fallback to 'type' if we can not get the documentation, and 'none' will disable hover tooltips.
72+
"idris.suggestMode": "allWords" // Controls the auto-completion behavior. 'allWords' will always include all words from the currently opened documentation, 'replCompletion' will get suggestions from Idris REPL process.
73+
"idris.warnPartial": false // Show warning when a function is partial.
74+
"idris.showOutputWhenTypechecking": false //Show output channel when typechecking finished."
7475
}
7576
```
7677

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
},
9999
"idris.warnPartial": {
100100
"type": "boolean",
101-
"default": true,
101+
"default": false,
102102
"description": "Show warning when a function is partial."
103103
},
104104
"idris.hoverMode": {
@@ -120,6 +120,11 @@
120120
],
121121
"default": "allWords",
122122
"description": "Controls the auto-completion behavior. 'allWords' will always include all words from the currently opened documentation, 'replCompletion' will get suggestions from Idris REPL process."
123+
},
124+
"idris.showOutputWhenTypechecking": {
125+
"type": "boolean",
126+
"default": false,
127+
"description": "Show output channel when typechecking finished."
123128
}
124129
}
125130
},

src/idris/commands.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,13 @@ let buildIPKG = (uri) => {
209209
}
210210

211211
let typecheckFile = (uri) => {
212+
let needShowOC = vscode.workspace.getConfiguration('idris').get('showOutputWhenTypechecking')
212213
let successHandler = (_) => {
213-
outputChannel.clear()
214-
outputChannel.show()
215-
outputChannel.append("Idris: File loaded successfully")
214+
if (needShowOC) {
215+
outputChannel.clear()
216+
outputChannel.show()
217+
outputChannel.append("Idris: File loaded successfully")
218+
}
216219
tcDiagnosticCollection.clear()
217220
typeCheckingStatusItem.text = "Idris: Type checking ✔︎"
218221
typeCheckingStatusItem.show()
@@ -224,9 +227,13 @@ let typecheckFile = (uri) => {
224227
return arg.responseType === 'return'
225228
}).subscribe(successHandler, (err) => {
226229
destroy(true)
227-
displayErrors(err)
230+
if (needShowOC) {
231+
displayErrors(err)
232+
}
228233
})
229-
showLoading()
234+
if (needShowOC) {
235+
showLoading()
236+
}
230237
resolve()
231238
}).then(function () {
232239
}).catch(function () {

0 commit comments

Comments
 (0)