Skip to content
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

No intellisense for script files on mac #945

Closed
onybo opened this issue Oct 19, 2018 · 4 comments
Closed

No intellisense for script files on mac #945

onybo opened this issue Oct 19, 2018 · 4 comments

Comments

@onybo
Copy link

onybo commented Oct 19, 2018

Steps to reproduce:

  1. create f# project: dotnet new console -lang f#
  2. start vscode: code .
  3. open Program.fs -> hover over main and observer that intellisense works
  4. add test.fsx with the following contents: printfn "Hello World from F#!"
  5. hover mouse over "printfn" and observe that no intellisense appear

Expected result:
at step 5 the same information should be printed as when hovering mouse over printfn for the Program.fs file

Additional info:
When opening the test.fsx file the following appears in the Output of the F# Language Service:
[14:43:28 ERROR] Cannot execute recordStubGenerator, File '/Users/olavnybo/source/test/test.fsx' not parsed
[14:43:28 ERROR] Cannot execute signature, File '/Users/olavnybo/source/test/test.fsx' not parsed

When hovering the mouse over the code the following is output:
[14:45:20 ERROR] Cannot execute tooltip, File '/Users/olavnybo/source/test/test.fsx' not parsed

Executing the script (test.fsx) from the command palette and selecting "F#: Run script" works as expected. The terminal reads:
Hello World from F#!
Press enter to close script...

FSharp: Fsac Runtime is set to netcore
Same result if set to: net

FSharp: Fsi File Path is set to:
/Library/Frameworks/Mono.framework/Versions/Current/Commands/fsharpi

mono --version prints:
Mono JIT compiler version 5.16.0.179 (2018-06/6e48ad4f7b1 Wed Oct 3 14:05:19 EDT 2018)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: normal
SIGSEGV: altstack
Notification: kqueue
Architecture: amd64
Disabled: none
Misc: softdebug
Interpreter: yes
LLVM: yes(3.6.0svn-mono-master/0b3cb8ac12c)
GC: sgen (concurrent by default)

Runtime Environment:
OS Name: Mac OS X
OS Version: 10.13
OS Platform: Darwin
RID: osx.10.13-x64

fsharpi reports version: 4.1
fsharpi test.fsx prints "Hello World from F#!" as expected

@memoricab
Copy link

I have the same issue with intellisense.

Could you please confirm also the CodeLens works fine for you?

@onybo
Copy link
Author

onybo commented Oct 22, 2018

CodeLens works fine for project files. E.g. in my example the Program.fs file shows code lens info.
Script files does not. I.e. no code lens shown in test.fsx.

Code outline works though. It will list all functions in the active script file (fsx).

The get info for diagnostics does not work.
When selecting this command from the comman palette it displays a error box with the text:
Command 'F#: Get info for diagnostics' resulted in an error.

@onybo
Copy link
Author

onybo commented Oct 22, 2018

I think I have figured out why it was not working for me.
I am using fish shell and I had set the path for fish shell in ~/.config/fish/config.fish, but this seems to have no effect on the path used by ionide.
Adding:
export PATH="$PATH:/Library/Frameworks/Mono.framework/Versions/Current/Commands/"
to ~/.bash_profile fixed intellisense as long as fsacRuntime"="net"

Trying to use netcore as is suggested when opening the project after setting FSAC Runtime to .net does not work though.

"FSAC Runtime = netcore does not work" is already reported in:
#948 948, so I suppose this issue can be closed.

@onybo onybo closed this as completed Oct 22, 2018
@onybo
Copy link
Author

onybo commented Oct 22, 2018

Path was not correctly configured for Bash and netcore not working is already reported in #948

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants