nwolverson / purescript-language-server

MIT License
184 stars 41 forks source link

Find references will work immediately #91

Closed andys8 closed 4 years ago

andys8 commented 4 years ago

If getTextDocUri will not be passed to runHandler, then updateModules will not be triggered, and modules and moduleFile not be updated. Passing it also for this handler will make show usages/references work, when opening a file.

Demo

  1. Open https://github.com/jonasbuntinx/purescript-react-realworld/blob/d59eaf5c3431ea465db792f291eede42dc6190c7/src/Conduit/Page/Article.purs#L52
  2. Wait 10 seconds
  3. Trigger "Show usages" for mkArticlePage

Before this PR, it won't work. With this PR it'll jump to where it is used.

Issue

Closes #88

nwolverson commented 4 years ago

Thanks! Wonder why that was that way...