-
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
Jan Steinke
committed
Mar 27, 2024
1 parent
a8a1d6e
commit fdae11d
Showing
4 changed files
with
75 additions
and
12 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
local M = {} | ||
|
||
---@class Options | ||
---Automatically apply code-actions if there is only 1 available. | ||
---@field apply boolean | ||
---Configuration provided to vim.diff (see `:h vim.diff()`) | ||
---@field diff table | ||
local default_config = { | ||
apply = true, | ||
diff = { | ||
ctxlen = 5, | ||
}, | ||
} | ||
|
||
|
||
local user_config = default_config | ||
|
||
function M.setup(config) | ||
user_config = vim.tbl_deep_extend("force", default_config, config) | ||
end | ||
|
||
setmetatable(M, { | ||
__index = function(_, key) | ||
return user_config[key] | ||
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
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