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] Allow to postpone and cancel requests #141

Merged
merged 1 commit into from
Jan 11, 2023

Conversation

ejgallego
Copy link
Owner

@ejgallego ejgallego commented Jan 3, 2023

Some requests need to be delayed until the document is ready, such as
documentSymbols. In order to do this, we allow to postpone requests,
and Doc_manager.check will now return the list of requests pending
for a given document.

The implementation is lightweight and quite a prototype, but should
serve as a basis for more advanced stuff.

Closes #124.

controller/coq_lsp.ml Outdated Show resolved Hide resolved
etc/doc/PROTOCOL.md Outdated Show resolved Hide resolved
controller/coq_lsp.ml Outdated Show resolved Hide resolved
ejgallego added a commit that referenced this pull request Jan 3, 2023
Extracted from #141 as not to block other works.

This will make the changes in #136 to use `find_opt` much easier.
@ejgallego ejgallego force-pushed the document_symbol_delay branch 2 times, most recently from ee99281 to 9449b8d Compare January 3, 2023 18:41
@ejgallego ejgallego modified the milestones: 0.1.2, 0.1.3 Jan 4, 2023
@ejgallego ejgallego force-pushed the document_symbol_delay branch 4 times, most recently from b491065 to 6c01fe6 Compare January 11, 2023 19:14
@ejgallego ejgallego changed the title [controller] Rework document handling, allow requests to trigger on document changes [controller] Allow to postpone and cancel requests Jan 11, 2023
@ejgallego ejgallego marked this pull request as ready for review January 11, 2023 19:15
@ejgallego ejgallego force-pushed the document_symbol_delay branch 2 times, most recently from 200b2df to c36a614 Compare January 11, 2023 19:16
Some requests need to be delayed until the document is ready, such as
`documentSymbols`. In order to do this, we allow to postpone requests,
and `Doc_manager.check` will now return the list of requests pending
for a given document.

The implementation is lightweight and quite a prototype, but should
serve as a basis for more advanced stuff.

Closes #124.
@ejgallego ejgallego merged commit 5afbd81 into main Jan 11, 2023
@ejgallego ejgallego deleted the document_symbol_delay branch January 11, 2023 19:56
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)
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.

[documentSymbol] Stream / delay results
2 participants