Tags:
- π₯ [Breaking Change]
- π [Spec Compliance]
- π [New Feature]
- π [Bug Fix]
- π [Documentation]
- π [Internal]
- π [Polish]
- Enable incremental typechecking and project config cache by default. #1047
- Auto-format vendored OCaml sources like in compiler repo. #1053
- Fix an issue where the extension would still crash in a monorepo with rewatch
- Add hightlighting for the new dict literal syntax
dict{}
. #934
- Fix a regression with incremental typechecking in monorepos with rewatch, where the workspace directory was not properly set.
- When log files are deleted (due to a clean), the editor tooling doesn't crash anymore.
- Support for the
namespace-entry
feature of rewatch, to allow entrypoint modules for namespaced packages.
- Reduce latency of language server by caching a few project config related things. #1003
- Fix edge case in switch expr completion. #1002
- Experimental support for caching the project config to reduce latency. #1000
- Fix highlighting of other languages being affected by rescript-vscode. #973
- Use canonicalized URIs/paths for jump to definition. #982
- Fix JSX prop special case in end of JSX element. #984
- preserve URI format in canonicalizeUri. #990
- Remove workaround for canonicalize function in tests #992
- Get completions for writing new field names in a record body expressions in more cases. #997
- Make sure doc strings are always on top in hovers. #956
- Make JSX completion work for
make
functions of typeReact.component<props>
, like what you get when usingReact.lazy_
. #966 - Hover: print signature above docstrings. #969
- Adjust function template snippet return. #985
- Don't expand
type t
maker functions in patterns. #986 - Use
loc
for identifiers to get more and better completions in certain scenarios with type parameters. #993 - Improve the DX of running the code analyzer some. #995
- Add support for the rewatch build system for incremental compilation. #965
- Add support for Linux ARM64
- Statically linked Linux binaries
- Emit
%todo
instead offailwith("TODO")
when we can (ReScript >= v11.1). #981 - Complete
%todo
. #981 - Add code action for extracting a locally defined module into its own file. #983
- Add code action for expanding catch-all patterns. #987
- Add code actions for removing unused code (per item and for an entire file), driven by
reanalyze
. #989
- Update parser and compiler support files to the latest version. #998
- Extend signature help to work on constructor payloads in both expressions and patterns as well. Can be turned off if wanted through settings. #947 #954
- Show module docs for file modules. #952
- Enhance variant constructor payload completion. #946
- Clean occasional dots from "insert missing fields" code action. #948
- Pick up code actions in incremental compilation. #948
- Various improvements to the signature help functionality. #950
- Clean up completion item "details" and "documentation". #952
- Stability fixes for the experimental incremental compilation mode. #945
- Fix null checks for editor config, so things don't blow up. #944
- Experimental support for type checking without saving the file π. #939
- Fix issue with unlabelled arg code swallowing completions. #937
- Fix issue where completion inside of switch expression would not work in some cases. #936
- Fix bug that made empty prop expressions in JSX not complete if in the middle of a JSX element. #935
- Enhance decorator completion. #908
- Completion for import attributes in
@module
. #913 - Relax filter for what local files that come up in from and regular string completion in
@module
. #918 - Make from completion trigger for expr hole so we get a nice experience when completing {from: } in
@module
. #918 - Latest parser for newest syntax features. #917
- Handle completion for DOM/element attributes and attribute values properly when using a generic JSX transform. #919
- Highlight tagged template literal functions as functions. #920
- Complete for
type t
values when encountering atype t
in relevant scenarios. #924 - Highlight escaped sequences as a whole and not only the first character. #929
- Start highlighting escaped sequences in template literals. #929
- Prefer Core's
RegExp
when Core is open and completing for regexp functions. #903 - Add
%re("")
to the completions list when completing in a position where a regexp value is expected. #903
- Fix issue with completion in nested patterns that would make it not possible to complete for new record fields via trailing commas in certain situations. #906
- Fix issue with ambigious wraps in JSX prop values (
<SomeComp someProp={<com>}
) - need to figure out if we're completing for a record body or if{}
are just wraps for the type ofsomeProp
. In the case of ambiguity, completions for both scenarios are provided. #894 - Many bugfixes around nested pattern and expression completion. #892
- Fix (very annoying) issue where empty pipe completion wouldn't work inside of a parenthesised function call:
Console.log(someArray->)
completing at the pipe. #895
- More cases of not emitting
_
when completing in expressions. #890
- Move
rescript-tools
to OCaml code and makeanalysis
an library. #855
- Complete domProps for lowercase JSX components from
ReactDOM.domProps
if possible. #883 - Complete for maker-style functions (functions returning type
t
of a module) when encountering atype t
in relevant scenarios. #884 - Expand type aliases in hovers. #881
- Better error recovery when analysis fails. #880
- Do not emit
_
when completing in expressions. #885 - Include fields when completing a braced expr that's an ID, where it the path likely starts with a module. #882
- Fix so that you don't need a leading
#
to complete for polyvariant constructors. #874 - Print keyword polyvariant constructors with quotes when doing completions. #877
- If interface file exists, ask if it should be overwritten. #865
- Proper default for
"uncurried"
in V11 projects. #867 - Treat
result
type as a proper built in type. #860 - Fix infinite loop when resolving inferred completions when several values in scope has the same name. #869
- Fix crash when trying to print recursive polymorphic variants without a concrete definition. #851
- Fix
rescript-language-server --version
command. #873 - Print exotic polyvariant constructor names with quotes when doing completion. #870
- Change end position of cursor when completing
Some(<fieldName>)
in patterns. #857
- Add support for detecting dead fields inside inline records. #858
- Fix issue introduced in recent PR for module completion. #856
- More robust handling of namespaces in pipe completions. #850
- Clean up name of namespaced module when hovering. #845
- Don't complete illegal file module names. #844
- Fix issue
open
on submodules exposed via-open
in bsconfig.json/rescript.json, that would cause the content of thoseopen
modules to not actually appear in autocomplete. #842 - Account for namespace when filtering pipe completion items. #843
- Resolve module aliases in hover. #820
- Add support for syntax highlighting in
%raw
and%ffi
extension points. #774 - Add completion to top level decorators. #799
- Add code action for wrapping patterns where option is expected with
Some
. #806 - Better completion from identifiers with inferred types. #808
- Make suggested template functions async when the target function returns a promise. #816
- Fix code action for inserting undefined record fields in ReScript v11. #817
- Revamp "Insert missing cases" code action to make it apply in more cases and be much more robust. #804
- Make the completion engine understand async/await. #813
- Comments are now automatically closed and indented. #815
- Fix invalid range for
definition
. #781 - Don't emit object keys in uppercase as namespace. #798
- Fix accidental output of extra
|
when producing exhaustive switch code for polyvariants. #805 - Fix JS syntax highlighting in single-line FFI extension points. #807
- Fix signature help in uncurried mode. #809
- Fix various issues in uncurried mode. #810
- Fixes a bug in pattern completion where for example
result
wouldn't complete, due to type variables getting lost/not being instantiated. #814 - Fix bug where pipes would not be considered in certain cases when completing for single unlabelled function arguments. #818
- Docstring template Code Action. #764
- Improve unlabelled argument names in completion function templates. #754
- Add
Some(fieldName)
case when completing in a pattern with an option on a record field. #766
- Fix URL scheme for Code Action. #748
- Support uncurried functions in various places where we look up and use function types. #771
- Greatly extend completion abilities for unsaved code. WARNING: Might be a bit unstable initially. Report any issues you see. #712
- Provide hovers for more unsaved code via the new completion features. #749
- Enable completion for
Js.Exn.Error(error)
when pattern matching onexn
. This is to make theJs.Exn.Error
API more discoverable. #728
- Signature Help is now considered stable, and enabled for all users. Can still be turned off in settings.
- Show whether record fields and variant constructors are deprecated when completing. #731
- Prettify how optional record fields are printed in the completion item detail. #737
- Fix crashes in document symbol requests when broken syntax exists. #736
- Add autocomplete for function argument values (booleans, variants and options. More values coming), both labelled and unlabelled. #665
- Add autocomplete for JSX prop values. #667
- Add snippet support in completion items. #668
- Add support from completing polyvariants as values. #669
- Add support for completion in patterns. #670
- Add support for pattern completion of unsaved tuples. #679
- Add support for completion in typed expressions. #682
- Complete for
React.element
creator functions (React.string
etc) when in JSX context. #681 - Handle optional record fields in expression/pattern completion. #691
- Expand options in completion to make working with options a bit more ergonomic. #690
- Let
_
trigger completion in patterns. #692 - Support inline records in completion. #695
- Add way to autocomplete an exhaustive switch statement for identifiers. Example: an identifier that's a variant can have a switch autoinserted matching all variant cases. #699
- Support typed expression completion for lowercase (builtin) JSX tags. #702
- Support typed expression completion driven by type annotations. #711
- Completion for lowercase JSX elements, treating them like HTML elements. #719
- Prefer opened
Belt
modules in autocomplete when-open Belt
is detected inbsconfig
. #673 - Improve precision in signature help. You now do not need to type anything into the argument for it to highlight. #675
- Remove redundant function name in signature help, to clean up what's shown to the user some. #678
- Show docstrings in hover for record fields and variant constructors. #694
- The necessary leading
?
is now automatically inserted for optional fields when destructuring records. #715
- Highlight
catch
like a keyword #677 - Make signature help work in calls nested inside of other calls. #687
- Fix pipe completion to work on aliased types. #700
- Fix issue with not finding type for function arguments. #706
- Fix incorrect syntax in hover help for module. #709
- Remove spacing between type definition in clients that do not support markdown links. #619
- Rename custom LSP methods names. #611
- Better performance for Inlay Hints and Codelens. #634
- Accept both
@ns.doc
and the new@res.doc
for the internal representation of doc comments. And both@ns.optional
and@res.optional
for the optional fields. #642 - Make pipe completion work more reliably after function calls. #656
- Make pipe completion work in pipe chains, not just on the first pipe. #656
- Make pipe completion work reliably when the path resolution needs to traverse submodules #663
- Make pipe completion work (after saving/compiling) when the return type of a function call is unknown until compilation #662
- Add pipe completion for
int
andfloat
constants #664
-
Fix issue where
-open Some.Path
in"bsc-flags"
would sometimes be treated differently fromopen Some.Path
locally in a file #616 -
Fix issue where doc comment is not shown on hover in case of shadowed identifier (in particular for JSX V4 components which shadow
make
) #621 -
Adapt command to create interface files to latest JSX V4 (no key prop, possibly empty record) #617
-
Fix issue where pipes were not taken into account in the signature help, resulting in the highlighted argument in signature help always being off by one for unlabelled arguments in piped expressions #626
-
Fix incorrect type hint for module type. #626
-
Fix file location in Document Symbols response. #629
-
Fix issue where create interface file would not work with certain JSX V4 components #617
-
Fix issue with completing
foo. x
wherex
should not be part of the completion #644 -
Fix issue where code analysis would not track types in inner modules across implementations and interfaces rescript-lang/reanalyze#186
-
Fix issue with references to elements defined in an interface file #646
-
Fix issue with references from implementation files which also happen to have interface files #645
-
Fix issue where jump to definition would go to the wrong place when there are aliased identifiers in submodules #653
-
Fix issue where document symbols were not shown nested #655
- Add configuration parameter
"transitive"
under"reanalyze"
isbsconfig.json
and make reportst non-transitive by default. If set tofalse
, the analysis does not report transitively dead items. So removing the reported item individually can be done in isolation. This is a more fine-grained process for guiding the user to remove dead code one item at a time. #601 #610 This feature comes from a conversation with @jfmengels on how https://github.com/jfmengels/elm-review is designed.
- Fix issue where module paths in
-open
inbsc-flags
such as "-open ReScriptJs.Js" were not recognized #607
- Add support for prop completion for JSX V4 #579
- Add support for create interface file for JSX V4 #580
- Expand one level of type definition on hover. Dig into record/variant body. #584
- Add clickable links to type definitions in hovers. #585
- Add experimental signature help for function calls. #547
- Fix printing of record types with optional fields #584
- Inlay Hints (experimental).
rescript.settings.inlayHints.enable: true
. Turned off by default. #453 - Code Lenses for functions (experimental).
rescript.settings.codeLens: true
. Turned off by default. #513 - Markdown code blocks tagged as
rescript
now get basic syntax highlighting. #97 - Hover support for doc comments on v10 compiler
/** this is a doc comment */
- Fix issue where debug output would end up in the JSON file produced by Reanalyze #575
- Fix issue where autocomplete would not perform type instantiation #561
- Fix issue where hovering over a field in record construction would show the type without instantiating its type arguments #560
- Fix Incorrect semantic highlighting of
external
declarations #517 - Fix issue where doc comment with nested comments inside is not shown properly on hover #526
- Fix server crashes when open file is removed from disk with inlayHints enabled #538
- Fix inlay hint for destructured record/array #536
- Fix finding the ReScript bin for even more kinds of setups.
- Document the process of finding the ReScript bin in README.
- Fix formatting not preferring the locally installed formatter (if available), which made formatting potentially different between formatting via
rescript format
and the extension. - Fix finding the ReScript bin in monorepos
- Add command: ReScript: Restart Language Server
- Extend integration with reanalyze for code analysis. Support both
dce
andexception
analysis which can be configured to e.g. both run by adding{"reanalyze": {"analysis": ["dce", "exception"]} }
inbsconfig.json
. - Add configuration option for suppressing the "Do you want to start a build?" prompt.
- Add configuration option for autostarting the Code Analyzer.
- Report syntax errors as you type.
- Fix issue with autocompletion for constructors in switch statements.
- Fix issue with autocompletion inside template expressions.
- Fix handling of local opens.
- Fix extension crash when renaming a file.
- Fix issue where the server would crash on genType's errors.
- Fix issue where the server would crash if the project contains an OCaml file with a syntax error.
- Fix issue where
@inline
was not suported by the command to generate an interface file.
- Add hover information with links to documentation for decorators.
- Sync with latest parser/printer.
- Support paths to rescript executables in arm64 architectures.
- Drop support for
bs-patform
. Onlyrescript
supported.
- Fix issue where using paths of the form
./something
would show multiple copies of the same file in vscode. - When hovering on a field access, show the instantiated type of the field.
- Support autocomplete for objects from another module
M.x[...
. - Fix command for creating interface files when the project uses namespaces.
- Added command
ReScript: Open the compiled JS file for this implementation file.
. - Use semantic syntax highlighting (#367).
- Report "Fatal error" when it happens in the compiler log (e.g. a make function with type annotation) and don't crash the extension.
- Fix issue in functions the form "~foo as name" where the location would only cover "ame".
- Extend the command to create an interface file, to support components and ReScript decorators used in bindings.
- Enable formatting files without needing the file to be in an actual ReScript project.
- New feature: Show Outline which was previously disabled.
- Add command to quickly switch between implementation and interface file.
- Support hover on JSX props and labelled arguments.
- Fix issue with highlighting of interpolation strings (those with backticks) introduced in release 1.2.0.
- Fix crash when the project contains OCaml files that have warnings.
- Fix crash on hover when a dependency contains a type with functor application. This is not expressible in ReScript syntax, but can appear in a dependent OCaml package and be pulled in for processing by the extension.
- Remove obsolete
@bs
snippets
Features:
- Add autocompletion for object access of the form
foo["x"]
andfoo["x"]["y"]["z"]
. - Support autocomplete of records for variables defined in other files.
- Improve autocomplete when several values have the same name, with a heuristic to approximate the correct scope.
- Add a "Dead Code Analysis" mode that will highlight globally dead values, redundant optional arguments, dead modules, dead types (records and variants) (#334)
Fixes:
- Fix issue in JSX autocomplete when the component is declared external.
- Fix jump-to-definition for uncurried calls.
- Fix issue where values for autocomplete were pulled from implementations instead of interfaces.
- Fix issue with autocomplete then punned props are used in JSX. E.g.
<M foo ...>
. - Fix issue with JSX autocompletion not working after
foo=#variant
. - Fix issue in JSX autocompletion where the
key
label would always appear. - Fix issue in record field autocomplete not working with type aliases.
- Fix issue where autocomplete for local values would not work in the presence of
@react.component
annotations. - Fix issue where the server would crash on large output produced by the binary command.
- Fix issue where the server would crash when a file has a self cycle.
Features:
- Find references to files as modules.
- Autocomplete: skip inline comments to decide if a labeled argument was already supplied.
- Rename: support file rename when renaming a module name.
- Rename: use renameProvider to give a warning when it's not a symbol that can be renamed.
- Jump to definition: support jumping to type definition.
- Jump to definition: jump to the
res
file when bothres
andresi
are present. - Restore creation of interface files (fully supported from compiler 9.1.3 onwards).
Features:
- Rename has landed! Works across-files!
- More autocomplete improvements.
- Wider Linux support.
This update contains lots of autocomplete, hover and jump-to-definition improvements. We'll list only a few below.
Fixes:
- Jump-to-definition on some Windows paths.
->
autocomplete overruled.
.- Hover on components in interface files.
Features:
- Show References! Works cross-files too.
- Hover now supports markdown docs.
- Hover on labels in component functions with compiler version 9.1, and labels with type annotation.
- Don't show file path on hover and autocomplete (cleaner).
- Autocomplete for props in JSX components.
->
autocomplete for built-in list, array, string, option types. And for string and array literals.- Slimmer download.
Breakages:
- Very old linux versions are no longer supported.
- Hover: no more odoc format support (but it'll still display as text).
Fixes:
- Diagnostics display for long lines.
Features:
- Full support for the newest
rescript
npm package! - Highlight type parameters.
Fixes:
- Highlighting for some decorators and keywords.
- Various hover & autocomplete opportunities.
Features:
- Autocomplete for
->
pipe! - Autocomplete for decorators such as
@module
and@val
and@deprecated
. - Autocomplete for labels
func(~...)
. - Support for the upcoming
rescript
npm package.
Fixes:
- Diagnostics crashing when a file's range isn't found (advice: use fewer ppxes that cause these bugs!). See #77.
- Weird behaviors when project path contains white space.
- Proper audit of the windows bugs. Windows is now officially first-class!
Syntax colors:
- Highlight operators for default VSCode dark+ theme. This means slightly less diverse highlight for the other themes that previously already highlighted operators.
- Worked with One Dark Pro and Mariana Pro. We now officially recommend these 2 themes, in addition to the existing recommendations in README.
- Highlight deprecated elements using the deprecation scopes.
- JSX bracket highlight fix (still no color; before, some parts were erroneously highlighted).
Features:
- Custom folding. See README.
- Support for doc strings when hovering on modules.
- Jump to type definition for types defined in inner modules.
Fixes:
- Properly highlight nested comments.
- Windows diagnostics!
- Removed a potential infinite loop issue in autocomplete.
- Don't autocomplete
open MyModule
inside line comments. - Don't print parentheses as in
A()
for 0-ary variants.
- Some diagnostics watcher staleness fix.
- Various type hover fixes.
- Monorepo/yarn workspace support.
- All the usual features (type hint, autocomplete) now work on
bsconfig.json
too! - Snippets, to ease a few syntaxes.
- Improved highlighting for polymorphic variants. Don't abuse them please.
- Fix temp file creation logic.
Official first release!