File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 11open Import
22
3- let action = " destruct"
3+ let action_kind = " destruct"
44
55let code_action_of_case_analysis uri (loc , newText ) =
66 let edit : WorkspaceEdit.t =
77 let textedit : TextEdit.t = { range = Range. of_loc loc; newText } in
88 let uri = Uri. to_string uri in
99 WorkspaceEdit. create ~changes: [ (uri, [ textedit ]) ] ()
1010 in
11- let title = String. capitalize_ascii action in
12- CodeAction. create ~title ~kind: (CodeActionKind. Other action ) ~edit
11+ let title = String. capitalize_ascii action_kind in
12+ CodeAction. create ~title ~kind: (CodeActionKind. Other action_kind ) ~edit
1313 ~is Preferred:false ()
1414
1515let code_action doc (params : CodeActionParams.t ) =
Original file line number Diff line number Diff line change 11open Import
22
3- val action : string
3+ val action_kind : string
44
55val code_action :
66 Document .t
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ let not_supported () =
1414
1515let initialize_info : InitializeResult.t =
1616 let codeActionProvider =
17- let codeActionKinds = [ CodeActionKind. Other Destruct_lsp. action ] in
17+ let codeActionKinds = [ CodeActionKind. Other Destruct_lsp. action_kind ] in
1818 `CodeActionOptions (CodeActionOptions. create ~code ActionKinds () )
1919 in
2020 let textDocumentSync =
@@ -157,8 +157,8 @@ let code_action server (params : CodeActionParams.t) =
157157 let state : State.t = Server. state server in
158158 let store = state.store in
159159 match params.context.only with
160- | Some set when not ( List. mem ( CodeActionKind. Other Destruct_lsp. action) ~set )
161- ->
160+ | Some set
161+ when not ( List. mem ( CodeActionKind. Other Destruct_lsp. action_kind) ~set ) ->
162162 Fiber. return (Ok (None , state))
163163 | Some _
164164 | None ->
You can’t perform that action at this time.
0 commit comments