<p dir="auto">I couldn't find anything like this which would have removed the need for parsing some text in my extension.</p>
<p dir="auto"><a href="https://atom.io/docs/api/v1.1.0/ScopeDescriptor" rel="nofollow">https://atom.io/docs/api/v1.1.0/ScopeDescriptor</a></p>
<p dir="auto"><em>From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/billti/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/billti">@billti</a> on November 1, 2015 6:10</em></p>
<p dir="auto">The API call <code class="notranslate">document.getWordRangeAtPosition(position)</code> appears to use its own definition of a word. For example, my tmLanguage defines <code class="notranslate">attrib-name</code> as a token/scope, yet <code class="notranslate">getWordRangeAtPosition</code> appears to break this into 2 words on the <code class="notranslate">-</code> character.</p>
<p dir="auto">How can I get token ranges at a position based on my custom syntax? (And it would be really useful if I could get the scope name that goes along with it too).</p>
<p dir="auto"><em>Copied from original issue: Microsoft/vscode-extensionbuilders#76</em></p>