Skip to content

Commit 76adc98

Browse files
zthnojaf
andauthored
Universal dot completion (#1054)
* wip complete pipeable functions from dot completion on record when record is type t of module * correctly insert completion item text removing the dot when selecting a pipe function * add experimental mainTypeForModule annotation * complete modules in payload of mainTypeForModule * rename attribute * hover for new decorator * allow extra module completions also for pipe * make sure completions work across files * filter pipe completions to only applicable functions * pipe complete only for functions that take the expected type as the first argument * start refactoring dot completion everywhere * refactor dot completion * add a few more synthetic * disable verbose log * cleanup * pipe dot completion for builtins * Add example case (#1058) * Additional completion tests (#1062) * Add Rxjs completion test * Add Rxjs binding example * Extend Rxjs test with fully qualified access * Add@editor.completeFrom and incomplete test output * Add passing test for property completion * Test still works when types are not named t. * Add test for @editor.completeFrom * make dot completion everywhere actually work * do not care about ExtractedType now that we have incremental type checking * refactor to share pipe completion code logic * cleanup * cleanup * fix debug command * up rescript in test project * change strategy for removing dot on completion * contonous dot completion * handle dot completions on piped idents * handle scope * inline pipe completion logic again * refactor * more compl spec * refactor * changelog --------- Co-authored-by: Florian Verdonck <florian.verdonck@outlook.com>
1 parent 3d9195e commit 76adc98

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+2908
-834
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
1313
## master
1414

15+
#### :rocket: New Feature
16+
17+
- Add support for "dot completion everywhere". In addition to record fields, dots will now complete for object fields, and pipe completions applicable to the type the dot is on. You can also configure where the editor draws extra pipe completions from via the `@editor.completeFrom` attribute. https://github.com/rescript-lang/rescript-vscode/pull/1054
18+
1519
## 1.60.0
1620

1721
#### :rocket: New Feature

analysis/src/Codemod.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ let transform ~path ~pos ~debug ~typ ~hint =
4141
if debug then print_endline "Found no result";
4242
exit 1
4343
| Some switchExpr ->
44-
printExpr ~range:(Xform.rangeOfLoc switchExpr.pexp_loc) switchExpr)
44+
printExpr ~range:(Loc.rangeOfLoc switchExpr.pexp_loc) switchExpr)
4545
| _ ->
4646
if debug then print_endline "Mismatch in expected structure";
4747
exit 1)

0 commit comments

Comments
 (0)