admin管理员组

文章数量:1391937

I have an VSCode extension that uses the LSP. It offers suggestions within block quotes. It is working for 'plaintext' files, but does nothing in other languages.

In extension.ts I have the activate function

export function activate(context: ExtensionContext) {
...
// Options to control the language client
const clientOptions: LanguageClientOptions = {
    // Register the server for documents
    documentSelector: [
        { scheme: 'file', language: 'python'},
        {scheme: 'file', language: 'plaintext'},
    ],

package.json has the following activationEvents

    "activationEvents": [
    "onStartupFinished",
    "onLanguage:plaintext",
    "onLanguage:python"
]

All the functionality works in plaintext, and nothing at all happens in Python files.

本文标签: visual studio codeMy VScode extension responds to one language type but not anotherStack Overflow