From 0d35b9ddaceb0a35d247b56cd37bbcd70f3c73de Mon Sep 17 00:00:00 2001 From: Pocco81 <58336662+Pocco81@users.noreply.github.com> Date: Tue, 17 Aug 2021 13:32:48 -0500 Subject: [PATCH] feat: added default conf and deep extension capabilities (#269) --- lua/chadrc.lua | 2 + lua/default_config.lua | 142 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+) create mode 100644 lua/default_config.lua diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 23d94dc..17981d2 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -139,4 +139,6 @@ M.mappings = { }, } +M = vim.tbl_deep_extend("force", require("default_config"), M) + return M diff --git a/lua/default_config.lua b/lua/default_config.lua new file mode 100644 index 0000000..23d94dc --- /dev/null +++ b/lua/default_config.lua @@ -0,0 +1,142 @@ +local M = {} + +M.ui = { + theme = "onedark", + -- for theme toggle + fav_themes = { + "onedark", + "gruvchad", + }, + theme_toggler = false, + hidden_statusline = { + -- these are filetypes, not pattern matched + "NvimTree", + "toggleterm", + }, +} + +M.options = { + permanent_undo = true, + ruler = false, + hidden = true, + ignorecase = true, + mouse = "a", + cmdheight = 1, + updatetime = 250, + timeoutlen = 400, + clipboard = "unnamedplus", + number = true, + numberwidth = 2, + expandtab = true, + shiftwidth = 2, + smartindent = true, + mapleader = " ", + autosave = false, + enable_insertNav = true, -- navigation in insertmode +} + +-- enable and disable plugins (false for disable) +M.plugin_status = { + -- UI + nvim_bufferline = true, + galaxyline = true, + nvim_colorizer = true, + dashboard_nvim = true, + blankline = true, + truezen_nvim = true, + better_esc = true, + -- lsp stuff + lspkind = true, + lspsignature = true, + -- git stuff + gitsigns = true, + vim_fugitive = true, + -- misc + neoformat = true, + vim_matchup = true, + autosave_nvim = true, + nvim_comment = true, + neoscroll_nvim = true, + telescope_media = true, + cheatsheet = false, +} + +-- make sure you dont use same keys twice +M.mappings = { + -- plugin specific + truezen = { + ataraxisMode = "zz", + minimalisticmode = "zm", + focusmode = "zf", + }, + comment_nvim = { + comment_toggle = "/", + }, + nvimtree = { + treetoggle = "", -- file manager + }, + neoformat = { + format = "fm", + }, + dashboard = { + open = "db", + newfile = "fn", + bookmarks = "bm", + sessionload = "l", + sessionsave = "s", + }, + telescope = { + live_grep = "fw", + git_status = "gt", + git_commits = "cm", + find_files = "ff", + buffers = "fb", + help_tags = "fh", + oldfiles = "fo", + themes = "th", + }, + telescope_media = { + media_files = "fp", + }, + chadsheet = { + default_keys = "dk", + user_keys = "uk", + }, + bufferline = { + new_buffer = "", + newtab = "b", + cycleNext = "", -- next buffer + cyclePrev = "", -- previous buffer + }, + fugitive = { + Git = "gs", + diffget_2 = "gh", + diffget_3 = "gl", + git_blame = "gb", + }, + toggleterm = { + toggle_window = "w", + toggle_vert = "v", + toggle_hori = "h", + hide_term = "JK", + }, + -- navigation in insert mode + insert_nav = { + forward = "", + backward = "", + top_of_line = "", + end_of_line = "", + prev_line = "", + next_line = "", + }, + -- non plugin + misc = { + esc_Termmode = "jk", -- get out of terminal mode + close_buffer = "", -- close current focused buffer + copywhole_file = "", + toggle_linenr = "n", -- show or hide line number + theme_toggle = "x", + }, +} + +return M