Skip to content

Commit 761d758

Browse files
authored
Fixup IntelliSense-related behavior (#368)
* Fixup typo in 3.3.0 changelog * Remove space from trigger char list (#110) * Remove unused code in completionProvider.ts * Replace Method.document with Method.uriString * Refactor completion items for methods * Refactor `preChar` calc and add comments * Cleanup completionProvider so it's testable * Fix parser casing * Document buildScript and Script * Fixup provideCompletionItemsInner docs * Update settings descriptions * prefer const * cleanup debug dispatcher start * WIP deep pick and basic tests * Change Omit to Pick * Fixup completionProvider test * Cleanup API for completion items * Fixup types * a * fixup comments * wip second test * fixup intellisense settings * note outer tests TBD * Remove unnecessary async/await * Improve docs for Method class * Show comma-space separated params in IntelliSense * Simplify PartialMethod type, removing DeepPick * More tests * Finalize provideCompletionItemsInner * Remove console log * Run all tests, not just new ones! * Mark format tests for consolidation * Fixup provideDocumentFormattingEdits unused param * Add manual tests to repo, update demo * fixup demos * Add completion provider manual tests * Change `SharpDirective` to `IfDirective` for clarity * Fixup manual tests
1 parent 0a96c03 commit 761d758

37 files changed

+998
-267
lines changed

.eslintrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"@typescript-eslint/semi": "warn",
1212
"curly": "warn",
1313
"eqeqeq": "warn",
14-
"no-throw-literal": "warn"
14+
"no-throw-literal": "warn",
15+
"prefer-const": "error"
1516
},
1617
"ignorePatterns": ["out", "dist", "**/*.d.ts"]
1718
}

Changelog.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
Fixes:
2727

28-
- Fix several syntax highlighting issues([#85](https://github.com/mark-wiemer/vscode-autohotkey-plus-plus/issues/85), [#318](https://github.com/mark-wiemer/vscode-autohotkey-plus-plus/issues/318))
28+
- Fix several syntax highlighting issues ([#85](https://github.com/mark-wiemer/vscode-autohotkey-plus-plus/issues/85), [#318](https://github.com/mark-wiemer/vscode-autohotkey-plus-plus/issues/318))
2929
- Fix minor debugger issues introduced in 3.1.0 ([#279](https://github.com/mark-wiemer/vscode-autohotkey-plus-plus/issues/279))
3030
- Fix debugging a file with a space in its name ([#134](https://github.com/mark-wiemer/vscode-autohotkey-plus-plus/issues/134))
3131
- Fix formatting for some bad labels (two colons) ([PR #325](https://github.com/mark-wiemer/vscode-autohotkey-plus-plus/pull/325))

demos/demo_for_ahk_v1.ahk

-106
This file was deleted.
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#Requires AutoHotkey 1.1.33+
2+
#SingleInstance force
3+
4+
; Completion provider manual tests
5+
; Use Ctrl+Space to trigger suggestions
6+
7+
; compTest comment
8+
compTest(p1, p2) {
9+
p3 := 1
10+
; Suggestions within method include locals
11+
p
12+
}
13+
14+
; Suggestions outside of method exclude locals
15+
p
16+
17+
; Default settings (enabled IntelliSense, enabled parsing) shows suggestions
18+
c
19+
20+
; Disabled IntelliSense with enabled parsing shows no suggestions
21+
c
22+
23+
; Enabled IntelliSense with disabled parsing shows no suggestions
24+
c
25+
26+
; Disabled IntelliSense with disabled parsing shows no suggestions
27+
c

demos/manualTests/debugger.ahk

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#Requires AutoHotkey 1.1.33+
2+
#SingleInstance force
3+
4+
; Basic debugger test
5+
; Ensure you've run `npm i` before running this test
6+
; 1. Stop on breakpoint
7+
; 2. Step forward works -- Global variables updates
8+
; 3. No errors in Debug Console
9+
10+
x := 1
11+
y := 2 ; Breakpoint here
12+
z := 3

demos/manualTests/folding.ahk

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/*
2+
I'm collapsible!
3+
*/
4+
5+
/*
6+
So am I
7+
*/

demos/manualTests/hover.ahk

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
; I show up in IntelliSense when hovering only when parsing is enabled
2+
hoverOverMePlease()
3+
{
4+
5+
}

demos/manualTests/runSelection.ahk

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#Requires AutoHotkey 1.1.33+
2+
#SingleInstance force
3+
4+
; Select the following line and hit `Ctrl + F8` to run selection
5+
f1:: MsgBox, You hit F1
6+
7+
; Now press F1 and you should see a message box.
8+
9+
; The F2 hotkey will not work because it was not part of the selection
10+
f2:: MsgBox, You hit F2

0 commit comments

Comments
 (0)