Skip to content

treat signature help as a stable feature #726

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 6, 2023
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@

- Enable completion for `Js.Exn.Error(error)` when pattern matching on `exn`. This is to make the `Js.Exn.Error` API more discoverable. https://github.com/rescript-lang/rescript-vscode/pull/728

#### :nail_care: Polish

- Signature Help is now considered stable, and enabled for all users. Can still be turned off in settings.

## 1.12.0

#### :rocket: New Feature
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ You'll find all ReScript specific settings under the scope `rescript.settings`.
| ReScript Platform Path | The extension will look for the existence of a `node_modules/rescript` directory and use the subdirectory corresponding to the current platform as the `platformPath`. If it does not find it at the project root (which is where the nearest `bsconfig.json` resides), it goes up folders in the filesystem recursively until it either finds it (often the case in monorepos) or hits the top level. To override this lookup process, the path can be configured explicitly using the setting `rescript.settings.platformPath` |
| Inlay Hints (experimental) | This allows an editor to place annotations inline with text to display type hints. Enable using `rescript.settings.inlayHints.enable: true` |
| Code Lens (experimental) | This tells the editor to add code lenses to function definitions, showing its full type above the definition. Enable using `rescript.settings.codeLens: true` |
| Signature Help (experimental) | This tells the editor to show signature help when you're writing function calls. Enable using `rescript.settings.signatureHelp.enable: true` |
| Signature Help | This tells the editor to show signature help when you're writing function calls. Enable using `rescript.settings.signatureHelp.enabled: true` |
| Autostarting the Code Analyzer | The Code Analyzer needs to be started manually by default. However, you can configure the extension to start the Code Analyzer automatically via the setting `rescript.settings.autoRunCodeAnalysis`. |

**Default settings:**
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@
"default": false,
"description": "Enable (experimental) code lens for function definitions."
},
"rescript.settings.signatureHelp.enable": {
"rescript.settings.signatureHelp.enabled": {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing the name of this setting so it resets for all users, and defaults to true.

"type": "boolean",
"default": false,
"description": "Enable (experimental) signature help for function calls."
"default": true,
"description": "Enable signature help for function calls."
},
"rescript.settings.binaryPath": {
"type": ["string", "null"],
Expand Down
6 changes: 3 additions & 3 deletions server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ interface extensionConfiguration {
binaryPath: string | null;
platformPath: string | null;
signatureHelp: {
enable: boolean;
enabled: boolean;
};
}

Expand All @@ -63,7 +63,7 @@ let extensionConfiguration: extensionConfiguration = {
binaryPath: null,
platformPath: null,
signatureHelp: {
enable: false,
enabled: true,
},
};
// Below here is some state that's not important exactly how long it lives.
Expand Down Expand Up @@ -1145,7 +1145,7 @@ function onMessage(msg: p.Message) {
workDoneProgress: false,
}
: undefined,
signatureHelpProvider: extensionConfiguration.signatureHelp?.enable
signatureHelpProvider: extensionConfiguration.signatureHelp?.enabled
? {
triggerCharacters: ["("],
retriggerCharacters: ["=", ","],
Expand Down