Page 1 of 1

AutoHotkey Language for Jetbrains

Posted: 16 Mar 2020, 13:32
by MTRNord
Hi, I started to work on AHK and was kind of bothered by the missing Jetbrains Plugin.

Therefore I announce a small Plugin. It is only a few days old, which means that it probably still has all kind of bugs.

Feel free to try it and report bugs and whiches or help by contributing to it.

Download Links
Source Code
https://github.com/Nordgedanken/auto_hot_key_jetbrains_plugin

Re: AutoHotkey Language for Jetbrains

Posted: 19 Feb 2022, 18:32
by swizzlefoshizzle
I'm sure a ton of people would appreciate this being fleshed out.

In the meantime anyone looking for basic autocomplete, syntax highlighting, and code folding in IntelliJ can use this file type configuration I made for AutoHotKey v2:
AutoHotkey.xml
Place in C:\Users\{User}\AppData\Roaming\JetBrains\IntelliJIdea{version}\filetypes
(7 KiB) Downloaded 379 times

Here's a preview of the syntax highlighting:
image.png
image.png (46.91 KiB) Viewed 4050 times

Autocomplete for built in variables, functions, and objects is keyword-based, so no parameter hints. Still nice to have though :)
image.png
image.png (8.42 KiB) Viewed 4050 times

Once it's imported you can configure it: File > Settings > Editor > File Types > AutoHotkey

Re: AutoHotkey Language for Jetbrains

Posted: 15 Mar 2022, 13:14
by mysticdrew
amazing! Hopefully you keep updating this with error checking and debugging. <3

Re: AutoHotkey Language for Jetbrains

Posted: 15 Mar 2022, 16:06
by mysticdrew
@swizzlefoshizzle
can you share your color scheme also please?

Re: AutoHotkey Language for Jetbrains

Posted: 24 Mar 2022, 12:27
by swizzlefoshizzle
mysticdrew wrote:
15 Mar 2022, 16:06
@swizzlefoshizzle
can you share your color scheme also please?
I'm using the built in Darcula theme. I don't remember changing anything but I can share my color scheme file if mine looks different :)

Darcula is in Settings > Editor > Color Scheme:
image.png
image.png (5.83 KiB) Viewed 3843 times

Re: AutoHotkey Language for Jetbrains

Posted: 10 Jun 2022, 20:20
by FrankNFurter
I would love so much if this plugin was updated to include proper AHK V1 syntax highlighting. I just the V2 code from above but it is built for V2, so it doesn't really do everything you would want for V1 (most stuff though so thank you so much for that). I really want to use JetBrains over VSCode but it's super hard right now with this being so long in the tooth. Is there anything we can do to help you? Fund it or anything?

Re: AutoHotkey Language for Jetbrains

Posted: 21 Jun 2022, 16:59
by swizzlefoshizzle
FrankNFurter wrote:
10 Jun 2022, 20:20
Is there anything we can do to help you? Fund it or anything?

Here is the JetBrains resource page for learning how custom language plugins are developed for IntelliJ.

I felt the same way and a few months ago began learning this myself, but unfortunately I don't have the time these days to meaningfully contribute to OP's repo.

Re: AutoHotkey Language for Jetbrains

Posted: 03 Jun 2023, 15:25
by nathanwailes
thank you @swizzlefoshizzle !

Re: AutoHotkey Language for Jetbrains

Posted: 31 Dec 2023, 18:30
by gorlock
swizzlefoshizzle wrote:
19 Feb 2022, 18:32
In the meantime anyone looking for basic autocomplete, syntax highlighting, and code folding in IntelliJ can use this file type configuration I made for AutoHotKey v2:

Here is a version that works a little better for v1.1
ahk.xml
(10.09 KiB) Downloaded 173 times
I had some issues with just dropping the file in %AppData%\JetBrains\IdeaIC2023.3\filetypes\
But you can also customize/create the file type here:
image.png
image.png (109.39 KiB) Viewed 869 times
Adding new keywords or moving them between those 4 groups will change their color coding.
And the colors themselves can be customized here, although other file types might be using those groups as well:
image.png
image.png (95.48 KiB) Viewed 869 times