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

Fix completion for symbols passed as named arg #512

Merged
merged 4 commits into from
Sep 25, 2021

Conversation

ulugbekna
Copy link
Collaborator

prefix_of_position is getting complicated; I hope we're not breaking anything with this fix

@ulugbekna ulugbekna requested a review from rgrinberg September 21, 2021 19:36
String.sub text ~pos ~len
let reconstructed_prefix = String.sub text ~pos ~len in
(* if we reconstructed [~f:ignore], we should take only [ignore], so: *)
if not (String.is_prefix reconstructed_prefix ~prefix:"~") then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without looking at this very deeply, why doesn't the problem exist for optional arguments?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent remark. Fixed handling for optional args as well.

@ulugbekna ulugbekna merged commit b80bc62 into ocaml:master Sep 25, 2021
@ulugbekna ulugbekna deleted the fix-compl-named-arg branch September 25, 2021 15:59
rgrinberg added a commit to rgrinberg/opam-repository that referenced this pull request Sep 27, 2021
CHANGES:

- Fix debouncing of document updates. It was essentially complicated broken in
  all but the most trivial cases. (ocaml/ocaml-lsp#509 fixes ocaml/ocaml-lsp#504)

- Fix completion when passing named and functional arguments (ocaml/ocaml-lsp#512)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants