You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expose the internal getLanguageIdAtPosition to extensions #28047
document.getLanguageId() only gives the language of the document.
In case of embedded languages like css/js in html, the editor is aware of the languageId at position via getLanguageIdAtPosition. But this information is not available for extensions.
In my case, the emmet extension needs to know whether it should suggest html or css abbreviations based on the language under the cursor. Of course, I can do that by using some regex magic, but since this information is available in the editor, it would be good to make it available for extensions as well.
Activity
ramya-rao-a commentedon Jun 5, 2017
cc alexandrudima Peng Lyu (@rebornix)
jrieken commentedon Jun 6, 2017
This dupes (more or less) #580 which about moving tokens to the ext side. Tricky because it expensive and would require us to re-sync on type...