Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>AutoHotkey NekoHelpNew to Visual Studio Code? Get it now.

AutoHotkey NekoHelp

CoffeeChaton

|
586 installs
| (3) | Free
AutoHotkey IntelliSense, format, linters, and language support for VS Code,
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

vscode-autohotkey-NekoHelp

Base of cweijan /vscode-autohotkey
Base of regexp match, not the principles of compilation, so parser inaccurate.
AutoHotkey v2 has been released and will be considered the default/main version announcement, if you need to write new ahk, I suggest you to use ahk v2 && AutoHotkey v2 Language Support, ahk v1 so complicated.

AutoHotKey v1 edit-support for VS Code

  • vscode-autohotkey-NekoHelp
    • Install
    • FunctionSymbol
    • CodeSymbol
    • GotoDefinition
    • Find All References support
      • Find Ref of Function
    • Function rename
    • Hover
    • Diagnostic and lint
    • CodeFormat
    • IntelliSense
      • 1. Snippets of your function
      • 2. Completion of function variables
      • 3. Completion of #Include
      • 4. Completion of class
    • ListAllFunctions
    • Better highlight of Numbers
    • Privacy Statement
    • Performance
    • Credits
    • otherSuggest

Install

Install extension via Visual Studio Marketplace AutoHotkey NekoHelp.

FunctionSymbol

  1. Detect source Function as symbol
  2. support continuation at Outline. FunctionSymbol

CodeSymbol

  1. You can add two semicolon ;; at line first. codeSymbol

  2. You can see Leveled outline

  • class
  • function
  • switch, Case, Default
  • Labels, like this_is_a_label:
  • HotString, like ::ahk::
  • HotKeys, like ~F12::
  • directive, like #Include or #Warn

GotoDefinition

  1. Go to Definition (default via F12 or Ctrl+Click)
  2. open the definition to the side with (default via Ctrl+Alt+Click )
  3. Peek Definition (default via Alt+F12)
  4. Go to Symbol (default via Ctrl+T) GotoDef

    ↪ Go to Definition (default via F12 or Ctrl+Click)

Find All References support

  1. Go to References (default via Shift+F12)

  2. Find All References (default via Shift+Alt+F12)

    ListAllReferences

    🔍 Find All References (default via Shift+F12)

Find Ref of Function

support to find like

  1. functionName( , call function.

  2. "functionName" , wrapped in text.

    some exp code
     #NoEnv
     #Warn All
     SetControlDelay, 0
    
     ~F9:: fn_exp(["fnA","fnB"])
     ~F10:: fn_exp(["fnB","fnA"])
    
     fn_exp(fnList){
         For _Key, fn in fnList {
             funcOnj := Func(fn)
             funcOnj.Call()
         }
     }
    
     fnA(){
         MsgBox, % "i am fnA"
     }
    
     fnB(){
         MsgBox, % "i am fnB"
     }
    
    • also can use
    • fnObject := func("functionName") [read doc of func()]
    • fnObject := RegisterCallback("functionName") read doc of RegisterCallback
  3. https://www.autohotkey.com/docs/v1/misc/Labels.htm#Functions

    • OK SetTimer
    • OK Hotkey
    • OK Gui control events (g-labels)
    • OK Menu
    • not plan to support ~~Gui events such as GuiClose~~
  4. TODO Sort F-flag https://www.autohotkey.com/docs/v1/lib/Sort.htm#Options

  5. not plan to support RegEx CallOut Functionshttps://www.autohotkey.com/docs/v1/misc/RegExCallout.htm#callout-functions

  6. read more of funcRef

Function rename

  • (default via F2) rename with your can use [🔍Find Ref of Function] to find.

Hover

  • Hover to view details on variables, function, command
  • Over 200 Command and Function documenting built-in
  1. Hover function to show return value or comment

    hover2

  2. add comment of function

    /**
     * - in /** block.
     * - and the line first character is '*' or ';'
     * - can use partial grammar of markdown.
     * - exp@email.com
     * - [Markdown Rule](https://en.wikipedia.org/wiki/Markdown)
     * - <https://en.wikipedia.org/wiki/Markdown>
     * ![Image](https://raw.githubusercontent.com/CoffeeChaton/vscode-autohotkey-NekoHelp/master/D:/icon.png "icon")
     * ~~ABC~~
     * _ABC_ _ABC_
     * - - -
     *  `monospace`
    */
    fn(param){
        ; some code
    }
    
  3. add jsdoc-style comments of variable img

    f2(){
        /**
        * - [markdowm-syntax](https://www.markdownguide.org/basic-syntax/)
        * - list2
        * - Love **is** bold
        *
        * style look like jsDoc
        * and you need write before at var first-def line
        */
        style1 := 0
    
        MsgBox, % style1 ; try to hover of "style1"!
    
        style2 := 1 ; i look like c++ doc style
        MsgBox, % style2 ; try to hover of "style2"!
    }
    

Diagnostic and lint

⚠️ Diagnostics/Warnings over 30 ruler

  1. warning about use = not := to assign.
  2. warning of Switch
    Case : not find
  3. use ;@ahk-neko-ignore [number] line. to ignore,
    exp: ;@ahk-neko-ignore 999 line.

CodeFormat

  1. Right click then click format document.
  2. or alt + shift + f
  3. format switch case
  4. read more exp

IntelliSense

1. Snippets of your function

IntelliSenseFunc

2. Completion of function variables

Completion_of_function_variables.gif

3. Completion of #Include

Completion of Include

4. Completion of class

Completion of class

ListAllFunctions

ListAllFunctions

Better highlight of Numbers

img

theme from One Dark Pro

  • 0x and e use keyword.other.unit

  • other number ex 123 007B 3.14159 use constant.numeric

  • exp of your settings.json ReadMore of highlighting

  • Source code

    settings.json
    // settings.json
    {
        "editor.tokenColorCustomizations": {
            "textMateRules": [
                {
                    "scope": "keyword.other.unit.numeric.hexadecimal.ahk",
                    "settings": {
                        "foreground": "#E06C75"
                    }
                },
                {
                    "scope": "keyword.other.unit.numeric.decimal.ahk",
                    "settings": {
                        "foreground": "#E06C75"
                    }
                },
                {
                    "scope": "constant.numeric.hexadecimal.ahk",
                    "settings": {
                        "foreground": "#D19A66"
                    }
                },
                {
                    "scope": "constant.numeric.decimal.ahk",
                    "settings": {
                        "foreground": "#D19A66"
                    }
                }
            ]
        }
    }
    ```
    </details>
    

Privacy Statement

  • Do not upload any information.
  • without vscode, 0 dependencies, Safe and Privacy.
  • just scan workspaces or open file. not auto scan any file without workspaces.
  • If you need to place .ahk in other folders, this Extensions support Multi-root Workspaces.

Performance

  • The best way to improve startup times is to exclude unnecessary files, via settings.json AhkNekoHelp.baseScan.IgnoredList
  • When editing becomes slow, split the file, via #Include

Credits

  • AutoHotkey Plus by cweijan
  • AutoHotkey by stef-levesque
  • AutoHotkey_L-Docs
  • AutoHotkey_L

otherSuggest

  • Path Autocomplete
  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft