-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: autoformat files using luaformatter
- Loading branch information
1 parent
918bd17
commit dace687
Showing
10 changed files
with
463 additions
and
551 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,42 @@ | ||
local config = {} | ||
|
||
config.default_config = function () | ||
return { | ||
min_distance = 5, | ||
max_length = 80, | ||
prefix_string = " // ", | ||
-- on_events example: { "InsertLeave", "CursorHoldI" } | ||
on_events = {}, | ||
trim_by_words = false, | ||
} | ||
config.default_config = function() | ||
return { | ||
min_distance = 5, | ||
max_length = 80, | ||
prefix_string = " // ", | ||
-- on_events example: { "InsertLeave", "CursorHoldI" } | ||
on_events = {}, | ||
trim_by_words = false | ||
} | ||
end | ||
|
||
|
||
local function get_default_config(final_config, config_key) | ||
if final_config == nil then | ||
return config.default_config()[config_key] | ||
end | ||
if final_config == nil then return config.default_config()[config_key] end | ||
|
||
return final_config[config_key] | ||
return final_config[config_key] | ||
end | ||
|
||
config.get_language_config = function(final_config, language, config_key) | ||
|
||
if final_config == nil then | ||
return get_default_config(final_config, config_key) | ||
end | ||
if final_config == nil then | ||
return get_default_config(final_config, config_key) | ||
end | ||
|
||
if final_config.language_config == nil then | ||
return get_default_config(final_config, config_key) | ||
end | ||
if final_config.language_config == nil then | ||
return get_default_config(final_config, config_key) | ||
end | ||
|
||
if final_config.language_config[language] == nil then | ||
return get_default_config(final_config, config_key) | ||
end | ||
if final_config.language_config[language] == nil then | ||
return get_default_config(final_config, config_key) | ||
end | ||
|
||
if final_config.language_config[language][config_key] == nil then | ||
return get_default_config(final_config, config_key) | ||
end | ||
if final_config.language_config[language][config_key] == nil then | ||
return get_default_config(final_config, config_key) | ||
end | ||
|
||
return final_config.language_config[language][config_key] | ||
return final_config.language_config[language][config_key] | ||
|
||
end | ||
|
||
|
||
|
||
return config |
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
Oops, something went wrong.