Skip to content

Commit

Permalink
Fixup IntelliSense-related behavior (#368)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
mark-wiemer authored Jul 29, 2023
1 parent 0a96c03 commit 761d758
Show file tree
Hide file tree
Showing 37 changed files with 998 additions and 267 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"@typescript-eslint/semi": "warn",
"curly": "warn",
"eqeqeq": "warn",
"no-throw-literal": "warn"
"no-throw-literal": "warn",
"prefer-const": "error"
},
"ignorePatterns": ["out", "dist", "**/*.d.ts"]
}
2 changes: 1 addition & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

Fixes:

- 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))
- 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))
- Fix minor debugger issues introduced in 3.1.0 ([#279](https://github.com/mark-wiemer/vscode-autohotkey-plus-plus/issues/279))
- Fix debugging a file with a space in its name ([#134](https://github.com/mark-wiemer/vscode-autohotkey-plus-plus/issues/134))
- Fix formatting for some bad labels (two colons) ([PR #325](https://github.com/mark-wiemer/vscode-autohotkey-plus-plus/pull/325))
Expand Down
106 changes: 0 additions & 106 deletions demos/demo_for_ahk_v1.ahk

This file was deleted.

27 changes: 27 additions & 0 deletions demos/manualTests/completionProvider.ahk
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#Requires AutoHotkey 1.1.33+
#SingleInstance force

; Completion provider manual tests
; Use Ctrl+Space to trigger suggestions

; compTest comment
compTest(p1, p2) {
p3 := 1
; Suggestions within method include locals
p
}

; Suggestions outside of method exclude locals
p

; Default settings (enabled IntelliSense, enabled parsing) shows suggestions
c

; Disabled IntelliSense with enabled parsing shows no suggestions
c

; Enabled IntelliSense with disabled parsing shows no suggestions
c

; Disabled IntelliSense with disabled parsing shows no suggestions
c
12 changes: 12 additions & 0 deletions demos/manualTests/debugger.ahk
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#Requires AutoHotkey 1.1.33+
#SingleInstance force

; Basic debugger test
; Ensure you've run `npm i` before running this test
; 1. Stop on breakpoint
; 2. Step forward works -- Global variables updates
; 3. No errors in Debug Console

x := 1
y := 2 ; Breakpoint here
z := 3
7 changes: 7 additions & 0 deletions demos/manualTests/folding.ahk
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
I'm collapsible!
*/

/*
So am I
*/
5 changes: 5 additions & 0 deletions demos/manualTests/hover.ahk
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
; I show up in IntelliSense when hovering only when parsing is enabled
hoverOverMePlease()
{

}
10 changes: 10 additions & 0 deletions demos/manualTests/runSelection.ahk
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#Requires AutoHotkey 1.1.33+
#SingleInstance force

; Select the following line and hit `Ctrl + F8` to run selection
f1:: MsgBox, You hit F1

; Now press F1 and you should see a message box.

; The F2 hotkey will not work because it was not part of the selection
f2:: MsgBox, You hit F2
Loading

0 comments on commit 761d758

Please sign in to comment.