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

feat: add server configuration for autohotkey_lsp (init) #3408

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dev4s
Copy link

@dev4s dev4s commented Oct 28, 2024

No description provided.

@dev4s dev4s requested a review from glepnir as a code owner October 28, 2024 10:16
@dev4s dev4s reopened this Nov 3, 2024
Comment on lines +5 to +11
local handle = vim.fn.exepath('autohotkey.exe')
local result = handle:read '*a'
handle:close()

result = result:gsub('%s+$', '')

return result == '' and 'autohotkey.exe' or result
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea what's going on here. exepath() returns a string, so handle:read() is nonsense. Did you test this code?

Suggested change
local handle = vim.fn.exepath('autohotkey.exe')
local result = handle:read '*a'
handle:close()
result = result:gsub('%s+$', '')
return result == '' and 'autohotkey.exe' or result
local r = vim.fn.exepath('autohotkey.exe')
return r == '' and 'autohotkey.exe' or result

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

Successfully merging this pull request may close these issues.

2 participants