You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I have a script open in VSCode there is a little floating thingy that pops up above the main() function which allows me to run it.
In a terminal that is external to VSCode when I run the forc formatter it formats the script; however, from that point onward the floating pop up for running the script no longer appears.
I suspect this is caused by forc-fmt saving the file after it completes. Because the language server is operating in temporary memory this change might not be getting sync'ed with this location leading to AST's that aren't matching.
The text was updated successfully, but these errors were encountered:
…sway-lsp` interaction. (#5094)
## Description
This PR adds 3 things:
1. Adds a benchmark for the format LSP request.
2. Calls `session.wait_for_parsing();` before computing the `code_lens`
request. This fixes the original issue reported in #4893 where run
buttons where being placed incorrectly after formatting.
3. If a file open in a code editor contains unsaved changes we write a
lock file to `.forc/lsp_locks/`. This file is removed when the file is
saved and there are no pending changes. If `forc-fmt` is run in a
terminal we check if the path has a lock file associated with it. If
unsaved changes are detected we bail from formatting with an error
message instructing the user to save changes before continuing. See
video below.
https://github.com/FuelLabs/sway/assets/1289413/75e6fddc-adbc-4796-aeb9-985574ae8dcccloses#4893
This was reported by @Braqzen on Slack.
I suspect this is caused by
forc-fmt
saving the file after it completes. Because the language server is operating in temporary memory this change might not be getting sync'ed with this location leading to AST's that aren't matching.The text was updated successfully, but these errors were encountered: