config refactor

This commit is contained in:
christianchiarulli 2021-07-09 21:34:12 -04:00
parent b8182d5aee
commit 4ff04e31f0
8 changed files with 45 additions and 48 deletions

View file

@ -72,7 +72,8 @@ O = {
plugin = {
-- Builtins
ts_playground = { active = false },
diffview = { active = false },
ts_context_commentstring = { active = false },
ts_hintobjects = { active = false },
ts_autotag = { active = false },
@ -82,10 +83,7 @@ O = {
telescope_fzy = { active = false },
telescope_project = { active = false },
indent_line = { active = false },
debug = { active = false },
dap_install = { active = false },
lush = { active = false },
diffview = { active = false },
},
user_which_key = {},
@ -240,3 +238,4 @@ require "lv-floatterm.config"
require "lv-galaxyline.config"
require "lv-gitsigns.config"
require "lv-telescope.config"
require "lv-dap.config"

9
lua/lv-dap/config.lua Normal file
View file

@ -0,0 +1,9 @@
O.plugin.dap = {
active = false,
breakpoint = {
text = "",
texthl = "LspDiagnosticsSignError",
linehl = "",
numhl = "",
},
}

View file

@ -3,12 +3,7 @@ if not status_ok then
return
end
-- require "dap"
vim.fn.sign_define("DapBreakpoint", {
text = "",
texthl = "LspDiagnosticsSignError",
linehl = "",
numhl = "",
})
vim.fn.sign_define("DapBreakpoint", O.plugin.dap.breakpoint)
dap.defaults.fallback.terminal_win_cmd = "50vsplit new"
O.user_which_key["d"] = {

View file

@ -4,6 +4,7 @@ if not status_ok then
end
O.plugin.telescope = {
active = false,
defaults = {
find_command = {
"rg",

View file

@ -121,7 +121,7 @@ treesitter_configs.setup {
keymaps = { ["."] = "textsubjects-smart", [";"] = "textsubjects-big" },
},
playground = {
enable = O.plugin.ts_playground.active,
enable = false,
disable = {},
updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code
persist_queries = false, -- Whether the query persists across vim sessions

View file

@ -188,10 +188,10 @@ local mappings = {
},
}
if O.plugin.ts_playground.active then
vim.api.nvim_set_keymap("n", "<leader>Th", ":TSHighlightCapturesUnderCursor<CR>", { noremap = true, silent = true })
mappings[""] = "Highlight Capture"
end
-- if O.plugin.ts_playground.active then
-- vim.api.nvim_set_keymap("n", "<leader>Th", ":TSHighlightCapturesUnderCursor<CR>", { noremap = true, silent = true })
-- mappings[""] = "Highlight Capture"
-- end
if O.plugin.zen.active then
vim.api.nvim_set_keymap("n", "<leader>z", ":ZenMode<CR>", { noremap = true, silent = true })

View file

@ -36,7 +36,7 @@ return require("packer").startup(function(use)
use {
"nvim-telescope/telescope.nvim",
config = [[require('lv-telescope')]],
--event = "BufEnter",
event = "BufWinEnter",
}
-- Autocomplete
@ -158,13 +158,6 @@ return require("packer").startup(function(use)
disable = not O.plugin.zen.active,
}
-- Treesitter playground
use {
"nvim-treesitter/playground",
event = "BufRead",
disable = not O.plugin.ts_playground.active,
}
use {
"lukas-reineke/indent-blankline.nvim",
event = "BufRead",
@ -198,7 +191,7 @@ return require("packer").startup(function(use)
config = function()
require "lv-dap"
end,
disable = not O.plugin.debug.active,
disable = not O.plugin.dap.active,
}
-- Floating terminal
@ -246,7 +239,7 @@ return require("packer").startup(function(use)
use {
"Pocco81/DAPInstall.nvim",
-- event = "BufRead",
disable = not O.plugin.dap_install.active,
disable = not O.plugin.dap.active,
}
-- LANGUAGE SPECIFIC GOES HERE

View file

@ -59,26 +59,26 @@ opt.wrap = O.wrap_lines -- display lines as one long line
opt.spell = O.spell
opt.spelllang = O.spelllang
opt.scrolloff = 8 -- is one of my fav
--local disabled_built_ins = {
-- "netrw",
-- "netrwPlugin",
-- "netrwSettings",
-- "netrwFileHandlers",
-- "gzip",
-- "zip",
-- "zipPlugin",
-- "tar",
-- "tarPlugin", -- 'man',
-- "getscript",
-- "getscriptPlugin",
-- "vimball",
-- "vimballPlugin",
-- "2html_plugin",
-- "logipat",
-- "rrhelper",
-- "spellfile_plugin",
-- -- 'matchit', 'matchparen', 'shada_plugin',
--}
--for _, plugin in pairs(disabled_built_ins) do
-- vim.g["loaded_" .. plugin] = 1
--end
local disabled_built_ins = {
"netrw",
"netrwPlugin",
"netrwSettings",
"netrwFileHandlers",
"gzip",
"zip",
"zipPlugin",
"tar",
"tarPlugin", -- 'man',
"getscript",
"getscriptPlugin",
"vimball",
"vimballPlugin",
"2html_plugin",
"logipat",
"rrhelper",
"spellfile_plugin",
-- 'matchit', 'matchparen', 'shada_plugin',
}
for _, plugin in pairs(disabled_built_ins) do
vim.g["loaded_" .. plugin] = 1
end