Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[controller] Postpone position requests until doc checking catches up. #179

Merged
merged 1 commit into from
Jan 13, 2023

Conversation

ejgallego
Copy link
Owner

This provides a much nicer typing and navigation experience, basically if some data about the document is not ready, the request is postponed and will be served when such data becames available.

We also switch the default for the client as to show goals on typing / movement of the cursor. With the new delay capability, this gives the user usually what they want in terms of the goal panel being up-to-date.

Some notes:

  • For now we only postpone goal requests, we should implement a proper queue (in next PRs). One pending goal request works pretty well for interactive use.

  • Doc.Target.t can be more refined, as to support Info.find Prev behavior (but this is a bit complex due to the way both searches interact)

This provides a much nicer typing and navigation experience, basically
if some data about the document is not ready, the request is postponed
and will be served when such data becames available.

We also switch the default for the client as to show goals on typing /
movement of the cursor. With the new delay capability, this gives the
user usually what they want in terms of the goal panel being up-to-date.

Some notes:

- For now we only postpone goal requests, we should implement a proper
  queue (in next PRs). One pending goal request works pretty well for
  interactive use.

- `Doc.Target.t` can be more refined, as to support `Info.find` `Prev`
  behavior (but this is a bit complex due to the way both searches interact)
@ejgallego ejgallego merged commit f18568f into main Jan 13, 2023
@ejgallego ejgallego deleted the pos_request3 branch January 13, 2023 19:06
ejgallego added a commit to ejgallego/opam-repository that referenced this pull request Jan 15, 2023
CHANGES:

----------------------

 - Much improved handling of Coq fatal errors, the server is now
   hardened against them (@ejgallego, ejgallego/coq-lsp#155, ejgallego/coq-lsp#157, ejgallego/coq-lsp#160, fixes ejgallego/coq-lsp#91)
 - `coq-lsp` now follows the LSP specification regarding
   initialization strictly (@ejgallego, ejgallego/coq-lsp#168)
 - New setting for goals to be updated when the selection changes due
   to a command; this makes VsCodeVim cursor tracking work; thanks to
   Cactus (Anton) Golov for detailed bug reporting and testing
   (@ejgallego, @jesyspa, ejgallego/coq-lsp#170, fixes ejgallego/coq-lsp#163)
 - `coq-lsp` will now warn the user when two files have been opened
   simultaneously and the parser may go into a broken state :/
   (@ejgallego, ejgallego/coq-lsp#169)
 - Implement request postponement and cancellation. Thus
   `documentSymbols` will now be postponed until the document is
   ready, (@ejgallego, ejgallego/coq-lsp#141, ejgallego/coq-lsp#146, fixes ejgallego/coq-lsp#124)
 - Protocol and VS Code interfaces now support shelved and given_up
   goals (@ejgallego, ejgallego/coq-lsp#175)
 - Allow to postpone requests to wait for data to become available on
   document points; this is implemented to provide a nicer "show goals
   while I type" experience. Client default has been changed to "show
   goals on mouse, click, typing, and cursor movement) (@ejgallego,
   ejgallego/coq-lsp#177, ejgallego/coq-lsp#179)
 - Store stats per document (@ejgallego, ejgallego/coq-lsp#180, fixes ejgallego/coq-lsp#173)
ejgallego added a commit that referenced this pull request Jan 19, 2023
We had some code duplication coming from #179, time to consolidate it.
ejgallego added a commit that referenced this pull request Jan 19, 2023
We had some code duplication coming from #179, time to consolidate it.
ejgallego added a commit that referenced this pull request Jan 20, 2023
We had some code duplication coming from #179, time to consolidate it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant