Giter VIP home page Giter VIP logo

Comments (8)

jonas avatar jonas commented on July 4, 2024

For inspiration of how this could be implemented using the internal EditorService service see the example given here: microsoft/monaco-editor#291 (comment)

from metabrowse.

jonas avatar jonas commented on July 4, 2024

After some digging in the vscode codebase here are some more inspiration if we go the route of providing our own override services.

from metabrowse.

olafurpg avatar olafurpg commented on July 4, 2024

Thanks for the links @jonas. I will try to take a stab at this.

from metabrowse.

olafurpg avatar olafurpg commented on July 4, 2024

I'm struggling with this one, my progress so far is here https://github.com/scalameta/metadoc/compare/filenames?expand=1

It seems ITextModelService is what we really want, but I can't figure out how we call registerTextModelContentProvider with a custom ITextModelContentProvider. Once we nail that, I suspect implementing the provideTextContent will be quite simple.

Any ideas?

from metabrowse.

jonas avatar jonas commented on July 4, 2024

I think you are close. ITextModelService was recently renamed from ITextModelResolverService so using the name textModelResolverService might be the missing piece.

BTW I suggest you create a PR as it makes it easier to comment.

from metabrowse.

jonas avatar jonas commented on July 4, 2024

Also I don't think we necessarily need to care about registerTextModelContentProvider if we control the resolver service ourselves.

from metabrowse.

olafurpg avatar olafurpg commented on July 4, 2024

textModelResolverService is what I was missing! I got something working now in #33 😄

from metabrowse.

olafurpg avatar olafurpg commented on July 4, 2024

Fixed in #33

from metabrowse.

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.