From dd372e08dd60ba0b3329e51ab3adefb0dd867383 Mon Sep 17 00:00:00 2001 From: rootiest Date: Tue, 8 Oct 2024 04:29:56 -0400 Subject: [PATCH] feat: add autoformat option in configuration --- lua/config/options.lua | 12 ++++++------ lua/data/cond.lua | 7 ++++++- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index 3afe3ca..94cdf78 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -27,8 +27,10 @@ vim.g.loaded_ruby_provider = 0 ---@type integer Options: <0|1> vim.g.lazyvim_python_lsp = "pyright" ---@type string Options: [python lsp] -- Open all folds by default vim.opt.foldlevel = 99 ---@type integer Options: <0-99> --- Autoformat -vim.g.autoformat = true ---@type boolean Options: +-- Auto-format +vim.g.autoformat = true ---@type boolean Options: +-- Auto-save +vim.g.autosave = true ---@type boolean Options: -- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ROOTIEST ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ @@ -50,12 +52,10 @@ vim.g.codesnap = true ---@type boolean Options: vim.g.encourage_me = true ---@type boolean Options: -- Enable Auto-hiding cursorline vim.g.auto_cursorline = true ---@type boolean Options: --- Enable Auto-save -vim.g.auto_save = true ---@type boolean Options: -- Animate blinky cursor vim.g.blinky = true ---@type boolean Options: -- Use experimental cmp performance fork -vim.g.cmp_performance_enabled = true ---@type boolean Options: +vim.g.cmp_performance_enabled = false ---@type boolean Options: -- Use dev mode for rootiest plugins vim.g.rootiest_dev = false ---@type boolean Options: @@ -87,7 +87,7 @@ vim.g.statuscolumn = "native" ---@type string Options: [statuscolumn] -- ╰───────────────────────────╯ -- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BUFFER LINE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -vim.g.tabline = "bufferline" ---@type string Options: [tabline] +vim.g.tabline = "none" ---@type string Options: [tabline] -- ╭───────────────────────────╮  bufferline -- │ │  barsNlines -- │ Tab Lines: │  none diff --git a/lua/data/cond.lua b/lua/data/cond.lua index b784fd0..17e5ae6 100644 --- a/lua/data/cond.lua +++ b/lua/data/cond.lua @@ -10,7 +10,12 @@ local types = require("data.types") --- Auto Save conditional options M.autosave = function() - return func.check_global_var("auto_save", true, false) + return func.check_global_var("autosave", true, false) +end + +-- Auto Format conditional options +M.autoformat = function() + return func.check_global_var("autoformat", true, false) end --- Bars-N-Lines conditional options