Comments (5)
I have an unstable prototype with this functionality, though far from useful on real world codeβ¦
This feature will come, but don't expect it soon :).
from merlin.
Just for your information, you can find early support for object completion in "object-support".
No efforts are done at the moment to complete/recover inside class definitions, but assistance is provided when using an object :).
Note that this is experimental code, it may be less stable than current version.
from merlin.
I'll give it a try tonight. Too bad I do not come by objects too often in my code :D
from merlin.
Well, this is a first step toward a more general type-directed completion: at the moment only completing object methods, but some day we hope to use type of the function being applied to list labels, type of arguments, sort completion suggestions by type, and during matching, suggest constructors of type being matched in patterns.
It could even be possible to create template of matching construction, like prefilling "| Some <> -> <> | None -> <>" when the user types "match x with β¦" when x as an option type. Probably a bit too much (though it could be used to suggest missing cases), but still interesting feature :).
from merlin.
Type-directed templates for generating basic code for matching all cases could be very useful, particularly with larger variants!
from merlin.
Related Issues (20)
- ppx deriving on a type adversely affects merlin location HOT 1
- Destructing punned record field breaks syntax HOT 1
- emacs' merlin-mode highlighting of code w/ errors is just bad HOT 11
- Confusion between module type and module of the same name HOT 3
- Rename does not work properly with ppx_string HOT 2
- [regression] ppx broken on Windows in 4.9 (was working on 4.8) HOT 3
- Enrich Merlin telemetry with GC info HOT 1
- Unclean sources HOT 2
- Issue when destructing tuples in letops
- #1664 may select a worse ghost node if both nodes are ghost
- Feature: provide information about the syntax HOT 1
- Improve the granularity of the typer cache to maximise reuse. HOT 1
- merlin.hide can hide type-signatures inside modules? HOT 2
- Build failure of `merlin-lib` with OCaml 4.14.1: `Error: Unbound value Sys.is_regular_file` HOT 2
- Missing a source digest when looking for an implementation HOT 1
- `501-preview` doesn't interpret the `-cmi-file` flag on the command line. HOT 1
- Suprious `A type variable is unbound in this type declaration` on module not found
- Enrich Merlin telemetry with info about cache hits and misses HOT 1
- merlin gives syntax error on #use directive (or #require) HOT 1
- OCaml 5.1.1 support HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from merlin.