From a1c234e001a44c9393be16a96b2303bd6af06883 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 2 Oct 2021 10:41:50 +0530 Subject: [PATCH] clean : debloat config | rm un-needed plugins --- lua/core/default_config.lua | 11 ----- lua/core/mappings.lua | 8 ---- lua/plugins/configs/lspconfig.lua | 5 --- lua/plugins/configs/others.lua | 28 ------------- lua/plugins/configs/zenmode.lua | 67 ------------------------------- lua/plugins/init.lua | 35 ---------------- 6 files changed, 154 deletions(-) delete mode 100644 lua/plugins/configs/zenmode.lua diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 1425bf3..ef6ee25 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -58,7 +58,6 @@ M.ui = { M.plugins = { -- enable and disable plugins (false for disable) status = { - autosave = false, -- to autosave files blankline = true, -- show code scope with symbols bufferline = true, -- list open buffers up the top, easy switching too colorizer = false, -- color RGB, HEX, CSS, NAME color codes @@ -68,9 +67,7 @@ M.plugins = { feline = true, -- statusline gitsigns = true, -- gitsigns in statusline lspsignature = true, -- lsp enhancements - neoscroll = false, -- smooth scroll telescope_media = false, -- media previews within telescope finders - truezen = false, -- distraction free & minimalist UI mode vim_matchup = true, -- % operator enhancements cmp = true, nvimtree = true, @@ -98,8 +95,6 @@ M.plugins = { -- default, round , slant , block , arrow style = "default", }, - autosave = false, -- autosave on changed text or insert mode leave - -- timeout to be used for using escape with a key combination, see mappings.plugins.better_escape esc_insertmode_timeout = 300, }, default_plugin_config_replace = {}, @@ -195,12 +190,6 @@ M.mappings.plugins = { media_files = "fp", }, }, - -- distraction free & minimalist UI mode - truezen = { - ataraxis_mode = "zz", -- center - focus_mode = "zf", - minimalistic_mode = "zm", -- as it is - }, } return M diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index c2300cf..f15a487 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -169,12 +169,4 @@ M.telescope_media = function() map("n", m.media_files, ":Telescope media_files ") end -M.truezen = function() - local m = plugin_maps.truezen - - map("n", m.ataraxis_mode, ":TZAtaraxis ") - map("n", m.focus_mode, ":TZFocus ") - map("n", m.minimalistic_mode, ":TZMinimalist ") -end - return M diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index d2b7f1e..02688f7 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -1,10 +1,5 @@ -local present1, nvim_lsp = pcall(require, "lspconfig") local overrides = require("core.hooks").createOverrides "lsp" -if not present1 then - return -end - local function on_attach(_, bufnr) local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 2d1576c..b4c6d12 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -16,28 +16,6 @@ M.autopairs = function() } end -M.autosave = function() - -- autosave.nvim plugin is disabled by default - local present, autosave = pcall(require, "autosave") - if not present then - return - end - - autosave.setup { - enabled = chadrc_config.plugins.options.autosave, -- takes boolean value from init.lua - execution_message = "autosaved at : " .. vim.fn.strftime "%H:%M:%S", - events = { "InsertLeave", "TextChanged" }, - conditions = { - exists = true, - filetype_is_not = {}, - modifiable = true, - }, - clean_command_line_interval = 2500, - on_off_commands = true, - write_all_buffers = false, - } -end - M.better_escape = function() require("better_escape").setup { mapping = chadrc_config.mappings.plugins.better_escape.esc_insertmode, @@ -104,12 +82,6 @@ M.luasnip = function() require("luasnip/loaders/from_vscode").load { path = { chadrc_config.plugins.options.luasnip.snippet_path } } end -M.neoscroll = function() - pcall(function() - require("neoscroll").setup() - end) -end - M.signature = function() local present, lspsignature = pcall(require, "lsp_signature") if present then diff --git a/lua/plugins/configs/zenmode.lua b/lua/plugins/configs/zenmode.lua deleted file mode 100644 index f51439a..0000000 --- a/lua/plugins/configs/zenmode.lua +++ /dev/null @@ -1,67 +0,0 @@ -local present, true_zen = pcall(require, "true-zen") -if not present then - return -end - -true_zen.setup { - ui = { - bottom = { - cmdheight = 1, - laststatus = 0, - ruler = false, - showmode = false, - showcmd = false, - }, - top = { - showtabline = 0, - }, - left = { - number = false, - relativenumber = false, - signcolumn = "no", - }, - }, - modes = { - ataraxis = { - left_padding = 32, - right_padding = 32, - top_padding = 1, - bottom_padding = 1, - ideal_writing_area_width = { 0 }, - auto_padding = true, - keep_default_fold_fillchars = true, - custome_bg = "", - bg_configuration = true, - affected_higroups = { - NonText = {}, - FoldColumn = {}, - ColorColumn = {}, - VertSplit = {}, - StatusLine = {}, - StatusLineNC = {}, - SignColumn = {}, - }, - }, - focus = { - margin_of_error = 5, - focus_method = "experimental", - }, - }, - integrations = { - vim_gitgutter = false, - tmux = false, - gitsigns = false, - nvim_bufferline = true, - limelight = false, - vim_airline = false, - vim_powerline = false, - vim_signify = false, - express_line = false, - lualine = false, - }, - misc = { - on_off_commands = false, - ui_elements_commands = false, - cursor_by_mode = false, - }, -} diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 2183750..127a5ef 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -111,17 +111,6 @@ return packer.startup(function() end, } - -- smooth scroll - use { - "karb94/neoscroll.nvim", - disable = not status.neoscroll, - opt = true, - config = override_req("neoscroll", "(plugins.configs.others).neoscroll()"), - setup = function() - require("core.utils").packer_lazy_load "neoscroll.nvim" - end, - } - -- lsp stuff use { @@ -153,16 +142,6 @@ return packer.startup(function() end, } - -- load autosave only if its globally enabled - use { - disable = not status.autosave, - "Pocco81/AutoSave.nvim", - config = override_req("autosave", "(plugins.configs.others).autosave()"), - cond = function() - return require("core.utils").load_config().plugins.options.autosave == true - end, - } - use { "max397574/better-escape.nvim", disable = not status.esc_insertmode, @@ -283,19 +262,5 @@ return packer.startup(function() end, } - use { - "Pocco81/TrueZen.nvim", - disable = not status.truezen, - cmd = { - "TZAtaraxis", - "TZMinimalist", - "TZFocus", - }, - config = override_req("truezen", "plugins.configs.zenmode"), - setup = function() - require("core.mappings").truezen() - end, - } - require("core.hooks").run("install_plugins", use) end)