Created
November 12, 2023 23:43
-
-
Save 50-Course/dbca7239c7cf6ab8cf4d3f833c2cb06d to your computer and use it in GitHub Desktop.
LSP Configuration source
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Utility functions to aid development of other modules | |
--- | |
--- @module utils | |
local M = {} | |
function M.get_file_extension(path) | |
return path:match("^.+(%..+)$") | |
end | |
function M.get_file_name(path) | |
return path:match("^.+/(.+)$") | |
end | |
function M.get_file_path(path) | |
return path:match("^(.+)/.+") | |
end | |
function M.inspect(obj) | |
print(vim.inspect(obj)) | |
end | |
return M |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment