|
1 | 1 | let dumpLocations ~package ~file ~extra =
|
2 |
| - let locations = |
3 |
| - extra.SharedTypes.locations |
4 |
| - |> List.filter (fun (l, _) -> not l.Location.loc_ghost) |
5 |
| - in |
| 2 | + let locations = extra.SharedTypes.locations in |
6 | 3 | locations
|
7 | 4 | |> List.map (fun ((location : Location.t), loc) ->
|
8 | 5 | let hoverText = Hover.newHover ~package ~file loc in
|
@@ -52,10 +49,7 @@ let complete ~path ~line ~col ~currentFile =
|
52 | 49 | print_endline result
|
53 | 50 |
|
54 | 51 | let hover ~file ~line ~col ~extra ~package =
|
55 |
| - let locations = |
56 |
| - extra.SharedTypes.locations |
57 |
| - |> List.filter (fun (l, _) -> not l.Location.loc_ghost) |
58 |
| - in |
| 52 | + let locations = extra.SharedTypes.locations in |
59 | 53 | let pos = Utils.protocolLineColToCmtLoc ~line ~col in
|
60 | 54 | match References.locForPos ~extra:{extra with locations} pos with
|
61 | 55 | | None -> Protocol.null
|
@@ -94,10 +88,7 @@ let hover ~path ~line ~col =
|
94 | 88 | print_endline result
|
95 | 89 |
|
96 | 90 | let definition ~file ~line ~col ~extra ~package =
|
97 |
| - let locations = |
98 |
| - extra.SharedTypes.locations |
99 |
| - |> List.filter (fun (l, _) -> not l.Location.loc_ghost) |
100 |
| - in |
| 91 | + let locations = extra.SharedTypes.locations in |
101 | 92 | let pos = Utils.protocolLineColToCmtLoc ~line ~col in
|
102 | 93 |
|
103 | 94 | match References.locForPos ~extra:{extra with locations} pos with
|
@@ -135,10 +126,7 @@ let definition ~path ~line ~col =
|
135 | 126 | print_endline result
|
136 | 127 |
|
137 | 128 | let references ~file ~line ~col ~extra ~package =
|
138 |
| - let locations = |
139 |
| - extra.SharedTypes.locations |
140 |
| - |> List.filter (fun (l, _) -> not l.Location.loc_ghost) |
141 |
| - in |
| 129 | + let locations = extra.SharedTypes.locations in |
142 | 130 | let pos = Utils.protocolLineColToCmtLoc ~line ~col in
|
143 | 131 |
|
144 | 132 | match References.locForPos ~extra:{extra with locations} pos with
|
@@ -187,8 +175,7 @@ let documentSymbol ~path =
|
187 | 175 | | Module (Structure contents) -> (Module, getItems contents)
|
188 | 176 | | Module (Ident _) -> (Module, [])
|
189 | 177 | in
|
190 |
| - if extentLoc.loc_ghost then siblings |
191 |
| - else (txt, extentLoc, item) :: siblings |
| 178 | + (txt, extentLoc, item) :: siblings |
192 | 179 | in
|
193 | 180 | let x = topLevel |> List.map fn |> List.concat in
|
194 | 181 | x
|
|
0 commit comments