Closed ayame113 closed 3 years ago
the languageId is set by the grammar name. If you want the languageid to be markdown you can use language-markdown instead of language-gfm
I feel like we should leave this between the grammars and the servers. GFM should be processed differently than CommonMark (markdown). I think the servers might want to know which one they are receiving.
I think the servers might want to know which one they are receiving.
It makes sense. How about allowing users of this package to configure languageId through the AutoLanguageClient?
example:
class FooBarLanguageClient extends AutoLanguageClient {
getLanguageIdFromGrammarScope(scopeName: string): string|undefined {
// If return undefined, the default value will be used
if (scopeName==='source.gfm') {
return 'markdown'
}
}
}
I think some sort of override would be ok. @ayame113 wanna create a PR?
wanna create a PR?
OK, I will do it.
According to the spec, the recommended markdown
languageId
fortextDocument/didOpen
requests is "markdown". Currently, the markdownlanguageId
is "github markdown", can you change it?(The specifications say "If a document refers to one of the programming languages listed below it is recommended that clients use those ids.".)