Skip to content

Commit 73a0c19

Browse files
committed
Formatting
1 parent d2f7078 commit 73a0c19

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

server/src/server.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -437,16 +437,17 @@ export default class BashServer {
437437
character: Math.max(params.position.character - 1, 0),
438438
},
439439
})
440+
440441
this.logRequest({ request: 'onCompletion', params, word })
441442

442-
if (word && word.startsWith('#')) {
443+
if (word?.startsWith('#')) {
443444
// Inside a comment block
444445
return []
445446
}
446-
if (word && word === '{') {
447+
448+
if (word === '{') {
447449
// We should not complete when it is not prefixed by a $.
448-
// This case needs to be here
449-
// because { is a completionProvider triggerCharacter.
450+
// This case needs to be here as "{" is a completionProvider triggerCharacter.
450451
return []
451452
}
452453

@@ -463,7 +464,7 @@ export default class BashServer {
463464
}
464465

465466
let options: string[] = []
466-
if (word && word.startsWith('-')) {
467+
if (word?.startsWith('-')) {
467468
const commandName = this.analyzer.commandNameAtPoint(
468469
params.textDocument.uri,
469470
params.position.line,

0 commit comments

Comments
 (0)