Skip to content

Commit

Permalink
Merge branch 'main' into renovate/typescript-5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
skovhus authored Jun 10, 2023
2 parents 32b5786 + 8034b8f commit 0dc961e
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 4 deletions.
7 changes: 6 additions & 1 deletion server/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# Bash Language Server

## 4.9.3

- Fix flags/options insertion issue for some clients by using textEdits https://github.com/bash-lsp/bash-language-server/pull/861
- Dependency upgrades

## 4.9.2

- Fix flags/options insertion issue for some clients https://github.com/bash-lsp/bash-language-server/pull/847
- Dependencies
- Dependency upgrades

## 4.9.1

Expand Down
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "A language server for Bash",
"author": "Mads Hartmann",
"license": "MIT",
"version": "4.9.2",
"version": "4.9.3",
"main": "./out/server.js",
"typings": "./out/server.d.ts",
"bin": {
Expand Down
14 changes: 13 additions & 1 deletion server/src/__tests__/server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,19 @@ describe('server', () => {
},
kind: expect.any(Number),
label: '--line-buffered',
insertText: 'buffered',
textEdit: {
newText: 'buffered',
range: {
start: {
character: 12,
line: 2,
},
end: {
character: 12,
line: 2,
},
},
},
},
]),
)
Expand Down
14 changes: 13 additions & 1 deletion server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -516,11 +516,23 @@ export default class BashServer {
if (commandName) {
optionsCompletions = getCommandOptions(commandName, word).map((option) => ({
label: option,
insertText: option.slice(word.length),
kind: LSP.CompletionItemKind.Constant,
data: {
type: CompletionItemDataType.Symbol,
},
textEdit: {
newText: option.slice(word.length),
range: {
start: {
character: params.position.character,
line: params.position.line,
},
end: {
character: params.position.character,
line: params.position.line,
},
},
},
}))
}
}
Expand Down

0 comments on commit 0dc961e

Please sign in to comment.