mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-20 10:35:08 +02:00
chore: format on save off by default
chore: check if table
This commit is contained in:
parent
57c159fe3c
commit
08d3c056ff
4 changed files with 7 additions and 3 deletions
|
@ -4,6 +4,8 @@ return {
|
|||
colorscheme = "lunar",
|
||||
transparent_window = false,
|
||||
format_on_save = {
|
||||
---@usage boolean: format on save (Default: false)
|
||||
enabled = false,
|
||||
---@usage pattern string pattern used for the autocommand (Default: '*')
|
||||
pattern = "*",
|
||||
---@usage timeout number timeout in ms for the format request (Default: 1000)
|
||||
|
|
|
@ -158,7 +158,9 @@ function M.disable_format_on_save()
|
|||
end
|
||||
|
||||
function M.configure_format_on_save()
|
||||
if lvim.format_on_save then
|
||||
if type(lvim.format_on_save) == "table" and lvim.format_on_save.enabled then
|
||||
M.enable_format_on_save()
|
||||
elseif lvim.format_on_save == true then
|
||||
M.enable_format_on_save()
|
||||
else
|
||||
M.disable_format_on_save()
|
||||
|
|
|
@ -10,7 +10,7 @@ an executable
|
|||
|
||||
-- general
|
||||
lvim.log.level = "warn"
|
||||
lvim.format_on_save = false
|
||||
lvim.format_on_save.enabled = false
|
||||
lvim.colorscheme = "lunar"
|
||||
-- to disable icons and use a minimalist setup, uncomment the following
|
||||
-- lvim.use_icons = false
|
||||
|
|
|
@ -27,7 +27,7 @@ vim.g.clipboard = {
|
|||
|
||||
-- general
|
||||
lvim.log.level = "warn"
|
||||
lvim.format_on_save = true
|
||||
lvim.format_on_save.enabled = false
|
||||
lvim.colorscheme = "lunar"
|
||||
-- to disable icons and use a minimalist setup, uncomment the following
|
||||
-- lvim.use_icons = false
|
||||
|
|
Loading…
Reference in a new issue