monaco-typescript

 by   alexdima JavaScript Version: Current License: MIT

kandi X-RAY | monaco-typescript Summary

kandi X-RAY | monaco-typescript Summary

monaco-typescript is a JavaScript library. monaco-typescript has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

monaco-typescript
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              monaco-typescript has a low active ecosystem.
              It has 18 star(s) with 2 fork(s). There are 4 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              monaco-typescript has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of monaco-typescript is current.

            kandi-Quality Quality

              monaco-typescript has no bugs reported.

            kandi-Security Security

              monaco-typescript has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              monaco-typescript is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              monaco-typescript releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of monaco-typescript
            Get all kandi verified functions for this library.

            monaco-typescript Key Features

            No Key Features are available at this moment for monaco-typescript.

            monaco-typescript Examples and Code Snippets

            No Code Snippets are available at this moment for monaco-typescript.

            Community Discussions

            QUESTION

            Extending JavaScript syntax in Monaco Editor with full integration
            Asked 2018-Nov-14 at 17:48

            I'm trying to extend Monaco Editor to allow users to write in a hybrid of JavaScript and another language, using delimiters to separate them within the same file, similarly to how Markdown allows writing multiple languages using fenced code blocks.

            The difference is that I want to keep all the other IDE features that Monaco has built in for JavaScript, such as linting (done via diagnostics), smart auto-completion, jump-to-definition, auto-formatting helpers, and every other IDE feature that comes with Monaco's built-in JavaScript mode. I'd like these features to still work within the JavaScript portion of the code that Monaco is editing, and be disabled for the sub-language portion.

            My first attempt was to call setMonarchTokensProvider, passing in a modified version of TypeScript's tokenizer rules. Specifically, I was able to add the beginning-fence delimiter to the root rule and create a new rule for the sub-language in the same way the documentation for Monarch (Monaco's syntax highligher) describes, using @nextEmbedded. (For testing purposes, I've been hard-coding CSS as the embedded language.)

            When I call setMonarchTokensProvider like this for the language "javascript", it completely ignores this syntax highlighting tokenizer, and colors the code-fences of CSS as invalid JavaScript, indicating that you cannot override the built-in JavaScript mode this way.

            When I call setMonarchTokensProvider with a new language (e.g. "mylang") and set the editor to use that language, it provides correct syntax highlighting (!) for this CSS-in-JS hybrid language. But all other advanced features that were found in the JavaScript mode are no longer present. The editor didn't have any smart auto-completion for methods defined on classes in the same file, or any in-editor error-reporting for invalid syntax, or any of its trademark JavaScript IDE features.

            So my next attempt was to modify the pre-bundled Monaco code's TypeScript definition to include my custom syntax highlighting rules. This correctly highlighted my CSS-in-JS code completely (!), when setting the language to "typescript", and left all the other features intact (!) including diagnostics reporting (live-validation and underlining of errors), auto-completion, all of it! (I didn't try it with "javascript" but it's safe to assume it probably works or is trivial to get it working, since JavaScript is actually implemented as a variant configuration of the TypeScript mode in Monaco.)

            Unfortunately, it also considered the entire CSS portion of it, including the fence around it, to be invalid JavaScript code.

            I know that this is theoretically doable, because within HTML mode, you can embed CSS or JS with full support for proper validation and auto-completion and every other IDE feature; basically, every sub-language in an HTML file works like it's in its own file: HTML features in the root of the file, CSS features within style tags, JS features within script tags.

            But digging into the TypeScript plugin's implementation inside Monaco, it's not clear where to begin editing this, either as a user of Monaco the library, or by forking it and patching it up where necessary. I started at trying to modify the DiagnostcsAdapter [sic] and tracing where it's actually implemented, but I got stuck two function-calls deep, where it seems to push a promise of syntax validation that returns a value that's used later, but the implementation of getSyntacticDiagnostics just shells the work out to some other implementation that I can't find anywhere else in the repo, nor in the monaco-languages repo or the vscode repo.

            ...

            ANSWER

            Answered 2018-Oct-13 at 02:54

            I make the similar thing. My solution is to place non-JS code inside a block comment:

            Source https://stackoverflow.com/questions/52672353

            QUESTION

            Getting Monaco to work with Vuejs and electron
            Asked 2018-Apr-14 at 11:56

            I'm interested in using the Monaco editor in a Vue.js backed Electron project.

            Thus far:

            Microsoft provides an Electron Sample (which I've run and works correctly)

            There are a variety of vue.js npm repos for monaco - yet none of them seem to fully support Electron right out of the box.

            The one that looks most promising is vue-monaco but I've run into issues correctly integrating it.

            AMD Require?

            This is the code from the Microsoft sample for using with Electron

            ...

            ANSWER

            Answered 2018-Apr-14 at 11:56

            I'm doing nearly the same, just without the extra vue-monaco component. After struggling quite a bit, I could solve the problem:

            Source https://stackoverflow.com/questions/49774331

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install monaco-typescript

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/alexdima/monaco-typescript.git

          • CLI

            gh repo clone alexdima/monaco-typescript

          • sshUrl

            git@github.com:alexdima/monaco-typescript.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular JavaScript Libraries

            freeCodeCamp

            by freeCodeCamp

            vue

            by vuejs

            react

            by facebook

            bootstrap

            by twbs

            Try Top Libraries by alexdima

            vscode-lcov

            by alexdimaTypeScript

            vscode-vim

            by alexdimaTypeScript

            vscode-copy-relative-path

            by alexdimaJavaScript

            typescript-with-globs

            by alexdimaJavaScript

            monaco-editor-samples

            by alexdimaHTML