Skip to content

Commit

Permalink
Fixes #314
Browse files Browse the repository at this point in the history
  • Loading branch information
isc-bsaviano committed Apr 4, 2024
1 parent 7f58498 commit a473ac6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## [2.4.5] - 2024-XX-XX
- Fix issue [#312](https://github.com/intersystems/language-server/issues/312): Fix routine existence diagnostics for routines that only exist in OBJ form
- Fix issue [#313](https://github.com/intersystems/language-server/issues/313): Add Diagnostic when `ROUTINE` header is missing
- Fix issue [#314](https://github.com/intersystems/language-server/issues/314):
- Parser changes:
- DP-430347: Track variables in routine procedure blocks
- DP-430473: Fix variable tracking with embedded SQL in routine procedure blocks
Expand Down
12 changes: 9 additions & 3 deletions server/src/providers/completion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1404,7 +1404,7 @@ export async function onCompletion(params: CompletionParams): Promise<Completion
}
else if (
(prevline.slice(-2) === "[ " || (prevline.slice(-2) === ", " &&
openparencount <= closeparencount)) && triggerlang === ld.cls_langindex
openparencount <= closeparencount) || prevline.slice(-4).toLowerCase() == "not ") && triggerlang === ld.cls_langindex
) {
let foundopenbracket = false;
let foundclosebracket = false;
Expand Down Expand Up @@ -1493,12 +1493,18 @@ export async function onCompletion(params: CompletionParams): Promise<Completion
else if (keywordtype === "xdata") {
keywordsarr = xdataKeywords.slice();
}
for (let keydoc of keywordsarr) {
for (const keydoc of keywordsarr) {
var doctext = keydoc.description;
if (doctext === undefined) {
doctext = "";
}
if (!existingkeywords.includes(keydoc.name.toLowerCase())) {
if (
!existingkeywords.includes(keydoc.name.toLowerCase()) && !(
// Only boolean keywords can follow a "Not "
prevline.slice(-4).toLowerCase() == "not " &&
keydoc.type != "KW_TYPE_BOOLEAN"
)
) {
if ("constraint" in keydoc && keydoc.constraint instanceof Array) {
if (doctext !== "") {
doctext = doctext + "\n\n";
Expand Down

0 comments on commit a473ac6

Please sign in to comment.