AutoHotkey syntax or auto-completion #13030
-
I am curious if there were any plans to implement AutoHotkey Syntax and/or auto-completion? I know it's not the most popular language, but I write a considerable amount of it and I am starting to like Helix. There's already syntax and auto completers in other editors/IDE so I know there's potential for one here, just not sure if anyone has it planned. Sorry if this is the wrong section to put this in, I almost put it in ideas, but wasn't sure. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 6 replies
-
Hi, sorry for the inconvenience. |
Beta Was this translation helpful? Give feedback.
-
I think there may already be support, just with some effort; helix works with LSPs to support languages. It looks like there's a few AHK LSPs on github, but personally haven't tried any. |
Beta Was this translation helpful? Give feedback.
-
So I read that the AutoHotkey LSP plugin for VS Code should work (which I already had installed), but I I can't seem to get it working. I also tried installing the plugin using the plugins repository node installation instructions, but with the same results. I am very new to Helix and have been reading through the documentation for installing a new language, but I don't think I've done it right. Would anyone mind helping? Here's my config in languages.toml: [[language]]
name = "autohotkey"
file-types = ["ahk"]
scope = "source.autohotkey"
indent = { tab-width = 2, unit = " " }
comment-tokens = ";"
formatter = { command = "node", args = ["</MY/USER/PATH>/.vscode-oss/extensions/mark-wiemer.vscode-autohotkey-plus-plus-6.5.0-universal/ahk2/server/dist/server.js", "--node-ipc"] }
language-servers = [ { name = 'vscode-autohotkey2-lsp' } ] I tried changing Results of the health check: PS> hx --health autohotkey
Configured language servers: None
Configured debug adapter: None
Configured formatter: node
Binary for formatter: C:\Program Files\nodejs\node.exe
Tree-sitter parser: None
Highlight queries: ✘
Textobject queries: ✘
Indent queries: ✘ |
Beta Was this translation helpful? Give feedback.
-
Not completely sure on this, but I think you have to define the ahk lsp in the |
Beta Was this translation helpful? Give feedback.
-
Thanks to @sibouras and @IllyStable for the help! |
Beta Was this translation helpful? Give feedback.
first you need to download the lsp, follow the instructions from the readme https://github.com/thqby/vscode-autohotkey2-lsp?tab=readme-ov-file#use-in-other-editors,
assuming you created a
~/src
folder and installed the lsp in that folder, this is what the lsp config will look likethe lsp includes a formatter so you don't need to configure one, it also includes some syntax highlighting with seman…