lopi-py / luau-lsp.nvim

A luau-lsp extension to improve your experience in neovim.
MIT License
46 stars 10 forks source link

Add support for Luau LS Studio Companion plugin #17

Closed Eggflaw closed 6 months ago

Eggflaw commented 6 months ago

Special thanks to luau-tree! Without this project and other references, I wouldn't be able to implement this myself.

Eggflaw commented 6 months ago

All done

Eggflaw commented 6 months ago

Whoops I forgot to change the default configuration on README.md

Eggflaw commented 6 months ago

After checking out the source code of the studio plugin, there seems to be no sign of sending DataModel when an instance's name is renamed but removing instances should be working as intended so I'll take a closer look on this with vscode

https://github.com/JohnnyMorganz/luau-lsp/blob/main/plugin/src/init.server.lua#L177

lopi-py commented 6 months ago

Ok so after a bit of testing, this is more a luau-lsp's studio plugin issue, just make the change I've suggested and I'll merge this.

Eggflaw commented 6 months ago

I am sure this is an issue with the config module the callbacks are being called first before the new options are being set

for _, data in ipairs(callbacks) do
    if has_changed(data.path) then
      data.callback()
    end
  end

  M.options = new_options

ref: https://github.com/lopi-py/luau-lsp.nvim/blob/main/lua/luau-lsp/config.lua#L83

lopi-py commented 6 months ago

Oh, you're right. Thanks!