Git Product home page Git Product logo

Comments (3)

alexdima avatar alexdima commented on May 14, 2024 1

Sorry, you would need to find Roslyn specific documentation on that.

From the editor point of view, the idea is that you can hook into all the right places (register yourself as a *Provider) and then you get called by the editor when the user wants suggestions, for example. Then, you would need to do an XHR call to your backend where you can have Roslyn running and analyzing the source and which can then reply with relevant suggestions.

I can help you on the editor side, and that basically consists of you registering as a completion item provider for example monaco.languages.registerCompletionItemProvider. The object you pass in must have the right provider shape and a method called provideCompletionItems will be called on it. It is up to you how you come up with those completions.

from monaco-editor.

alexdima avatar alexdima commented on May 14, 2024

@cwoolumtechnossus We do not ship any intellisense provider for c# with the editor, but if you have a backend where you use maybe Roslyn or something, you can easily hook that into the editor via monaco.languages.registerCompletionItemProvider.

You can find an example at https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-custom-languages or an async one for hover at https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-hover-provider-example

from monaco-editor.

jpsfs avatar jpsfs commented on May 14, 2024

@alexandrudima Can you please point to an example with Roslyn integration?

It would be very cool to have a C# editor, embedded in a web application, that is aware of custom C# classes that I have available on the back-end.

from monaco-editor.

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.