Giter Site home page Giter Site logo

Comments (8)

7sharp9 avatar 7sharp9 commented on June 21, 2024

@rneatherway Is there a way your recent emacs changes could lead to work in this area?

from zarchive-fsharpbinding.

rneatherway avatar rneatherway commented on June 21, 2024

To be honest this seems difficult. FSI compiles assemblies on the fly, which isn't really a good fit for the compiler bindings. It expects either a project with assemblies on disk or a script file (a better fit) with #load and #r directives.

from zarchive-fsharpbinding.

7sharp9 avatar 7sharp9 commented on June 21, 2024

How about autocomplete for just the core libraries, a reflective autocomplete for the on the fly stuff could come later.

The problem with the reflective one would be determining the latest version of a particular type that had been created as all types are kept loaded in memory I think.

from zarchive-fsharpbinding.

rneatherway avatar rneatherway commented on June 21, 2024

Core libraries would be fine I think, just present a bare script environment. It would also be fairly easy to add any libraries that were included with #r.

I imagined for a more fully-fledged version that one hacky approach would be to compile the intermediate assemblies and keep them on disk to pass to the compiler service. Really I think the best would be to extend FSI itself.

from zarchive-fsharpbinding.

tpetricek avatar tpetricek commented on June 21, 2024

There might be an easier way to get some basic IntelliSense in F# Interactive.

The compiler source code apparently already contains some code to do this - for example the FSharpInteractiveServer type in fsiserver.fs has methods Completions and GetDeclarations, which should give us some IntelliSense - but these are inside #if FSI_SERVER_INTELLISENSE, so the question is whether standard F# binaries contain them. If so, that might be a way to go...

(MonoDevelop binding has a reference to FSharpInteractiveServer here inside InteractiveSession.fs)

from zarchive-fsharpbinding.

rneatherway avatar rneatherway commented on June 21, 2024

That's great news! Any idea why Visual Studio doesn't make use of this?

from zarchive-fsharpbinding.

7sharp9 avatar 7sharp9 commented on June 21, 2024

@tpetricek Wouldn't the problem be that in fsi theres no real document to parse to pass the line data to the compiler?

from zarchive-fsharpbinding.

tpetricek avatar tpetricek commented on June 21, 2024

@rneatherway It is probably untested implementation - one of many experiments that the F# team did while working on Visual Studio integration (a bit like my regions & navigation bars, but this one cannot be turned on...)

@7sharp9 I think it does not need the usual line data, because it directly uses the state that F# Interactive keeps around. See fsi.fs.

from zarchive-fsharpbinding.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.