clean : debloat config | rm un-needed plugins
This commit is contained in:
parent
ba3af27de0
commit
a1c234e001
|
@ -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 = "<leader>fp",
|
||||
},
|
||||
},
|
||||
-- distraction free & minimalist UI mode
|
||||
truezen = {
|
||||
ataraxis_mode = "<leader>zz", -- center
|
||||
focus_mode = "<leader>zf",
|
||||
minimalistic_mode = "<leader>zm", -- as it is
|
||||
},
|
||||
}
|
||||
|
||||
return M
|
||||
|
|
|
@ -169,12 +169,4 @@ M.telescope_media = function()
|
|||
map("n", m.media_files, ":Telescope media_files <CR>")
|
||||
end
|
||||
|
||||
M.truezen = function()
|
||||
local m = plugin_maps.truezen
|
||||
|
||||
map("n", m.ataraxis_mode, ":TZAtaraxis <CR>")
|
||||
map("n", m.focus_mode, ":TZFocus <CR>")
|
||||
map("n", m.minimalistic_mode, ":TZMinimalist <CR>")
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
|
@ -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, ...)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
}
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue