generated from ellisonleao/nvim-plugin-template
-
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.
- Loading branch information
1 parent
4b9c497
commit 811cc44
Showing
5 changed files
with
12 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
---@class CustomModule | ||
local M = {} | ||
|
||
---@return string | ||
M.my_first_function = function(greeting) | ||
return greeting | ||
---@return nil | ||
M.doppler_configs = function() | ||
vim.cmd("!doppler configs") | ||
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,5 @@ | ||
vim.api.nvim_create_user_command("DopplerConfigs", require("doppler").doppler_configs, {}) | ||
|
||
vim.cmd("silent !set -a") | ||
vim.cmd("silent !source <(doppler secrets download --no-file --format env)") | ||
vim.cmd("silent !set +a") |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,12 +1,8 @@ | ||
local plugin = require("plugin.doppler.nvim") | ||
local plugin = require("doppler") | ||
|
||
describe("setup", function() | ||
it("works with default", function() | ||
assert(plugin.hello() == "Hello!", "my first function with param = Hello!") | ||
assert(plugin.doppler_configs ~= "Hello!", "my first function with param = Hello!") | ||
end) | ||
|
||
it("works with custom var", function() | ||
plugin.setup({ opt = "custom" }) | ||
assert(plugin.hello() == "custom", "my first function with param = custom") | ||
end) | ||
end) |