Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
voodoos committed Jan 29, 2024
1 parent 1c3ebfd commit ccedef9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
3 changes: 2 additions & 1 deletion ocaml-lsp-server/src/code_actions/action_inline.ml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ end = struct
let pat_iter (type k) (iter : I.iterator)
(pat : k Typedtree.general_pattern) =
match pat.pat_desc with
| Tpat_var (id, { loc; _ }, _) -> paths := Loc.Map.set !paths loc (Pident id)
| Tpat_var (id, { loc; _ }, _) ->
paths := Loc.Map.set !paths loc (Pident id)
| Tpat_alias (pat, id, { loc; _ }, _) ->
paths := Loc.Map.set !paths loc (Pident id);
I.default_iterator.pat iter pat
Expand Down
21 changes: 11 additions & 10 deletions ocaml-lsp-server/src/ocaml_lsp_server.ml
Original file line number Diff line number Diff line change
Expand Up @@ -439,17 +439,18 @@ let references rpc (state : State.t)
(Occurrences (`Ident_at (Position.logical position), `Project))
in
let+ () =
if not desync then Fiber.return () else
let msg =
let message =
"The index might be out-of-sync and only local results are shown. \
If you use Dune you can build the target `@ocaml-index` to refresh \
the index."
if not desync then Fiber.return ()
else
let msg =
let message =
"The index might be out-of-sync and only local results are shown. \
If you use Dune you can build the target `@ocaml-index` to \
refresh the index."
in
ShowMessageParams.create ~message ~type_:Warning
in
ShowMessageParams.create ~message ~type_:Warning
in
task_if_running state.detached ~f:(fun () ->
Server.notification rpc (ShowMessage msg))
task_if_running state.detached ~f:(fun () ->
Server.notification rpc (ShowMessage msg))
in
Some
(List.map locs ~f:(fun loc ->
Expand Down

0 comments on commit ccedef9

Please sign in to comment.