diff options
author | christianchiarulli <[email protected]> | 2021-07-09 21:34:12 -0400 |
---|---|---|
committer | christianchiarulli <[email protected]> | 2021-07-09 21:34:12 -0400 |
commit | 4ff04e31f0216278f0549b5c493e153d66759e00 (patch) | |
tree | 9cfce5e41503beb0d66448eba89328198a921c62 /lua | |
parent | b8182d5aeecd50ad6a7d4f5b9b1a8ccbd8bbad02 (diff) |
config refactor
Diffstat (limited to 'lua')
-rw-r--r-- | lua/default-config.lua | 7 | ||||
-rw-r--r-- | lua/lv-dap/config.lua | 9 | ||||
-rw-r--r-- | lua/lv-dap/init.lua | 7 | ||||
-rw-r--r-- | lua/lv-telescope/config.lua | 1 | ||||
-rw-r--r-- | lua/lv-treesitter/init.lua | 2 | ||||
-rw-r--r-- | lua/lv-which-key/init.lua | 8 | ||||
-rw-r--r-- | lua/plugins.lua | 13 | ||||
-rw-r--r-- | lua/settings.lua | 46 |
8 files changed, 45 insertions, 48 deletions
diff --git a/lua/default-config.lua b/lua/default-config.lua index 455832c0..f840be03 100644 --- a/lua/default-config.lua +++ b/lua/default-config.lua @@ -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" diff --git a/lua/lv-dap/config.lua b/lua/lv-dap/config.lua new file mode 100644 index 00000000..b626deaa --- /dev/null +++ b/lua/lv-dap/config.lua @@ -0,0 +1,9 @@ +O.plugin.dap = { + active = false, + breakpoint = { + text = "ï—£", + texthl = "LspDiagnosticsSignError", + linehl = "", + numhl = "", + }, +} diff --git a/lua/lv-dap/init.lua b/lua/lv-dap/init.lua index f3312bbb..f8ff845c 100644 --- a/lua/lv-dap/init.lua +++ b/lua/lv-dap/init.lua @@ -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"] = { diff --git a/lua/lv-telescope/config.lua b/lua/lv-telescope/config.lua index 49112bc2..7bab2633 100644 --- a/lua/lv-telescope/config.lua +++ b/lua/lv-telescope/config.lua @@ -4,6 +4,7 @@ if not status_ok then end O.plugin.telescope = { + active = false, defaults = { find_command = { "rg", diff --git a/lua/lv-treesitter/init.lua b/lua/lv-treesitter/init.lua index 55f45809..649141f3 100644 --- a/lua/lv-treesitter/init.lua +++ b/lua/lv-treesitter/init.lua @@ -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 diff --git a/lua/lv-which-key/init.lua b/lua/lv-which-key/init.lua index 6ae12dd3..6189aa50 100644 --- a/lua/lv-which-key/init.lua +++ b/lua/lv-which-key/init.lua @@ -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 }) diff --git a/lua/plugins.lua b/lua/plugins.lua index d107657d..a3978866 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -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 diff --git a/lua/settings.lua b/lua/settings.lua index 04a302aa..396df565 100644 --- a/lua/settings.lua +++ b/lua/settings.lua @@ -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 |