Skip to content

Instantly share code, notes, and snippets.

@50-Course
Created November 12, 2023 23:43
Show Gist options
  • Save 50-Course/dbca7239c7cf6ab8cf4d3f833c2cb06d to your computer and use it in GitHub Desktop.
Save 50-Course/dbca7239c7cf6ab8cf4d3f833c2cb06d to your computer and use it in GitHub Desktop.
LSP Configuration source
--- 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