Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions analysis/src/CompletionBackEnd.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1816,9 +1816,6 @@ let rec processCompletable ~debug ~full ~scope ~env ~pos ~forHover completable =
let keyLabels =
if Utils.startsWith "key" prefix then [mkLabel ("key", "string")] else []
in
(* We always try to look up completion from the actual domProps type first.
This works in JSXv4. For JSXv3, we have a backup hardcoded list of dom
labels we can use for completion. *)
let pathToElementProps = TypeUtils.pathToElementProps package in
if Debug.verbose () then
Printf.printf
Expand Down Expand Up @@ -1852,12 +1849,7 @@ let rec processCompletable ~debug ~full ~scope ~env ~pos ~forHover completable =
Printf.printf
"[completing-lowercase-jsx] could not find element props to complete \
from.\n";
(CompletionJsx.domLabels
|> List.filter (fun (name, _t) ->
Utils.startsWith name prefix
&& (forHover || not (List.mem name identsSeen)))
|> List.map mkLabel)
@ keyLabels)
keyLabels)
| Cjsx (componentPath, prefix, identsSeen) ->
let labels =
CompletionJsx.getJsxLabels ~componentPath ~findTypeOfValue ~package
Expand Down
Loading