microsoft / microsoft/monaco-editor

Support JavaScript intellisense inside HTML

Open
#732 14 comments 15 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request html
Dominant language
JavaScript
Stars
46.8k
Forks
4.1k
Avg merge
17h 58m
Merged PRs (30d)
1

Description

Sorry, I can't open a question in stackoverflow.com because it has a js error.

Help:

  1. When I set the editor's lang to html, the javascript IntelliSense is not available. How to use both html and javascript IntelliSense in one editor.
  2. When I use import in es6, how to use js IntelliSense from module in another file?
import {List} from "./List"
List.of
// there is no js IntelliSense

List.js

export class List {
  constructor(head, tail) {
    this.head = head
    this.tail = tail
  }

  static of(...elements) {
    let result = null
    for (let i = elements.length - 1; i >= 0; i--)
      result = new List(elements[i], result)
    return result
  }

  map(f) {
    return new List(f(this.head), this.tail && this.tail.map(f))
  }

  *[Symbol.iterator]() {
    for (let pos = this; pos; pos = pos.tail)
      yield pos.head
  }
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the issue's HTML editor configuration and the JavaScript examples using import, export, and List.of. Determine how HTML and JavaScript IntelliSense are expected to coexist and how cross-file module completion should behave; done means both requested IntelliSense scenarios work in one editor.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, javascript
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.