teal-language / vscode-teal

Teal language support for Visual Studio Code
MIT License
76 stars 11 forks source link

Language Server cannot start with local LuaRocks installation #3

Closed octacian closed 4 years ago

octacian commented 4 years ago

After manually installing the extension I discovered that the language server doesn't start up correctly if the tl package is installed to the local LuaRocks tree via luarocks install --local tl. Instead, it fails with the following reason:

[Info  - 5:19:27 PM] Connection to server got closed. Server will restart.
events.js:177
      throw er; // Unhandled 'error' event
      ^

Error: spawn tl ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
    at onErrorNT (internal/child_process.js:456:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:9)
Emitted 'error' event at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
    at onErrorNT (internal/child_process.js:456:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:9) {
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall: 'spawn tl',
  path: 'tl',
  spawnargs: [ 'check', '/tmp/tmp-320698azbtbUp7T3xE' ]
}
[Error - 5:19:27 PM] Connection to server got closed. Server will not be restarted.

Installing tl globally via sudo luarocks install tl solves the problem.

octacian commented 4 years ago

Sorry, my browser did something really weird and submitted the issue twice. Closing this one, you could probably delete it as well if you wanted to.