-
-
Notifications
You must be signed in to change notification settings - Fork 282
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
Adds setting for FullNameExternalAutocomplete, Fix PipelineHint localization, Fix sending lines to fsi #1952
Conversation
add: new FSAC config fullNameExternalAutocomplete to package.json fix: PipelineHint display wrong with localized type param output improve: use correct line number when sending lines to fsi
Hi, thanks for this! The fixes for 1. and 3. make sense to me - can you clarify on what the problem for 2. was? I'm having a hard time understanding what the minimal version of the problem is. |
When displaying pipeline hints, it will first find the type parameters of operator (|>), and then extract type names. The problem is that the original way to extract names is based on English (as it will first find the word "is"), and will reduced wrong output when compiler doesn't give an English text. For example, in this code snippet 1
|> (+) 2 F# compiler will give " 'T1 is int " and " 'U is int " under English environment, and will extract type names correctly to "int". |
As all the localized "is" listed in text of F# compiler is a single word (like this, and type parameters text is all like "'T is something", so we can use a regex to extract the type name out. |
Ok, that makes sense. It is fair to say that a better FSAC endpoint targeted for this use case would make this task easier/less variable for non-English locales? |
Also, unrelated to this PR - would you suggest that Ionide itself support localizations for strings that we have or emit? Like the settings descriptions, etc? I've recently set up localization for another VSCode extension and it's on my mind. |
Note that we'll need to publish and update FSAC before this setting will have any effect, but we can do that today so that we can push this out :) |
What does this exactly mean?
if it's not difficult to achieve, then it is a good idea. |
All I mean here is that I think it would be useful for FSAC to have an API specifically for powering pipeline hints (possibly using the same infrastructure as other inlay hints?) and let FSAC use a more structured form of the data instead of the string manipulation that currently happens in Ionide. |
WHAT
🤖 Generated by Copilot at 53f4abb
This pull request adds a new option for customizing external autocomplete, a feature for sending the current line to F# interactive, and a bug fix for the pipeline hints type signatures. It affects the files
release/package.json
,src/Components/Fsi.fs
, andsrc/Components/LineLens/PipelineHints.fs
.🤖 Generated by Copilot at 53f4abb
🐛🛠️🚀
WHY
HOW
🤖 Generated by Copilot at 53f4abb
release/package.json
(link)