Reproduction steps:
Same thing happens with peek definition with a different error.
Seems like the model resolution is failing.
Example simple code:
const editor = monaco.editor.create(document.getElementById("container"), {}); const model = monaco.editor.createModel("a", null, monaco.Uri.from({ scheme: "inmemory", path: "file1.py", })) const model2 = monaco.editor.createModel("b", null, monaco.Uri.from({ scheme: "inmemory", path: "file2.py", })) editor.setModel(model) monaco.languages.registerReferenceProvider("python", { provideReferences: (model, position, context, token) => { return [ { uri: model.uri, range: { startLineNumber: 1, startColumn: 1, endLineNumber: 1, endColumn: 2 } }, { uri: model2.uri, range: { startLineNumber: 1, startColumn: 1, endLineNumber: 1, endColumn: 2 } }] } })
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4