JohnnyMorganz / luau-lsp

Language Server Implementation for Luau
MIT License
224 stars 57 forks source link

vscode and cli not supporting (~) for definition/documentation file paths #707

Closed AshleyFlow closed 1 month ago

AshleyFlow commented 1 month ago

in version 1.32.0 tilde expansion (~) was supposed to be supported for definition and documentation file paths, but it doesn't seem to be working

image

image

$ cat ~/.luneweb/.type_defs-0.3.0-pre2.d.luau 
declare class App
  function onLoad(self, message: any): ()

  function shareMessage(self, message: any): ()
  function sendMessage(self, channel: string, message: any): any

  function exit(self, exitCode: number): ()
  function run(self): ()
end

declare app: App

$ luau --version
1.32.0

$ luau analyze --definitions=~/.luneweb/.type_defs-0.3.0-pre2.d.luau src/init.luau
Cannot load definitions file ~/.luneweb/.type_defs-0.3.0-pre2.d.luau: path does not exist
JohnnyMorganz commented 1 month ago

Do you need this to work on the command line? We don't intend to support that right now

AshleyFlow commented 1 month ago

I thought this needs to be supported on the cli because when I looked at the vscode extension I found out that it uses the "--definitions" flag, which seemed related to using the cli

https://github.com/JohnnyMorganz/luau-lsp/blob/13bbb65505301049e50856b29373f94283b5f81a/editors/code/src/extension.ts#L91

if thats not related to the cli then no.