Closed guillermooo closed 9 years ago
@rojepp PTAL commit by commit. Sorry, I got carried away with the changes and lumped everything together.
I see squigglies in .fsx files now, great!
There's code in here that seem to implement tooltips, but I don't see any?
Just a note, if it wasn't clear, you can now load multiple projects and they will all be 'active', you aren't limited to just one at a time anymore. So load away and let FSAC worry about it!
@rneatherway How can you 'unset' a project? Maybe it isn't necessary, I'm not sure. If you have previously opened a project, and then navigate to an .fsx file, you wouldn't wan't fsac to analyze it as if it is part of the project. I'm thinking that could lead to errors not being caught by FSAC. Like missing #r ...
statements for instance.
You can't unset a project, I don't think it's needed. .fsx files are always analysed completely independent of any project, which is consistent with Visual Studio.
Ah, ok, didn't know that. Then I'll make sure not to unload projects. Wondered the same as @rojepp.
@rojepp Re. tooltips: Press Ctrl+k, Ctrl+i on any symbol.
(Often, I get multiple "ERROR NOT PARSED" from fsac before the tooltip finally shows up.)
You must send a parse command for a file before anything else, like requesting tooltips. This is just making fsac aware of the current state of the file. I would do it before each other command, and on idle for errors. On 23 May 2015 19:40, "Guillermo López-Anglada" notifications@github.com wrote:
@rojepp https://github.com/rojepp Re. tooltips: Press Ctrl+k, Ctrl+i on any symbol.
(Often, I get multiple "ERROR NOT PARSED" from fsac before the tooltip finally shows up.)
— Reply to this email directly or view it on GitHub https://github.com/fsharp/sublime-fsharp-package/pull/17#issuecomment-104935764 .
@rneatherway I'm currently re-parsing on_idle after 1,5 secs no matter what.
I get the error I mentioned even with clean views, so I'm not sure what may be wrong.
Do you parse on opening a file, and before each other command?
For example, the emacs code for goto definition: https://github.com/fsharp/emacs-fsharp-mode/blob/master/fsharp-mode-completion.el#L457
If you do, then can you post a log of the communication?
I do parse on_load. I'll experiment with re-parsing before every command and see if that helps.
@rneatherway @rojepp
Ok, forcing a re-parse does seem to help. PTAL at the latest changes. If everything's ok, I'll merge with master.
LGTM! Great to see progress here! I'm sure there are still issues to fix but this is progress. It seems the re-parse makes completions usable. Please re-enable fs_dot and I think this should be merged. Btw, @guillermooo can we get your contact details? Robin wanted to mail you and I've wanted to chat with you this week. :)
@rojepp Email me at the address in my profile if you want. Does that work?
Better support for .fsx files.
Some refactoring around errors received from fsac, bug fixes, etc.