Module scnvim.utils

Utility functions.

Functions

load_file (path) Returns the content of a lua file on disk
str_match_exact (input, word) Match an exact occurence of word (replacement for \b word boundary)
print (message, hlgroup) Print a highlighted message to the command line.
get_snippets () Get the content of the auto generated snippet file.


Functions

load_file (path)
Returns the content of a lua file on disk

Parameters:

  • path The path to the file to load
str_match_exact (input, word)
Match an exact occurence of word (replacement for \b word boundary)

Parameters:

  • input The input string
  • word The word to match

Returns:

    True if word matches, otherwise false
print (message, hlgroup)
Print a highlighted message to the command line.

Parameters:

  • message The message to print.
  • hlgroup The highlight group to use. Default = ErrorMsg
get_snippets ()
Get the content of the auto generated snippet file.

Returns:

    A table with the snippets.
generated by LDoc 1.5.0 Last updated 2024-04-19 09:15:52