sublimelsp / LSP-vue

Vue support for Sublime's LSP plugin
MIT License
29 stars 3 forks source link

Types not updated after editing #91

Closed sebkolind closed 3 years ago

sebkolind commented 4 years ago

I installed the latest lsp-vue and lsp packages and typescript (with the lsp-typescript package).

When I have a .vue file open, and that file is using an external class, and I go to the external class and edit a method, for example the required paramters, and go back to my .vue file it's not updated with the new parameters for that method. I have to either:

  1. Restart Sublime
  2. Close the .vue file and Restart LSP Servers and then open the file again.

It is working just fine in regular .ts files, but for .vue files it is like the LSP is not updating.

rchl commented 4 years ago

That's due to missing support for workspace/didChangeWatchedFiles: https://github.com/sublimelsp/LSP/issues/892

For now, the workaround is to restart the servers using command pallette or restart ST.

rchl commented 4 years ago

BTW. It works for .ts files because the typescript server is running a file watcher internally, something that most servers moved away from already as it doesn't scale with multiple servers. But that server is a bit older so it's still doing that itself.

sebkolind commented 4 years ago

@rchl I see - that is a shame. I could not find any information regarding when that feature will be supported. Do you know anything? I am running the ST4 dev build, and it doesn't work either for that version.

rchl commented 4 years ago

It depends on this feature request - https://github.com/sublimehq/sublime_text/issues/2669

There is no timeline for when this (or any other) feature will be implemented but ST devs were pretty good at accommodating LSP latety so if not for the next major release then hopefully after that.

(Feel free to "thumbs up" that feature request to show that there is interest)

rchl commented 4 years ago

We can keep this open since even once the feature is implemented, this plugin will need to be changed to register the watchers.

kodi commented 3 years ago

Any news on this?

Really enjoying speed of Sublime4 + LSP + vue :) This is one of just 2-3 small issues that is just bugging me in my daily work.

rchl commented 3 years ago

I will soon release an "addon" package that will add this functionality through third-party file-watcher - https://github.com/sublimelsp/LSP-file-watcher-chokidar/pull/1

Probably in few days.

rchl commented 3 years ago

Implemented through https://packagecontrol.io/packages/LSP-file-watcher-chokidar

That package needs to be installed in addition to LSP and LSP-vue.

predragnikolic commented 3 years ago

Can this be now closed?