-
Notifications
You must be signed in to change notification settings - Fork 106
[Emacs] Completion of identifiers containing spaces #233
Comments
Thanks for reporting it. I'm working on a new release including performance improvements. I'll roll a fix for this into it. |
Another thing in the same line - completion should be adjusted to work in these situations (the second more important than the first):
This is not that easy because the F# language service requires the "name" cracking to be done by the hosting editor. There is code in the monodevelop binding that takes double-ticks into account when cracking the text for the name when parsing backwards here: https://github.com/fsharp/fsharpbinding/blob/master/monodevelop/MonoDevelop.FSharpBinding/Services/LanguageService.fs#L370 I think nearly everything in that file should be put into FSharp.Compiler.Editor.dll, fsautocomplete.exe or some other shared component so that this doesn't have to be re-implemented by every editor (including the code to crack the help text for Mono) |
In both cases it should insert the missing backticks? Is this while a I agree it would be great if we could just request completions at a On Thu, Oct 31, 2013 at 12:02 PM, Don Syme notifications@github.com wrote:
|
I agree, I only there was time to do the work. On 31 Oct 2013, at 12:07, Robin Neatherway notifications@github.com wrote:
|
Hmm, the github email mangled the code block so I misunderstood. I see the point now, but I came across a strange situation trying to build a test case:
Complete at |
OK @dsyme , this is partially fixed in my current development branch at https://github.com/rneatherway/fsharpbinding/tree/async-helptext If you have time to test that would be great I haven't fixed:
As I think this requires emacs to know too much. I think the better approach is to move the abstraction further into FSharp.AutoComplete. At the moment the request has to be made at the point just after the '.', but I will move this parsing into FSharp.AutoComplete and do the backwards symbol parsing there using the Monodevelop binding code. |
Update: I was wrong about the point at which the request has to be made -- FSharp.AutoComplete already expects the sensible place. However, Emacs still has to do the same parsing so that it can know where to start the completion from (i.e. the previous '.', or start of symbol if no '.'). So some logic will have to be duplicated in the emacs code. |
Hi Don, the code you linked to doesn't actually work in the case of:
because it only searches backwards for |
I've also tested this in Visual Studio now and although it gets the list of completions correct, it doesn't perform the replacement correctly. You end up with:
I'm going to defer fixing this corner case until after releasing the current Emacs improvements. To fix in MD as well, the best approach is to merge the identifier cracking code into FSharp.CompilerBinding and improve a single copy. |
Fixed by #259 |
In the emacs mode, if a completion choice contains a space, the inserted text should have double-ticks around it, e.g.
The text was updated successfully, but these errors were encountered: