Skip to content
This repository has been archived by the owner on Nov 12, 2022. It is now read-only.

[New server]: autohotkey2 #460

Open
1 of 2 tasks
thqby opened this issue Feb 6, 2022 · 2 comments
Open
1 of 2 tasks

[New server]: autohotkey2 #460

thqby opened this issue Feb 6, 2022 · 2 comments

Comments

@thqby
Copy link

thqby commented Feb 6, 2022

Server name

ahk2_ls

Server homepage

https://github.com/thqby/vscode-autohotkey2-lsp/tree/server

Languages

autohotkey2

Is this server added in lspconfig?

  • Yes
  • No

How is this server distributed?

  • vscode marketplace
  • github repo server branch
@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2022

Hello! Cool! Pull requests are always very welcomed to add new servers. If the distribution of the
server is simple, the installation will most likely be so as well (existing server installers may be
used for reference!). Otherwise, @williamboman will get around to looking into this ASAP!

@thqby
Copy link
Author

thqby commented Feb 6, 2022

default config

local nvim_lsp = require 'lspconfig'

return {
  default_config = {
    cmd = { "node", "vscode-autohotkey2-lsp/server/dist/server.js", "--stdio" },
    filetypes = { "ahk", "ahk2", "ah2", "autohotkey" },
    root_dir = function(fname)
                return nvim_lsp.util.find_git_ancestor(fname) or vim.fn.getcwd()
                    end,
    cmd_env = {
      AHK2_LS_CONFIG = '{"locale":"en-us"}',
    },
    settings = {
      AutoHotkey2 = {
        -- the path of the AutoHotkey.exe executable file. This default setting is used as a fallback if no interpreter is selected for the workspace.
        InterpreterPath = 'C:/Program Files/Autohotkey/AutoHotkey.exe',

        -- Provide completion and automatic include from User and Standard library, Local library
        AutoLibInclude = 0,

        -- Add parentheses to function completions
        completeFunctionParens = false
      }
    },
  },
  docs = {
    description = [[
    https://github.com/thqby/vscode-autohotkey2-lsp

    Autohotkey2 Language Support 

    Download and unpack thqby.vscode-autohotkey2-LSP plugin 
    from github, git clone --depth=1 -b server https://github.com/thqby/vscode-autohotkey2-lsp
    from vscode marketplace, https://marketplace.visualstudio.com/items?itemName=thqby.vscode-autohotkey2-lsp
    cmd = {'node', 'extension/server/dist/server.js', '--stdio'}
    ]]
  }
}

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

No branches or pull requests

1 participant