Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sublime Text 4 instructions incomplete #681

Open
jedis00 opened this issue Feb 11, 2025 · 1 comment
Open

Sublime Text 4 instructions incomplete #681

jedis00 opened this issue Feb 11, 2025 · 1 comment

Comments

@jedis00
Copy link

jedis00 commented Feb 11, 2025

https://github.com/thqby/vscode-autohotkey2-lsp?tab=readme-ov-file#sublime-text4

The included instructions are incomplete and not user friendly to get this up and running successfully, even after following #204.

Please update this section to include full set up instructions.

command - does not indicate everything that needs updated. Full path updated for node exe, but doesn't say anything about updating <VSCODE-AUTOHOTKEY2-LSP> section in the Sublime Text4 section. It's mentioned under Use in other editors but Sublime Text 4 has its own package for this. Is the section under Use in other editors needed for the Sublime Text 4 install?

selector - there's no info of what needs to go in here. Scope of what? Directions say to save the file in C:\Users\<USERNAME>\AppData\Roaming\Sublime Text\Packages\User\LSP-ahk2 and this directory doesn't exist, so the plugin wouldn't even know how to find this.

AutoLibInclude - no info about what this does, or what the options do

Troubleshooting: lsp-ahk2

Version

  • LSP: 2.3.0
  • Sublime Text: 4192

Server Test Run

  • exit code: 1
  • output
node:internal/modules/cjs/loader:1228
  throw err;
  ^

Error: Cannot find module 'C:\Program Files\Sublime Text\<VSCODE-AUTOHOTKEY2-LSP>\server\dist\server.js'
    at Function._resolveFilename (node:internal/modules/cjs/loader:1225:15)
    at Function._load (node:internal/modules/cjs/loader:1055:27)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:220:24)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
    at node:internal/main/run_main_module:36:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v22.14.0

Server Configuration

  • command
[
  "E:/Dropbox/bin/node-install/v22.14.0/node.exe",
  "<VSCODE-AUTOHOTKEY2-LSP>/server/dist/server.js",
  "--stdio"
]
  • shell command
E:/Dropbox/bin/node-install/v22.14.0/node.exe <VSCODE-AUTOHOTKEY2-LSP>/server/dist/server.js --stdio
  • selector
source.ahk2
  • priority_selector
source.ahk2
  • init_options
{
  "ActionWhenV1IsDetected": "Continue",
  "AutoLibInclude": "All",
  "CommentTags": "^;;\\s*(?<tag>.+)",
  "CompleteFunctionParens": false,
  "Diagnostics": {
    "ClassStaticMemberCheck": true,
    "ParamsCheck": true
  },
  "FormatOptions": {
    "array_style": "collapse",
    "brace_style": "One True Brace",
    "break_chained_methods": false,
    "ignore_comment": false,
    "indent_string": "\t",
    "max_preserve_newlines": 2,
    "object_style": "collapse",
    "preserve_newlines": true,
    "space_after_double_colon": true,
    "space_before_conditional": true,
    "space_in_empty_paren": false,
    "space_in_other": true,
    "space_in_paren": false,
    "wrap_line_length": 0
  },
  "InterpreterPath": "C:/Program Files/AutoHotkey/v2/AutoHotkey64.exe",
  "SymbolFoldingFromOpenBrace": false,
  "WorkingDirs": [],
  "locale": "en-us"
}
  • settings
{}
  • env
{}

Active view

  • File name
E:\Dropbox\EverQuest\LaunchEQ-GUI\Login.ahk
  • Settings
{
  "auto_complete_selector": "meta.tag, source - comment - string.quoted.double.block - string.quoted.single.block - string.unquoted.heredoc",
  "lsp_active": null,
  "syntax": "Packages/User/LSP-ahk2/AutoHotkey2.sublime-syntax"
}
  • base scope
source.ahk2

Project / Workspace

  • folders
[]
  • is project: False

LSP configuration

{
  "clients": {
    "lsp-ahk2": {
      "command": [
        "E:/Dropbox/bin/node-install/v22.14.0/node.exe",
        "<VSCODE-AUTOHOTKEY2-LSP>/server/dist/server.js",
        "--stdio"
      ],
      "enabled": true,
      "initializationOptions": {
        "ActionWhenV1IsDetected": "Continue",
        "AutoLibInclude": "All",
        "CommentTags": "^;;\\s*(?<tag>.+)",
        "CompleteFunctionParens": false,
        "Diagnostics": {
          "ClassStaticMemberCheck": true,
          "ParamsCheck": true
        },
        "FormatOptions": {
          "array_style": "collapse",
          "brace_style": "One True Brace",
          "break_chained_methods": false,
          "ignore_comment": false,
          "indent_string": "\t",
          "max_preserve_newlines": 2,
          "object_style": "collapse",
          "preserve_newlines": true,
          "space_after_double_colon": true,
          "space_before_conditional": true,
          "space_in_empty_paren": false,
          "space_in_other": true,
          "space_in_paren": false,
          "wrap_line_length": 0
        },
        "InterpreterPath": "C:/Program Files/AutoHotkey/v2/AutoHotkey64.exe",
        "SymbolFoldingFromOpenBrace": false,
        "WorkingDirs": [],
        "locale": "en-us"
      },
      "schemes": [
        "file",
        "buffer",
        "res"
      ],
      "selector": "source.ahk2"
    }
  },
  "semantic_highlighting": true
}

System PATH

  • C:\Program Files\Eclipse Adoptium\jdk-8.0.432.6-hotspot\bin
  • C:\WINDOWS\system32
  • C:\WINDOWS
  • C:\WINDOWS\System32\Wbem
  • C:\WINDOWS\System32\WindowsPowerShell\v1.0\
  • C:\WINDOWS\System32\OpenSSH\
  • C:\Program Files\dotnet\
  • C:\Program Files\Microsoft VS Code\bin
  • E:\Dropbox\bin\node-install
  • C:\Program Files\nodejs
  • C:\Users\Tom\AppData\Local\Programs\Python\Launcher\
  • C:\Users\Tom\AppData\Local\Microsoft\WindowsApps
  • E:\Dropbox\bin\node-install
@thqby
Copy link
Owner

thqby commented Feb 13, 2025

command

Update the path of node.exe(maybe it's already in PATH, so you don't need to set it) and the folder of vscode-autohotkey2-lsp. This can be installed anywhere.

selector

The example is the simplest implementation. Only the selector and simple syntax highlighting are included. It is installed at the mentioned path.

AutoLibInclude

For a detailed description of the settings, you should look at the package.json and package.nls.json files of the repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants