Skip to content

Commit 53fd4e0

Browse files
authored
Disable jump code action by default (#1411)
In some cases these can make the codeAction request slow (>2s).
1 parent 09eb7b5 commit 53fd4e0

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

CHANGES.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# Unreleased
2+
3+
## Fixes
4+
5+
- Deactivate the `jump` code actions by default. Clients can enable them with
6+
the `merlinJumpCodeActions` configuration option. Alternatively a custom
7+
request is provided for ad hoc use of the feature. (#1411)
8+
19
# 1.20.0
210

311
## Features

ocaml-lsp-server/src/code_actions.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ let compute server (params : CodeActionParams.t) =
118118
let open_related = Action_open_related.for_uri capabilities doc in
119119
let* merlin_jumps =
120120
match state.configuration.data.merlin_jump_code_actions with
121-
| Some { enable = true } | None -> Action_jump.code_actions doc params capabilities
122-
| Some { enable = false } -> Fiber.return []
121+
| Some { enable = true } -> Action_jump.code_actions doc params capabilities
122+
| Some { enable = false } | None -> Fiber.return []
123123
in
124124
(match Document.syntax doc with
125125
| Ocamllex | Menhir | Cram | Dune ->

0 commit comments

Comments
 (0)