-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: expand templates and placeholders
- Loading branch information
1 parent
e742f48
commit 38adfaa
Showing
9 changed files
with
85 additions
and
39 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Empty file.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
local M = {} | ||
-------------------------------------------------------------------------------- | ||
|
||
---@class PLACEHOLDER_plugin_name_short.config | ||
local defaultConfig = { | ||
enabled = true, | ||
} | ||
|
||
---@type PLACEHOLDER_plugin_name_short.config | ||
M.config = defaultConfig | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
---@param userConfig? PLACEHOLDER_plugin_name_short.config | ||
M.setup = function(userConfig) | ||
M.config = vim.tbl_deep_extend("force", defaultConfig, userConfig or {}) | ||
end | ||
|
||
-------------------------------------------------------------------------------- | ||
return M |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
local M = {} | ||
-------------------------------------------------------------------------------- | ||
|
||
---@param userConfig? PLACEHOLDER_plugin_name_short.config | ||
M.setup = function(userConfig) require("PLACEHOLDER_plugin_name_short.config").setup(userConfig) end | ||
|
||
-------------------------------------------------------------------------------- | ||
return M |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
local M = {} | ||
-------------------------------------------------------------------------------- | ||
|
||
---@param body string | ||
---@param level? "info"|"trace"|"debug"|"warn"|"error" | ||
---@param title? string | ||
function M.notify(body, level, title) | ||
local pluginName = "PLACEHOLDER_plugin_name_short" | ||
local notifyTitle = title and pluginName .. ": " .. title or pluginName | ||
if not level then level = "info" end | ||
vim.notify(vim.trim(body), vim.log.levels[level:upper()], { title = notifyTitle }) | ||
end | ||
|
||
-------------------------------------------------------------------------------- | ||
return M |