@@ -106,7 +106,7 @@ let dump files =
106
106
in
107
107
print_endline result)
108
108
109
- let complete ~path ~line ~char ~currentFile =
109
+ let complete ~path ~line ~col ~currentFile =
110
110
let state = TopTypes. empty () in
111
111
let filePath = Files. maybeConcat (Unix. getcwd () ) path in
112
112
let uri = Uri2. fromPath filePath in
@@ -118,19 +118,19 @@ let complete ~path ~line ~char ~currentFile =
118
118
| Ok (package , full ) ->
119
119
let maybeText = Files. readFile currentFile in
120
120
NewCompletions. computeCompletions ~full ~maybe Text ~package
121
- ~pos: (line, char ) ~state
121
+ ~pos: (line, col ) ~state
122
122
|> List. map Protocol. stringifyCompletionItem
123
123
|> Protocol. array
124
124
in
125
125
print_endline result
126
126
127
- let hover state ~file ~line ~char ~extra ~package =
127
+ let hover state ~file ~line ~col ~extra ~package =
128
128
let locations =
129
129
extra.SharedTypes. locations
130
130
|> List. filter (fun (l , _ ) -> not l.Location. loc_ghost)
131
131
in
132
132
let locations =
133
- let pos = (line, char ) in
133
+ let pos = (line, col ) in
134
134
let pos = Utils. cmtLocFromVscode pos in
135
135
match References. locForPos ~extra: {extra with locations} pos with
136
136
| None -> []
@@ -181,26 +181,26 @@ let hover state ~file ~line ~char ~extra ~package =
181
181
| [] -> Protocol. null
182
182
| head :: _ -> Protocol. stringifyHover head
183
183
184
- let hover ~path ~line ~char =
184
+ let hover ~path ~line ~col =
185
185
let state = TopTypes. empty () in
186
186
let filePath = Files. maybeConcat (Unix. getcwd () ) path in
187
187
let uri = Uri2. fromPath filePath in
188
188
let result =
189
189
match State. getFullFromCmt ~state ~uri with
190
190
| Error message -> Protocol. stringifyHover {contents = message}
191
191
| Ok (package , {file; extra} ) ->
192
- hover state ~file ~line ~char ~extra ~package
192
+ hover state ~file ~line ~col ~extra ~package
193
193
in
194
194
print_endline result
195
195
196
- let definition state ~file ~line ~char ~extra ~package =
196
+ let definition state ~file ~line ~col ~extra ~package =
197
197
let open TopTypes in
198
198
let locations =
199
199
extra.SharedTypes. locations
200
200
|> List. filter (fun (l , _ ) -> not l.Location. loc_ghost)
201
201
in
202
202
let locations =
203
- let pos = (line, char ) in
203
+ let pos = (line, col ) in
204
204
let pos = Utils. cmtLocFromVscode pos in
205
205
match References. locForPos ~extra: {extra with locations} pos with
206
206
| None -> []
@@ -243,14 +243,14 @@ let definition state ~file ~line ~char ~extra ~package =
243
243
| [] -> Protocol. null
244
244
| head :: _ -> Protocol. stringifyLocation head
245
245
246
- let definition ~path ~line ~char =
246
+ let definition ~path ~line ~col =
247
247
let state = TopTypes. empty () in
248
248
let filePath = Files. maybeConcat (Unix. getcwd () ) path in
249
249
let uri = Uri2. fromPath filePath in
250
250
let result =
251
251
match State. getFullFromCmt ~state ~uri with
252
252
| Error _message -> Protocol. null
253
253
| Ok (package , {file; extra} ) ->
254
- definition state ~file ~line ~char ~extra ~package
254
+ definition state ~file ~line ~col ~extra ~package
255
255
in
256
256
print_endline result
0 commit comments