mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-03 12:06:55 -04:00
refactor(refactor): use higher local apis and some cleanup
This commit is contained in:
parent
6f8e4c97a4
commit
d73500eaa6
10 changed files with 103 additions and 69 deletions
|
|
@ -45,7 +45,7 @@ function M.get_cache_dir()
|
|||
return nil, 'Invalid cache rights, $XDG_CACHE_HOME or /tmp should be read/write'
|
||||
end
|
||||
|
||||
--- Gets a property at path
|
||||
-- Gets a property at path
|
||||
-- @param tbl the table to access
|
||||
-- @param path the '.' seperated path
|
||||
-- @returns the value at path or nil
|
||||
|
|
@ -62,4 +62,10 @@ function M.get_at_path(tbl, path)
|
|||
return result
|
||||
end
|
||||
|
||||
-- Prints a warning message
|
||||
-- @param text the text message
|
||||
function M.print_warning(text)
|
||||
api.nvim_command(string.format([[echohl WarningMsg | echo "%s" | echohl None]], text))
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue