Expand description
Token classification under cursor (URL / file / directory / word).
Retrieves current line + cursor column, extracts contiguous nonβwhitespace token, classifies via filesystem inspection or URL parsing, returning a tagged Lua table.
EnumsΒ§
- Token
Under Cursor - Classified representation of the token found under the cursor.
ConstantsΒ§
- FILE_
CMD_ πCACHE - Cache
file -Iresults to avoid spawning a process per cursor movement / hover. Keyed by path string; only successful results are cached.
FunctionsΒ§
- convert_
visual_ πto_ byte_ idx - Convert a visual (character) index into a byte index for the supplied string
s. - exec_
file_ πcmd_ cached - Cached wrapper around
ytil_sys::file::exec_file_cmdthat avoids spawning afile -Iprocess for previously seen paths. Only successful results are cached. - extract_
https_ πor_ http_ link - extract_
markdown_ πlink - get
- Retrieve and classify the non-whitespace token under the cursor in the current window.
- get_
token_ πunder_ cursor_ in_ normal_ buffer - get_
token_ πunder_ cursor_ in_ terminal_ buffer - get_
word_ πat_ index - Find the non-whitespace token in the supplied string
scontaining the visual indexidx.