Skip to content

Commit c074b49

Browse files
ayame113aminya
andauthored
fix: apply comment (getLanguageIdFromEditor returns grammar name)
Co-authored-by: Amin Yahyaabadi <[email protected]>
1 parent c0899dc commit c074b49

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/auto-languageclient.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,9 @@ export default class AutoLanguageClient {
312312
* @param _editor A {TextEditor} which is opened.
313313
* @returns A {string} of `languageId` used for `textDocument/didOpen` notification.
314314
*/
315-
public getLanguageIdFromEditor(_editor: TextEditor): string | void | null {}
315+
protected getLanguageIdFromEditor(_editor: TextEditor): string {
316+
return this._editor.getGrammar().name
317+
}
316318

317319
// Helper methods that are useful for implementors
318320
// ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)