Coder Social home page Coder Social logo

laden666666 / vscode-html-languageservice Goto Github PK

View Code? Open in Web Editor NEW

This project forked from microsoft/vscode-html-languageservice

0.0 1.0 0.0 1.12 MB

Language services for HTML

License: MIT License

JavaScript 36.71% TypeScript 63.21% CSS 0.04% Roff 0.04%

vscode-html-languageservice's Introduction

vscode-html-languageservice

HTML language service extracted from VSCode to be reused, e.g in the Monaco editor.

npm Package NPM Downloads Azure DevOps Build Status Travis Build Status

Why?

The vscode-html-languageservice contains the language smarts behind the HTML editing experience of Visual Studio Code and the Monaco editor.

  • doComplete / doComplete2 (async) provide completion proposals for a given location.

  • setCompletionParticipants allows participant to provide suggestions for specific tokens.

  • doHover provides hover information at a given location.

  • format formats the code at the given range.

  • findDocumentLinks finds all links in the document.

  • findDocumentSymbols finds all the symbols in the document.

  • getFoldingRanges return folding ranges for the given document.

  • getSelectionRanges return the selection ranges for the given document. ...

For the complete API see htmlLanguageService.ts and htmlLanguageTypes.ts

Installation

npm install --save vscode-html-languageservice

Development

  • clone this repo, run yarn
  • yarn test to compile and run tests

How can I run and debug the service?

  • open the folder in VSCode.
  • set breakpoints, e.g. in htmlCompletion.ts
  • run the Unit tests from the run viewlet and wait until a breakpoint is hit: image

How can I run and debug the service inside an instance of VSCode?

  • run VSCode out of sources setup as described here: https://github.com/Microsoft/vscode/wiki/How-to-Contribute
  • link the fodler of the vscode-html-languageservice repo to vscode/extensions/html-language-features/server to run VSCode with the latest changes from that folder:
    • cd vscode-html-languageservice, yarn link
    • cd vscode/extensions/html-language-features/server, `yarn link vscode-html-languageservice
  • run VSCode out of source (vscode/scripts/code.sh|bat) and open a .html file
  • in VSCode window that is open on the vscode-html-languageservice sources, run command Debug: Attach to Node process and pick the code-oss process with the html-language-features path image
  • set breakpoints, e.g. in htmlCompletion.ts
  • in the instance run from sources, invoke code completion in the .html file

License

(MIT License)

Copyright 2016-2020, Microsoft

With the exceptions of data/*.json, which is built upon content from Mozilla Developer Network and distributed under CC BY-SA 2.5.

vscode-html-languageservice's People

Contributors

aeschli avatar octref avatar bitwiseman avatar ahkol avatar steve1998 avatar vzvu3k6k avatar dependabot[bot] avatar alexdima avatar coliff avatar ixquitilissaid avatar garconvacher avatar msftgits avatar ramya-rao-a avatar sibiraj-s avatar tony-xia avatar jeanp413 avatar

Watchers

James Cloos avatar

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.