Module token_under_cursor

Module token_under_cursor 

Source
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ยง

TokenUnderCursor
Classified representation of the token found under the cursor.

Functionsยง

convert_visual_to_byte_idx ๐Ÿ”’
Convert a visual (character) index into a byte index for the supplied string s.
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 s containing the visual index idx.