Theia: vscode.languages.registerSelectionRangeProvider is not supported

Created on 24 Feb 2020  路  4Comments  路  Source: eclipse-theia/theia

Transfer from https://github.com/gitpod-io/gitpod/issues/1200

INFO: The original issue expects datatype helper in rustlang.

Description

This issue has been observed on gitpod

Rust analyzer (https://marketplace.visualstudio.com/items?itemName=matklad.rust-analyzer) requires vscode.languages.registerSelectionRangeProvider function to work on theia as mensioned in output:

[Error - 9:46:02 PM] Notify file events failed.
TypeError: vscode.languages.registerSelectionRangeProvider is not a function
    at SelectionRangeFeature.registerLanguageProvider (/tmp/vscode-extensions/[email protected]/extension/out/main.js:11669:34)
    at SelectionRangeFeature.register (/tmp/vscode-extensions/[email protected]/extension/out/main.js:9261:33)
    at SelectionRangeFeature.initialize (/tmp/vscode-extensions/[email protected]/extension/out/main.js:11647:14)
    at LanguageClient.initializeFeatures (/tmp/vscode-extensions/[email protected]/extension/out/main.js:11014:21)
    at connection.initialize.then (/tmp/vscode-extensions/[email protected]/extension/out/main.js:10699:18)

Test repository: https://github.com/RXT0112/Zernit/tree/6ceaff2979918b85654a9397072b8e97408cdab6

Reproduction Steps

  1. Create a new repository
  2. Run cargo init
  3. Install rust analyzer and notice the issue in output

OR

Open https://gitpod.io/#https://github.com/RXT0112/Zernit/tree/6ceaff2979918b85654a9397072b8e97408cdab6

bug help wanted languages vscode

All 4 comments

The same for the latest typescript extension

@akosyakov elaborate on help-wanted

@Kreyren It means that someone can pick this issues up and work on it. Basically we need to add new APIs in theia.d.ts aligned with vscode.d.ts and then implement them. One can have a look as other language APIs are implemented in Theia and implement similarly new one. For inspiration it's also fine look at VS Code codebase. It's usually better to have the implementation aligned in the plugin host process as closed as possible to VS Code implementation. The main side though should be aligned with Theia project organisation and coding conventions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jankeromnes picture jankeromnes  路  3Comments

cekvenich picture cekvenich  路  3Comments

dhananjayharel picture dhananjayharel  路  3Comments

marechal-p picture marechal-p  路  3Comments

akosyakov picture akosyakov  路  3Comments