extreme update

This commit is contained in:
Clay Gomera 2022-09-19 15:06:15 -04:00
parent 2a3f9c793f
commit d21a91036f
58984 changed files with 382500 additions and 2896 deletions

View file

@ -18,7 +18,7 @@ export EDITOR="emacsclient -t -a ''" # $EDITOR use Emacs in termina
export VISUAL="emacsclient -c -a emacs" # $VISUAL use Emacs in GUI mode
export READER="zathura" # Zathura as the pdf viewer
export TERMINAL="alacritty" # Alacritty as the default terminal emulator
export BROWSER="qutebrowser" # Qutebrowser as the default web browser
export BROWSER="librewolf" # Librewolf as the default web browser
export WM="awesome" # Awesomewm as the default Window Manager
export XDG_DATA_HOME="${XDG_DATA_HOME:="$HOME/.local/share"}"
export XDG_CACHE_HOME="${XDG_CACHE_HOME:="$HOME/.cache"}"

View file

@ -136,15 +136,31 @@ alias \
lt="exa -aT --color=always --group-directories-first" \
l.='exa -a | egrep "^\."'
# pacman
# function to detect os and assign aliases to package managers
os=$(grep NAME /etc/os-release | head -1 | cut -d'=' -f2 | sed 's/["]//g')
if [ "${os}" = "Arch Linux" ]; then
alias \
pac-up="paru -Syyua" \
pac-get="paru -S" \
pac-rmv="paru -Rcns" \
pac-rmv-sec="paru -R" \
pac-qry="paru -Ss" \
pac-cln="paru -Scc"
elif [ "${os}" = "Void Linux" ]; then
alias \
xb-up="sudo vpm update -Su && xcheckrestart" \
xb-get="sudo vpm install" \
xb-rmv="sudo vpm remove -R" \
xb-rmv-sec="sudo vpm remove" \
xb-qry="sudo vpm search" \
xb-cln="sudo vpm cleanup -o" \
xb-src="$HOME/.local/share/void-packages/xbps-src"
xb-cln="sudo vpm cleanup -o"
elif [ "${os}" = "Fedora Linux" ]; then
alias \
dnf-up="sudo dnf update" \
dnf-get="sudo dnf install" \
dnf-rmv="sudo dnf remove" \
dnf-cln="sudo dnf autoremove"
fi
# colorize grep output (good for log files)
alias \
@ -188,10 +204,22 @@ alias \
music="cmus"
# power management
if [ "${os}" = "Arch Linux" ]; then
alias \
po="systemctl poweroff" \
sp="systemctl suspend" \
rb="systemctl reboot"
elif [ "${os}" = "Void Linux" ]; then
alias \
po="loginctl poweroff" \
sp="loginctl suspend" \
rb="loginctl reboot"
else
alias \
po="systemctl poweroff" \
sp="systemctl suspend" \
rb="systemctl reboot"
fi
# file management
alias \

View file

@ -386,6 +386,9 @@ font:
bold_italic:
family: mononoki Nerd Font
style: Bold Italic
mono:
family: mononoki Nerd Font
style: Mono
size: 8
offset:
x: 0

View file

@ -6,6 +6,6 @@ music = "alacritty -t cmus --class cmus,cmus -e cmus",
chat = "alacritty -t gomuks --class gomuks,gomuks -e gomuks",
game = "retroarch",
file = "alacritty -t vifm --class vifm,vifm -e ./.config/vifm/scripts/vifmrun",
browser = "qutebrowser",
browser = "librewolf",
}
return apps

View file

@ -10,14 +10,14 @@ mytextclock = wibox.widget.textclock()
screen.connect_signal("request::desktop_decoration", function(s)
-- Tag names for each screen
awful.tag({ "",
"",
"",
"",
awful.tag({ "",
"",
"",
"",
"",
"",
"",
"",
"",
"",
""
}, s, awful.layout.layouts[1])

View file

@ -1,14 +1,14 @@
#!/bin/bash
# Prints the current volume or 🔇 if muted.
[ $(pamixer --get-mute) = true ] && echo "" && exit
[ $(pamixer --get-mute) = true ] && echo "x" && exit
vol="$(pamixer --get-volume)"
if [ "$vol" -gt "70" ]; then
icon=""
elif [ "$vol" -gt "30" ]; then
icon=""
elif [ "$vol" -gt "0" ]; then
icon=""
icon="x"
else
echo "" && exit
echo "x" && exit
fi
echo "$icon $vol%"

View file

@ -53,12 +53,12 @@ ruled.client.connect_signal("request::rules", function()
"Virt-manager"
}
},
properties = { tag = "" },
properties = { tag = "" },
}
-- TAG 2
ruled.client.append_rule {
rule = { class = "vifm" },
properties = { tag = "" },
properties = { tag = "" },
}
-- TAG 3
ruled.client.append_rule {
@ -71,12 +71,12 @@ ruled.client.connect_signal("request::rules", function()
"qutebrowser"
}
},
properties = { tag = "" }
properties = { tag = "" }
}
-- TAG 4
ruled.client.append_rule {
rule = { class = "gomuks" },
properties = { tag = "" }
properties = { tag = "" }
}
-- TAG 5
ruled.client.append_rule {
@ -102,7 +102,7 @@ ruled.client.connect_signal("request::rules", function()
"mpv"
}
},
properties = { tag = "" }
properties = { tag = "" }
}
-- TAG 7
ruled.client.append_rule {
@ -132,7 +132,7 @@ ruled.client.connect_signal("request::rules", function()
"libreoffice.*"
}
},
properties = { tag = "" }
properties = { tag = "" }
}
-- TAG 9
ruled.client.append_rule {

View file

@ -41,7 +41,7 @@ theme.border_marked = "#9d0006"
-- }}}
-- {{{ Taglist
theme.taglist_font = "mononoki Nerd Font 14"
theme.taglist_font = "mononoki Nerd Font Mono 24"
theme.taglist_fg_focus = "#fb4934"
theme.taglist_fg_occupied = "#8ec07c"
theme.taglist_fg_urgent = "#504945"

View file

@ -1,6 +0,0 @@
column_width = 120
line_endings = "Unix"
indent_type = "Spaces"
indent_width = 2
quote_style = "AutoPreferDouble"
call_parentheses = "None"

View file

@ -1,34 +0,0 @@
vim.defer_fn(function()
pcall(require, "impatient")
end, 0)
require "core"
require "core.options"
-- setup packer + plugins
local fn = vim.fn
local install_path = fn.stdpath "data" .. "/site/pack/packer/opt/packer.nvim"
if fn.empty(fn.glob(install_path)) > 0 then
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "#1e222a" })
print "Cloning packer .."
fn.system { "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path }
-- install plugins + compile their configs
vim.cmd "packadd packer.nvim"
require "plugins"
vim.cmd "PackerSync"
-- install binaries from mason.nvim & tsparsers
vim.api.nvim_create_autocmd("User", {
pattern = "PackerComplete",
callback = function()
vim.cmd "bw | silent! MasonInstallAll" -- close packer window
require("packer").loader "nvim-treesitter"
end,
})
end
pcall(require, "custom")
require("core.utils").load_mappings()

View file

@ -1,27 +0,0 @@
-- Chadrc overrides this file
local M = {}
M.options = {
nvChad = {
update_url = "https://github.com/NvChad/NvChad",
update_branch = "main",
},
}
M.ui = {
-- hl = highlights
hl_add = {},
hl_override = {},
changed_themes = {},
theme_toggle = { "onedark", "one_light" },
theme = "onedark", -- default theme
transparency = false,
}
M.plugins = {}
-- check core.mappings for table structure
M.mappings = require "core.mappings"
return M

View file

@ -1,27 +0,0 @@
-- add binaries installed by mason.nvim to path
local is_windows = vim.loop.os_uname().sysname == "Windows_NT"
vim.env.PATH = vim.env.PATH .. (is_windows and ";" or ":") .. vim.fn.stdpath "data" .. "/mason/bin"
-- commands
vim.cmd "silent! command! NvChadUpdate lua require('nvchad').update_nvchad()"
vim.cmd "silent! command! NvChadSnapshotCreate lua require('nvchad').snap_create()"
vim.cmd "silent! command! NvChadSnapshotDelete lua require('nvchad').snap_delete()"
vim.cmd "silent! command! NvChadSnapshotCheckout lua require('nvchad').snap_checkout()"
-- autocmds
local autocmd = vim.api.nvim_create_autocmd
-- dont list quickfix buffers
autocmd("FileType", {
pattern = "qf",
callback = function()
vim.opt_local.buflisted = false
end,
})
-- wrap the PackerSync command to warn people before using it in NvChadSnapshots
autocmd("VimEnter", {
callback = function()
vim.cmd "command! -nargs=* -complete=customlist,v:lua.require'packer'.plugin_complete PackerSync lua require('plugins') require('core.utils').packer_sync(<f-args>)"
end,
})

View file

@ -1,94 +0,0 @@
local M = {}
local autocmd = vim.api.nvim_create_autocmd
-- require("packer").loader(tb.plugins)
-- This must be used for plugins that need to be loaded just after a file
-- ex : treesitter, lspconfig etc
M.lazy_load = function(tb)
autocmd(tb.events, {
group = vim.api.nvim_create_augroup(tb.augroup_name, {}),
callback = function()
if tb.condition() then
vim.api.nvim_del_augroup_by_name(tb.augroup_name)
-- dont defer for treesitter as it will show slow highlighting
-- This deferring only happens only when we do "nvim filename"
if tb.plugin ~= "nvim-treesitter" then
vim.defer_fn(function()
require("packer").loader(tb.plugin)
if tb.plugin == "nvim-lspconfig" then
vim.cmd "silent! do FileType"
end
end, 0)
else
require("packer").loader(tb.plugin)
end
end
end,
})
end
-- load certain plugins only when there's a file opened in the buffer
-- if "nvim filename" is executed -> load the plugin after nvim gui loads
-- This gives an instant preview of nvim with the file opened
M.on_file_open = function(plugin_name)
M.lazy_load {
events = { "BufRead", "BufWinEnter", "BufNewFile" },
augroup_name = "BeLazyOnFileOpen" .. plugin_name,
plugin = plugin_name,
condition = function()
local file = vim.fn.expand "%"
return file ~= "NvimTree_1" and file ~= "[packer]" and file ~= ""
end,
}
end
M.packer_cmds = {
"PackerSnapshot",
"PackerSnapshotRollback",
"PackerSnapshotDelete",
"PackerInstall",
"PackerUpdate",
"PackerSync",
"PackerClean",
"PackerCompile",
"PackerStatus",
"PackerProfile",
"PackerLoad",
}
M.treesitter_cmds = {
"TSInstall",
"TSBufEnable",
"TSBufDisable",
"TSEnable",
"TSDisable",
"TSModuleInfo",
}
M.mason_cmds = {
"Mason",
"MasonInstall",
"MasonInstallAll",
"MasonUninstall",
"MasonUninstallAll",
"MasonLog",
}
M.gitsigns = function()
autocmd({ "BufRead" }, {
group = vim.api.nvim_create_augroup("GitSignsLazyLoad", { clear = true }),
callback = function()
vim.fn.system("git rev-parse " .. vim.fn.expand "%:p:h")
if vim.v.shell_error == 0 then
vim.api.nvim_del_augroup_by_name "GitSignsLazyLoad"
vim.schedule(function()
require("packer").loader "gitsigns.nvim"
end)
end
end,
})
end
return M

View file

@ -1,407 +0,0 @@
-- n, v, i, t = mode names
local function termcodes(str)
return vim.api.nvim_replace_termcodes(str, true, true, true)
end
local M = {}
M.general = {
i = {
-- go to beginning and end
["<C-b>"] = { "<ESC>^i", "beginning of line" },
["<C-e>"] = { "<End>", "end of line" },
-- navigate within insert mode
["<C-h>"] = { "<Left>", "move left" },
["<C-l>"] = { "<Right>", "move right" },
["<C-j>"] = { "<Down>", "move down" },
["<C-k>"] = { "<Up>", "move up" },
},
n = {
["<ESC>"] = { "<cmd> noh <CR>", "no highlight" },
-- switch between windows
["<C-h>"] = { "<C-w>h", "window left" },
["<C-l>"] = { "<C-w>l", "window right" },
["<C-j>"] = { "<C-w>j", "window down" },
["<C-k>"] = { "<C-w>k", "window up" },
-- save
["<C-s>"] = { "<cmd> w <CR>", "save file" },
-- Copy all
["<C-c>"] = { "<cmd> %y+ <CR>", "copy whole file" },
-- line numbers
["<leader>n"] = { "<cmd> set nu! <CR>", "toggle line number" },
["<leader>rn"] = { "<cmd> set rnu! <CR>", "toggle relative number" },
-- update nvchad
["<leader>uu"] = { "<cmd> :NvChadUpdate <CR>", "update nvchad" },
["<leader>tt"] = {
function()
require("base46").toggle_theme()
end,
"toggle theme",
},
-- Allow moving the cursor through wrapped lines with j, k, <Up> and <Down>
-- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/
-- empty mode is same as using <cmd> :map
-- also don't use g[j|k] when in operator pending mode, so it doesn't alter d, y or c behaviour
["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } },
["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } },
["<Up>"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } },
["<Down>"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } },
-- new buffer
["<leader>b"] = { "<cmd> enew <CR>", "new buffer" },
-- close buffer + hide terminal buffer
["<leader>x"] = {
function()
require("core.utils").close_buffer()
end,
"close buffer",
},
},
t = { ["<C-x>"] = { termcodes "<C-\\><C-N>", "escape terminal mode" } },
v = {
["<Up>"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } },
["<Down>"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } },
},
x = {
["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } },
["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } },
-- Don't copy the replaced text after pasting in visual mode
-- https://vim.fandom.com/wiki/Replace_a_word_with_yanked_text#Alternative_mapping_for_paste
["p"] = { 'p:let @+=@0<CR>:let @"=@0<CR>', opts = { silent = true } },
},
}
M.tabufline = {
plugin = true,
n = {
-- cycle through buffers
["<TAB>"] = {
function()
require("core.utils").tabuflineNext()
end,
"goto next buffer",
},
["<S-Tab>"] = {
function()
require("core.utils").tabuflinePrev()
end,
"goto prev buffer",
},
-- pick buffers via numbers
["<Bslash>"] = { "<cmd> TbufPick <CR>", "Pick buffer" },
},
}
M.comment = {
plugin = true,
-- toggle comment in both modes
n = {
["<leader>/"] = {
function()
require("Comment.api").toggle.linewise.current()
end,
"toggle comment",
},
},
v = {
["<leader>/"] = {
"<ESC><cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<CR>",
"toggle comment",
},
},
}
M.lspconfig = {
plugin = true,
-- See `<cmd> :help vim.lsp.*` for documentation on any of the below functions
n = {
["gD"] = {
function()
vim.lsp.buf.declaration()
end,
"lsp declaration",
},
["gd"] = {
function()
vim.lsp.buf.definition()
end,
"lsp definition",
},
["K"] = {
function()
vim.lsp.buf.hover()
end,
"lsp hover",
},
["gi"] = {
function()
vim.lsp.buf.implementation()
end,
"lsp implementation",
},
["<leader>ls"] = {
function()
vim.lsp.buf.signature_help()
end,
"lsp signature_help",
},
["<leader>D"] = {
function()
vim.lsp.buf.type_definition()
end,
"lsp definition type",
},
["<leader>ra"] = {
function()
require("nvchad_ui.renamer").open()
end,
"lsp rename",
},
["<leader>ca"] = {
function()
vim.lsp.buf.code_action()
end,
"lsp code_action",
},
["gr"] = {
function()
vim.lsp.buf.references()
end,
"lsp references",
},
["<leader>f"] = {
function()
vim.diagnostic.open_float()
end,
"floating diagnostic",
},
["[d"] = {
function()
vim.diagnostic.goto_prev()
end,
"goto prev",
},
["d]"] = {
function()
vim.diagnostic.goto_next()
end,
"goto_next",
},
["<leader>q"] = {
function()
vim.diagnostic.setloclist()
end,
"diagnostic setloclist",
},
["<leader>fm"] = {
function()
vim.lsp.buf.formatting {}
end,
"lsp formatting",
},
["<leader>wa"] = {
function()
vim.lsp.buf.add_workspace_folder()
end,
"add workspace folder",
},
["<leader>wr"] = {
function()
vim.lsp.buf.remove_workspace_folder()
end,
"remove workspace folder",
},
["<leader>wl"] = {
function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end,
"list workspace folders",
},
},
}
M.nvimtree = {
plugin = true,
n = {
-- toggle
["<C-n>"] = { "<cmd> NvimTreeToggle <CR>", "toggle nvimtree" },
-- focus
["<leader>e"] = { "<cmd> NvimTreeFocus <CR>", "focus nvimtree" },
},
}
M.telescope = {
plugin = true,
n = {
-- find
["<leader>ff"] = { "<cmd> Telescope find_files <CR>", "find files" },
["<leader>fa"] = { "<cmd> Telescope find_files follow=true no_ignore=true hidden=true <CR>", "find all" },
["<leader>fw"] = { "<cmd> Telescope live_grep <CR>", "live grep" },
["<leader>fb"] = { "<cmd> Telescope buffers <CR>", "find buffers" },
["<leader>fh"] = { "<cmd> Telescope help_tags <CR>", "help page" },
["<leader>fo"] = { "<cmd> Telescope oldfiles <CR>", "find oldfiles" },
["<leader>tk"] = { "<cmd> Telescope keymaps <CR>", "show keys" },
-- git
["<leader>cm"] = { "<cmd> Telescope git_commits <CR>", "git commits" },
["<leader>gt"] = { "<cmd> Telescope git_status <CR>", "git status" },
-- pick a hidden term
["<leader>pt"] = { "<cmd> Telescope terms <CR>", "pick hidden term" },
-- theme switcher
["<leader>th"] = { "<cmd> Telescope themes <CR>", "nvchad themes" },
},
}
M.nvterm = {
plugin = true,
t = {
-- toggle in terminal mode
["<A-i>"] = {
function()
require("nvterm.terminal").toggle "float"
end,
"toggle floating term",
},
["<A-h>"] = {
function()
require("nvterm.terminal").toggle "horizontal"
end,
"toggle horizontal term",
},
["<A-v>"] = {
function()
require("nvterm.terminal").toggle "vertical"
end,
"toggle vertical term",
},
},
n = {
-- toggle in normal mode
["<A-i>"] = {
function()
require("nvterm.terminal").toggle "float"
end,
"toggle floating term",
},
["<A-h>"] = {
function()
require("nvterm.terminal").toggle "horizontal"
end,
"toggle horizontal term",
},
["<A-v>"] = {
function()
require("nvterm.terminal").toggle "vertical"
end,
"toggle vertical term",
},
-- new
["<leader>h"] = {
function()
require("nvterm.terminal").new "horizontal"
end,
"new horizontal term",
},
["<leader>v"] = {
function()
require("nvterm.terminal").new "vertical"
end,
"new vertical term",
},
},
}
M.whichkey = {
plugin = true,
n = {
["<leader>wK"] = {
function()
vim.cmd "WhichKey"
end,
"which-key all keymaps",
},
["<leader>wk"] = {
function()
local input = vim.fn.input "WhichKey: "
vim.cmd("WhichKey " .. input)
end,
"which-key query lookup",
},
},
}
M.blankline = {
plugin = true,
n = {
["<leader>cc"] = {
function()
local ok, start = require("indent_blankline.utils").get_current_context(
vim.g.indent_blankline_context_patterns,
vim.g.indent_blankline_use_treesitter_scope
)
if ok then
vim.api.nvim_win_set_cursor(vim.api.nvim_get_current_win(), { start, 0 })
vim.cmd [[normal! _]]
end
end,
"Jump to current_context",
},
},
}
return M

View file

@ -1,103 +0,0 @@
local opt = vim.opt
local g = vim.g
local config = require("core.utils").load_config()
g.vim_version = vim.version().minor
g.nvchad_theme = config.ui.theme
g.toggle_theme_icon = ""
g.transparency = config.ui.transparency
g.theme_switcher_loaded = false
-- use filetype.lua instead of filetype.vim. it's enabled by default in neovim 0.8 (nightly)
if g.vim_version < 8 then
g.did_load_filetypes = 0
g.do_filetype_lua = 1
end
opt.laststatus = 3 -- global statusline
opt.showmode = false
opt.title = true
opt.clipboard = "unnamedplus"
opt.cursorline = true
-- Indenting
opt.expandtab = true
opt.shiftwidth = 2
opt.smartindent = true
opt.tabstop = 2
opt.softtabstop = 2
opt.fillchars = { eob = " " }
opt.ignorecase = true
opt.smartcase = true
opt.mouse = "a"
-- Numbers
opt.number = true
opt.numberwidth = 2
opt.ruler = false
-- disable nvim intro
opt.shortmess:append "sI"
opt.signcolumn = "yes"
opt.splitbelow = true
opt.splitright = true
opt.termguicolors = true
opt.timeoutlen = 400
opt.undofile = true
-- interval for writing swap file to disk, also used by gitsigns
opt.updatetime = 250
-- go to previous/next line with h,l,left arrow and right arrow
-- when cursor reaches end/beginning of line
opt.whichwrap:append "<>[]hl"
g.mapleader = " "
-- disable some builtin vim plugins
local default_plugins = {
"2html_plugin",
"getscript",
"getscriptPlugin",
"gzip",
"logipat",
"netrw",
"netrwPlugin",
"netrwSettings",
"netrwFileHandlers",
"matchit",
"tar",
"tarPlugin",
"rrhelper",
"spellfile_plugin",
"vimball",
"vimballPlugin",
"zip",
"zipPlugin",
"tutor",
"rplugin",
"syntax",
"synmenu",
"optwin",
"compiler",
"bugreport",
"ftplugin",
}
for _, plugin in pairs(default_plugins) do
g["loaded_" .. plugin] = 1
end
local default_providers = {
"node",
"perl",
"python3",
"ruby",
}
for _, provider in ipairs(default_providers) do
vim.g["loaded_" .. provider .. "_provider"] = 0
end

View file

@ -1,259 +0,0 @@
local M = {}
local api = vim.api
local merge_tb = vim.tbl_deep_extend
M.close_buffer = function(bufnr)
if vim.bo.buftype == "terminal" then
vim.cmd(vim.bo.buflisted and "set nobl | enew" or "hide")
else
bufnr = bufnr or api.nvim_get_current_buf()
require("core.utils").tabuflinePrev()
vim.cmd("confirm bd" .. bufnr)
end
end
M.load_config = function()
local config = require "core.default_config"
local chadrc_exists, chadrc = pcall(require, "custom.chadrc")
if chadrc_exists then
-- merge user config if it exists and is a table; otherwise display an error
if type(chadrc) == "table" then
config.mappings = M.remove_disabled_keys(chadrc.mappings, config.mappings)
config = merge_tb("force", config, chadrc) or {}
else
error "chadrc must return a table!"
end
end
config.mappings.disabled = nil
return config
end
M.remove_disabled_keys = function(chadrc_mappings, default_mappings)
if not chadrc_mappings then
return default_mappings
end
-- store keys in a array with true value to compare
local keys_to_disable = {}
for _, mappings in pairs(chadrc_mappings) do
for mode, section_keys in pairs(mappings) do
if not keys_to_disable[mode] then
keys_to_disable[mode] = {}
end
section_keys = (type(section_keys) == "table" and section_keys) or {}
for k, _ in pairs(section_keys) do
keys_to_disable[mode][k] = true
end
end
end
-- make a copy as we need to modify default_mappings
for section_name, section_mappings in pairs(default_mappings) do
for mode, mode_mappings in pairs(section_mappings) do
mode_mappings = (type(mode_mappings) == "table" and mode_mappings) or {}
for k, _ in pairs(mode_mappings) do
-- if key if found then remove from default_mappings
if keys_to_disable[mode] and keys_to_disable[mode][k] then
default_mappings[section_name][mode][k] = nil
end
end
end
end
return default_mappings
end
M.load_mappings = function(section, mapping_opt)
local function set_section_map(section_values)
if section_values.plugin then
return
end
section_values.plugin = nil
for mode, mode_values in pairs(section_values) do
local default_opts = merge_tb("force", { mode = mode }, mapping_opt or {})
for keybind, mapping_info in pairs(mode_values) do
-- merge default + user opts
local opts = merge_tb("force", default_opts, mapping_info.opts or {})
mapping_info.opts, opts.mode = nil, nil
opts.desc = mapping_info[2]
vim.keymap.set(mode, keybind, mapping_info[1], opts)
end
end
end
local mappings = require("core.utils").load_config().mappings
if type(section) == "string" then
mappings[section]["plugin"] = nil
mappings = { mappings[section] }
end
for _, sect in pairs(mappings) do
set_section_map(sect)
end
end
-- merge default/user plugin tables
M.merge_plugins = function(plugins)
local plugin_configs = M.load_config().plugins
local user_plugins = plugin_configs
-- old plugin syntax for adding plugins
if plugin_configs.user and type(plugin_configs.user) == "table" then
user_plugins = plugin_configs.user
end
-- support old plugin removal syntax
local remove_plugins = plugin_configs.remove
if type(remove_plugins) == "table" then
for _, v in ipairs(remove_plugins) do
plugins[v] = nil
end
end
plugins = merge_tb("force", plugins, user_plugins)
local final_table = {}
for key, val in pairs(plugins) do
if val and type(val) == "table" then
plugins[key] = val.rm_default_opts and user_plugins[key] or plugins[key]
plugins[key][1] = key
final_table[#final_table + 1] = plugins[key]
end
end
return final_table
end
-- override plugin options table with custom ones
M.load_override = function(options_table, name)
local plugin_configs, plugin_options = M.load_config().plugins, nil
-- support old plugin syntax for override
local user_override = plugin_configs.override and plugin_configs.override[name]
if user_override and type(user_override) == "table" then
plugin_options = user_override
end
-- if no old style plugin override is found, then use the new syntax
if not plugin_options and plugin_configs[name] then
local override_options = plugin_configs[name].override_options or {}
if type(override_options) == "table" then
plugin_options = override_options
elseif type(override_options) == "function" then
plugin_options = override_options()
end
end
-- make sure the plugin options are a table
plugin_options = type(plugin_options) == "table" and plugin_options or {}
return merge_tb("force", options_table, plugin_options)
end
M.packer_sync = function(...)
local git_exists, git = pcall(require, "nvchad.utils.git")
local defaults_exists, defaults = pcall(require, "nvchad.utils.config")
local packer_exists, packer = pcall(require, "packer")
if git_exists and defaults_exists then
local current_branch_name = git.get_current_branch_name()
-- warn the user if we are on a snapshot branch
if current_branch_name:match(defaults.snaps.base_snap_branch_name .. "(.+)" .. "$") then
vim.api.nvim_echo({
{ "WARNING: You are trying to use ", "WarningMsg" },
{ "PackerSync" },
{
" on a NvChadSnapshot. This will cause issues if NvChad dependencies contain "
.. "any breaking changes! Plugin updates will not be included in this "
.. "snapshot, so they will be lost after switching between snapshots! Would "
.. "you still like to continue? [y/N]\n",
"WarningMsg",
},
}, false, {})
local ans = vim.trim(string.lower(vim.fn.input "-> "))
if ans ~= "y" then
return
end
end
end
if packer_exists then
packer.sync(...)
local plugins = M.load_config().plugins
local old_style_options = plugins.user or plugins.override or plugins.remove
if old_style_options then
vim.notify_once("NvChad: This plugin syntax is deprecated, use new style config.", "Error")
end
else
error "Packer could not be loaded!"
end
end
M.bufilter = function()
local bufs = vim.t.bufs or nil
if not bufs then
return {}
end
for i = #bufs, 1, -1 do
if not vim.api.nvim_buf_is_valid(bufs[i]) then
table.remove(bufs, i)
end
end
return bufs
end
M.tabuflineNext = function()
local bufs = M.bufilter() or {}
for i, v in ipairs(bufs) do
if api.nvim_get_current_buf() == v then
vim.cmd(i == #bufs and "b" .. bufs[1] or "b" .. bufs[i + 1])
break
end
end
end
M.tabuflinePrev = function()
local bufs = M.bufilter() or {}
for i, v in ipairs(bufs) do
if api.nvim_get_current_buf() == v then
vim.cmd(i == 1 and "b" .. bufs[#bufs] or "b" .. bufs[i - 1])
break
end
end
end
-- closes tab + all of its buffers
M.closeAllBufs = function(action)
local bufs = vim.t.bufs
if action == "closeTab" then
vim.cmd "tabclose"
end
for _, buf in ipairs(bufs) do
M.close_buffer(buf)
end
if action ~= "closeTab" then
vim.cmd "enew"
end
end
return M

View file

@ -1,27 +0,0 @@
-- Chadrc overrides this file
local M = {}
M.options = {
nvChad = {
update_url = "https://github.com/NvChad/NvChad",
update_branch = "main",
},
}
M.ui = {
-- hl = highlights
hl_add = {},
hl_override = {},
changed_themes = {},
theme_toggle = { "gruvbox", "gruvbox-light" },
theme = "gruvbox", -- default theme
transparency = false,
}
M.plugins = {}
-- check core.mappings for table structure
M.mappings = require "core.mappings"
return M

View file

@ -1,407 +0,0 @@
-- n, v, i, t = mode names
local function termcodes(str)
return vim.api.nvim_replace_termcodes(str, true, true, true)
end
local M = {}
M.general = {
i = {
-- go to beginning and end
["<C-b>"] = { "<ESC>^i", "beginning of line" },
["<C-e>"] = { "<End>", "end of line" },
-- navigate within insert mode
["<C-h>"] = { "<Left>", "move left" },
["<C-l>"] = { "<Right>", "move right" },
["<C-j>"] = { "<Down>", "move down" },
["<C-k>"] = { "<Up>", "move up" },
},
n = {
["<ESC>"] = { "<cmd> noh <CR>", "no highlight" },
-- switch between windows
["<C-h>"] = { "<C-w>h", "window left" },
["<C-l>"] = { "<C-w>l", "window right" },
["<C-j>"] = { "<C-w>j", "window down" },
["<C-k>"] = { "<C-w>k", "window up" },
-- save
["<C-s>"] = { "<cmd> w <CR>", "save file" },
-- Copy all
["<C-c>"] = { "<cmd> %y+ <CR>", "copy whole file" },
-- line numbers
["<leader>n"] = { "<cmd> set nu! <CR>", "toggle line number" },
["<leader>rn"] = { "<cmd> set rnu! <CR>", "toggle relative number" },
-- update nvchad
["<leader>uu"] = { "<cmd> :NvChadUpdate <CR>", "update nvchad" },
["<leader>tt"] = {
function()
require("base46").toggle_theme()
end,
"toggle theme",
},
-- Allow moving the cursor through wrapped lines with j, k, <Up> and <Down>
-- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/
-- empty mode is same as using <cmd> :map
-- also don't use g[j|k] when in operator pending mode, so it doesn't alter d, y or c behaviour
["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } },
["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } },
["<Up>"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } },
["<Down>"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } },
-- new buffer
["<leader>b"] = { "<cmd> enew <CR>", "new buffer" },
-- close buffer + hide terminal buffer
["<leader>x"] = {
function()
require("core.utils").close_buffer()
end,
"close buffer",
},
},
t = { ["<C-x>"] = { termcodes "<C-\\><C-N>", "escape terminal mode" } },
v = {
["<Up>"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } },
["<Down>"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } },
},
x = {
["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } },
["k"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', opts = { expr = true } },
-- Don't copy the replaced text after pasting in visual mode
-- https://vim.fandom.com/wiki/Replace_a_word_with_yanked_text#Alternative_mapping_for_paste
["p"] = { 'p:let @+=@0<CR>:let @"=@0<CR>', opts = { silent = true } },
},
}
M.tabufline = {
plugin = true,
n = {
-- cycle through buffers
["<TAB>"] = {
function()
require("core.utils").tabuflineNext()
end,
"goto next buffer",
},
["<S-Tab>"] = {
function()
require("core.utils").tabuflinePrev()
end,
"goto prev buffer",
},
-- pick buffers via numbers
["<Bslash>"] = { "<cmd> TbufPick <CR>", "Pick buffer" },
},
}
M.comment = {
plugin = true,
-- toggle comment in both modes
n = {
["<leader>/"] = {
function()
require("Comment.api").toggle.linewise.current()
end,
"toggle comment",
},
},
v = {
["<leader>/"] = {
"<ESC><cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<CR>",
"toggle comment",
},
},
}
M.lspconfig = {
plugin = true,
-- See `<cmd> :help vim.lsp.*` for documentation on any of the below functions
n = {
["gD"] = {
function()
vim.lsp.buf.declaration()
end,
"lsp declaration",
},
["gd"] = {
function()
vim.lsp.buf.definition()
end,
"lsp definition",
},
["K"] = {
function()
vim.lsp.buf.hover()
end,
"lsp hover",
},
["gi"] = {
function()
vim.lsp.buf.implementation()
end,
"lsp implementation",
},
["<leader>ls"] = {
function()
vim.lsp.buf.signature_help()
end,
"lsp signature_help",
},
["<leader>D"] = {
function()
vim.lsp.buf.type_definition()
end,
"lsp definition type",
},
["<leader>ra"] = {
function()
require("nvchad_ui.renamer").open()
end,
"lsp rename",
},
["<leader>ca"] = {
function()
vim.lsp.buf.code_action()
end,
"lsp code_action",
},
["gr"] = {
function()
vim.lsp.buf.references()
end,
"lsp references",
},
["<leader>f"] = {
function()
vim.diagnostic.open_float()
end,
"floating diagnostic",
},
["[d"] = {
function()
vim.diagnostic.goto_prev()
end,
"goto prev",
},
["d]"] = {
function()
vim.diagnostic.goto_next()
end,
"goto_next",
},
["<leader>q"] = {
function()
vim.diagnostic.setloclist()
end,
"diagnostic setloclist",
},
["<leader>fm"] = {
function()
vim.lsp.buf.formatting {}
end,
"lsp formatting",
},
["<leader>wa"] = {
function()
vim.lsp.buf.add_workspace_folder()
end,
"add workspace folder",
},
["<leader>wr"] = {
function()
vim.lsp.buf.remove_workspace_folder()
end,
"remove workspace folder",
},
["<leader>wl"] = {
function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end,
"list workspace folders",
},
},
}
M.nvimtree = {
plugin = true,
n = {
-- toggle
["<C-n>"] = { "<cmd> NvimTreeToggle <CR>", "toggle nvimtree" },
-- focus
["<leader>e"] = { "<cmd> NvimTreeFocus <CR>", "focus nvimtree" },
},
}
M.telescope = {
plugin = true,
n = {
-- find
["<leader>ff"] = { "<cmd> Telescope find_files <CR>", "find files" },
["<leader>fa"] = { "<cmd> Telescope find_files follow=true no_ignore=true hidden=true <CR>", "find all" },
["<leader>fw"] = { "<cmd> Telescope live_grep <CR>", "live grep" },
["<leader>fb"] = { "<cmd> Telescope buffers <CR>", "find buffers" },
["<leader>fh"] = { "<cmd> Telescope help_tags <CR>", "help page" },
["<leader>fo"] = { "<cmd> Telescope oldfiles <CR>", "find oldfiles" },
["<leader>tk"] = { "<cmd> Telescope keymaps <CR>", "show keys" },
-- git
["<leader>cm"] = { "<cmd> Telescope git_commits <CR>", "git commits" },
["<leader>gt"] = { "<cmd> Telescope git_status <CR>", "git status" },
-- pick a hidden term
["<leader>pt"] = { "<cmd> Telescope terms <CR>", "pick hidden term" },
-- theme switcher
["<leader>th"] = { "<cmd> Telescope themes <CR>", "nvchad themes" },
},
}
M.nvterm = {
plugin = true,
t = {
-- toggle in terminal mode
["<A-i>"] = {
function()
require("nvterm.terminal").toggle "float"
end,
"toggle floating term",
},
["<A-h>"] = {
function()
require("nvterm.terminal").toggle "horizontal"
end,
"toggle horizontal term",
},
["<A-v>"] = {
function()
require("nvterm.terminal").toggle "vertical"
end,
"toggle vertical term",
},
},
n = {
-- toggle in normal mode
["<A-i>"] = {
function()
require("nvterm.terminal").toggle "float"
end,
"toggle floating term",
},
["<A-h>"] = {
function()
require("nvterm.terminal").toggle "horizontal"
end,
"toggle horizontal term",
},
["<A-v>"] = {
function()
require("nvterm.terminal").toggle "vertical"
end,
"toggle vertical term",
},
-- new
["<leader>h"] = {
function()
require("nvterm.terminal").new "horizontal"
end,
"new horizontal term",
},
["<leader>v"] = {
function()
require("nvterm.terminal").new "vertical"
end,
"new vertical term",
},
},
}
M.whichkey = {
plugin = true,
n = {
["<leader>wK"] = {
function()
vim.cmd "WhichKey"
end,
"which-key all keymaps",
},
["<leader>wk"] = {
function()
local input = vim.fn.input "WhichKey: "
vim.cmd("WhichKey " .. input)
end,
"which-key query lookup",
},
},
}
M.blankline = {
plugin = true,
n = {
["<leader>cc"] = {
function()
local ok, start = require("indent_blankline.utils").get_current_context(
vim.g.indent_blankline_context_patterns,
vim.g.indent_blankline_use_treesitter_scope
)
if ok then
vim.api.nvim_win_set_cursor(vim.api.nvim_get_current_win(), { start, 0 })
vim.cmd [[normal! _]]
end
end,
"Jump to current_context",
},
},
}
return M

View file

@ -1,110 +0,0 @@
local present, alpha = pcall(require, "alpha")
if not present then
return
end
require("base46").load_highlight "alpha"
local function button(sc, txt, keybind)
local sc_ = sc:gsub("%s", ""):gsub("SPC", "<leader>")
local opts = {
position = "center",
text = txt,
shortcut = sc,
cursor = 5,
width = 36,
align_shortcut = "right",
hl = "AlphaButtons",
}
if keybind then
opts.keymap = { "n", sc_, keybind, { noremap = true, silent = true } }
end
return {
type = "button",
val = txt,
on_press = function()
local key = vim.api.nvim_replace_termcodes(sc_, true, false, true) or ""
vim.api.nvim_feedkeys(key, "normal", false)
end,
opts = opts,
}
end
-- dynamic header padding
local fn = vim.fn
local marginTopPercent = 0.3
local headerPadding = fn.max { 2, fn.floor(fn.winheight(0) * marginTopPercent) }
local options = {
header = {
type = "text",
val = {
" ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ",
" ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ",
" ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ",
" ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ",
" ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ",
" ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ",
" ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ",
" ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ",
" ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ",
" ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ",
" ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ",
},
opts = {
position = "center",
hl = "AlphaHeader",
},
},
buttons = {
type = "group",
val = {
button("SPC f f", " Find File ", ":Telescope find_files<CR>"),
button("SPC f o", " Recent File ", ":Telescope oldfiles<CR>"),
button("SPC f w", " Find Word ", ":Telescope live_grep<CR>"),
button("SPC b m", " Bookmarks ", ":Telescope marks<CR>"),
button("SPC t h", " Themes ", ":Telescope themes<CR>"),
button("SPC e s", " Settings", ":e $MYVIMRC | :cd %:p:h <CR>"),
},
opts = {
spacing = 1,
},
},
headerPaddingTop = { type = "padding", val = headerPadding },
headerPaddingBottom = { type = "padding", val = 2 },
}
options = require("core.utils").load_override(options, "goolord/alpha-nvim")
alpha.setup {
layout = {
options.headerPaddingTop,
options.header,
options.headerPaddingBottom,
options.buttons,
},
opts = {},
}
-- Disable statusline in dashboard
vim.api.nvim_create_autocmd("FileType", {
pattern = "alpha",
callback = function()
-- store current statusline value and use that
local old_laststatus = vim.opt.laststatus
vim.api.nvim_create_autocmd("BufUnload", {
buffer = 0,
callback = function()
vim.opt.laststatus = old_laststatus
end,
})
vim.opt.laststatus = 0
end,
})

View file

@ -1,103 +0,0 @@
local present, cmp = pcall(require, "cmp")
if not present then
return
end
require("base46").load_highlight "cmp"
vim.opt.completeopt = "menuone,noselect"
local function border(hl_name)
return {
{ "", hl_name },
{ "", hl_name },
{ "", hl_name },
{ "", hl_name },
{ "", hl_name },
{ "", hl_name },
{ "", hl_name },
{ "", hl_name },
}
end
local cmp_window = require "cmp.utils.window"
cmp_window.info_ = cmp_window.info
cmp_window.info = function(self)
local info = self:info_()
info.scrollable = false
return info
end
local options = {
window = {
completion = {
border = border "CmpBorder",
winhighlight = "Normal:CmpPmenu,CursorLine:PmenuSel,Search:None",
},
documentation = {
border = border "CmpDocBorder",
},
},
snippet = {
expand = function(args)
require("luasnip").lsp_expand(args.body)
end,
},
formatting = {
format = function(_, vim_item)
local icons = require("nvchad_ui.icons").lspkind
vim_item.kind = string.format("%s %s", icons[vim_item.kind], vim_item.kind)
return vim_item
end,
},
mapping = {
["<C-p>"] = cmp.mapping.select_prev_item(),
["<C-n>"] = cmp.mapping.select_next_item(),
["<C-d>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.close(),
["<CR>"] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select = false,
},
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif require("luasnip").expand_or_jumpable() then
vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-expand-or-jump", true, true, true), "")
else
fallback()
end
end, {
"i",
"s",
}),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif require("luasnip").jumpable(-1) then
vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-jump-prev", true, true, true), "")
else
fallback()
end
end, {
"i",
"s",
}),
},
sources = {
{ name = "luasnip" },
{ name = "nvim_lsp" },
{ name = "buffer" },
{ name = "nvim_lua" },
{ name = "path" },
},
}
-- check for any override
options = require("core.utils").load_override(options, "hrsh7th/nvim-cmp")
cmp.setup(options)

View file

@ -1,74 +0,0 @@
local present, lspconfig = pcall(require, "lspconfig")
if not present then
return
end
require("base46").load_highlight "lsp"
require "nvchad_ui.lsp"
local M = {}
local utils = require "core.utils"
-- export on_attach & capabilities for custom lspconfigs
M.on_attach = function(client, bufnr)
if vim.g.vim_version > 7 then
-- nightly
client.server_capabilities.documentFormattingProvider = false
client.server_capabilities.documentRangeFormattingProvider = false
else
-- stable
client.resolved_capabilities.document_formatting = false
client.resolved_capabilities.document_range_formatting = false
end
utils.load_mappings("lspconfig", { buffer = bufnr })
if client.server_capabilities.signatureHelpProvider then
require("nvchad_ui.signature").setup(client)
end
end
M.capabilities = vim.lsp.protocol.make_client_capabilities()
M.capabilities.textDocument.completion.completionItem = {
documentationFormat = { "markdown", "plaintext" },
snippetSupport = true,
preselectSupport = true,
insertReplaceSupport = true,
labelDetailsSupport = true,
deprecatedSupport = true,
commitCharactersSupport = true,
tagSupport = { valueSet = { 1 } },
resolveSupport = {
properties = {
"documentation",
"detail",
"additionalTextEdits",
},
},
}
lspconfig.sumneko_lua.setup {
on_attach = M.on_attach,
capabilities = M.capabilities,
settings = {
Lua = {
diagnostics = {
globals = { "vim" },
},
workspace = {
library = {
[vim.fn.expand "$VIMRUNTIME/lua"] = true,
[vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true,
},
maxPreload = 100000,
preloadFileSize = 10000,
},
},
},
}
return M

View file

@ -1,47 +0,0 @@
local present, mason = pcall(require, "mason")
if not present then
return
end
vim.api.nvim_create_augroup("_mason", { clear = true })
vim.api.nvim_create_autocmd("Filetype", {
pattern = "mason",
callback = function()
require("base46").load_highlight "mason"
end,
group = "_mason",
})
local options = {
ensure_installed = { "lua-language-server" }, -- not an option from mason.nvim
ui = {
icons = {
package_pending = "",
package_installed = "",
package_uninstalled = "",
},
keymaps = {
toggle_server_expand = "<CR>",
install_server = "i",
update_server = "u",
check_server_version = "c",
update_all_servers = "U",
check_outdated_servers = "C",
uninstall_server = "X",
cancel_installation = "<C-c>",
},
},
max_concurrent_installers = 10,
}
options = require("core.utils").load_override(options, "williamboman/mason.nvim")
vim.api.nvim_create_user_command("MasonInstallAll", function()
vim.cmd("MasonInstall " .. table.concat(options.ensure_installed, " "))
end, {})
mason.setup(options)

View file

@ -1,90 +0,0 @@
local present, nvimtree = pcall(require, "nvim-tree")
if not present then
return
end
require("base46").load_highlight "nvimtree"
local options = {
filters = {
dotfiles = false,
exclude = { vim.fn.stdpath "config" .. "/lua/custom" },
},
disable_netrw = true,
hijack_netrw = true,
open_on_setup = false,
ignore_ft_on_setup = { "alpha" },
hijack_cursor = true,
hijack_unnamed_buffer_when_opening = false,
update_cwd = true,
update_focused_file = {
enable = true,
update_cwd = false,
},
view = {
adaptive_size = true,
side = "left",
width = 25,
hide_root_folder = true,
},
git = {
enable = false,
ignore = true,
},
filesystem_watchers = {
enable = true,
},
actions = {
open_file = {
resize_window = true,
},
},
renderer = {
highlight_git = false,
highlight_opened_files = "none",
indent_markers = {
enable = false,
},
icons = {
show = {
file = true,
folder = true,
folder_arrow = true,
git = false,
},
glyphs = {
default = "",
symlink = "",
folder = {
default = "",
empty = "",
empty_open = "",
open = "",
symlink = "",
symlink_open = "",
arrow_open = "",
arrow_closed = "",
},
git = {
unstaged = "",
staged = "",
unmerged = "",
renamed = "",
untracked = "",
deleted = "",
ignored = "",
},
},
},
},
}
-- check for any override
options = require("core.utils").load_override(options, "kyazdani42/nvim-tree.lua")
vim.g.nvimtree_side = options.view.side
nvimtree.setup(options)

View file

@ -1,34 +0,0 @@
local present, nvterm = pcall(require, "nvterm")
if not present then
return
end
require "base46.term"
local options = {
terminals = {
list = {},
type_opts = {
float = {
relative = "editor",
row = 0.3,
col = 0.25,
width = 0.5,
height = 0.4,
border = "single",
},
horizontal = { location = "rightbelow", split_ratio = 0.3 },
vertical = { location = "rightbelow", split_ratio = 0.5 },
},
},
behavior = {
close_on_exit = true,
auto_insert = true,
},
enable_new_mappings = true,
}
options = require("core.utils").load_override(options, "NvChad/nvterm")
nvterm.setup(options)

View file

@ -1,183 +0,0 @@
local M = {}
local load_override = require("core.utils").load_override
M.autopairs = function()
local present1, autopairs = pcall(require, "nvim-autopairs")
local present2, cmp = pcall(require, "cmp")
if not (present1 and present2) then
return
end
local options = {
fast_wrap = {},
disable_filetype = { "TelescopePrompt", "vim" },
}
options = load_override(options, "windwp/nvim-autopairs")
autopairs.setup(options)
local cmp_autopairs = require "nvim-autopairs.completion.cmp"
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
end
M.blankline = function()
local present, blankline = pcall(require, "indent_blankline")
if not present then
return
end
require("base46").load_highlight "blankline"
local options = {
indentLine_enabled = 1,
filetype_exclude = {
"help",
"terminal",
"alpha",
"packer",
"lspinfo",
"TelescopePrompt",
"TelescopeResults",
"mason",
"",
},
buftype_exclude = { "terminal" },
show_trailing_blankline_indent = false,
show_first_indent_level = false,
show_current_context = true,
show_current_context_start = true,
}
options = load_override(options, "lukas-reineke/indent-blankline.nvim")
blankline.setup(options)
end
M.colorizer = function()
local present, colorizer = pcall(require, "colorizer")
if not present then
return
end
local options = {
filetypes = {
"*",
},
user_default_options = {
RGB = true, -- #RGB hex codes
RRGGBB = true, -- #RRGGBB hex codes
names = false, -- "Name" codes like Blue
RRGGBBAA = false, -- #RRGGBBAA hex codes
rgb_fn = false, -- CSS rgb() and rgba() functions
hsl_fn = false, -- CSS hsl() and hsla() functions
css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn
mode = "background", -- Set the display mode.
},
}
options = load_override(options, "NvChad/nvim-colorizer.lua")
colorizer.setup(options)
-- execute colorizer as soon as possible
return vim.tbl_isempty(options.filetypes or {}) or vim.cmd [[do FileType]]
end
M.comment = function()
local present, nvim_comment = pcall(require, "Comment")
if not present then
return
end
local options = {}
options = load_override(options, "numToStr/Comment.nvim")
nvim_comment.setup(options)
end
M.luasnip = function()
local present, luasnip = pcall(require, "luasnip")
if not present then
return
end
local options = {
history = true,
updateevents = "TextChanged,TextChangedI",
}
options = load_override(options, "L3MON4D3/LuaSnip")
luasnip.config.set_config(options)
require("luasnip.loaders.from_vscode").lazy_load()
require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.luasnippets_path or "" }
vim.api.nvim_create_autocmd("InsertLeave", {
callback = function()
if
require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()]
and not require("luasnip").session.jump_active
then
require("luasnip").unlink_current()
end
end,
})
end
M.gitsigns = function()
local present, gitsigns = pcall(require, "gitsigns")
if not present then
return
end
require("base46").load_highlight "git"
local options = {
signs = {
add = { hl = "DiffAdd", text = "", numhl = "GitSignsAddNr" },
change = { hl = "DiffChange", text = "", numhl = "GitSignsChangeNr" },
delete = { hl = "DiffDelete", text = "", numhl = "GitSignsDeleteNr" },
topdelete = { hl = "DiffDelete", text = "", numhl = "GitSignsDeleteNr" },
changedelete = { hl = "DiffChangeDelete", text = "~", numhl = "GitSignsChangeNr" },
},
}
options = load_override(options, "lewis6991/gitsigns.nvim")
gitsigns.setup(options)
end
M.devicons = function()
local present, devicons = pcall(require, "nvim-web-devicons")
if present then
require("base46").load_highlight "devicons"
local options = { override = require("nvchad_ui.icons").devicons }
options = require("core.utils").load_override(options, "kyazdani42/nvim-web-devicons")
devicons.setup(options)
end
end
M.packer_init = function()
return {
auto_clean = true,
compile_on_sync = true,
git = { clone_timeout = 6000 },
display = {
working_sym = "",
error_sym = "",
done_sym = "",
removed_sym = "",
moved_sym = "",
open_fn = function()
return require("packer.util").float { border = "single" }
end,
},
}
end
return M

View file

@ -1,73 +0,0 @@
local present, telescope = pcall(require, "telescope")
if not present then
return
end
vim.g.theme_switcher_loaded = true
require("base46").load_highlight "telescope"
local options = {
defaults = {
vimgrep_arguments = {
"rg",
"--color=never",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
"--smart-case",
},
prompt_prefix = "",
selection_caret = " ",
entry_prefix = " ",
initial_mode = "insert",
selection_strategy = "reset",
sorting_strategy = "ascending",
layout_strategy = "horizontal",
layout_config = {
horizontal = {
prompt_position = "top",
preview_width = 0.55,
results_width = 0.8,
},
vertical = {
mirror = false,
},
width = 0.87,
height = 0.80,
preview_cutoff = 120,
},
file_sorter = require("telescope.sorters").get_fuzzy_file,
file_ignore_patterns = { "node_modules" },
generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter,
path_display = { "truncate" },
winblend = 0,
border = {},
borderchars = { "", "", "", "", "", "", "", "" },
color_devicons = true,
set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil,
file_previewer = require("telescope.previewers").vim_buffer_cat.new,
grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new,
qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new,
-- Developer configurations: Not meant for general override
buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker,
mappings = {
n = { ["q"] = require("telescope.actions").close },
},
},
extensions_list = { "themes", "terms" },
}
-- check for any override
options = require("core.utils").load_override(options, "nvim-telescope/telescope.nvim")
telescope.setup(options)
-- load extensions
pcall(function()
for _, ext in ipairs(options.extensions_list) do
telescope.load_extension(ext)
end
end)

View file

@ -1,27 +0,0 @@
local present, treesitter = pcall(require, "nvim-treesitter.configs")
if not present then
return
end
require("base46").load_highlight "treesitter"
local options = {
ensure_installed = {
"lua",
},
highlight = {
enable = true,
use_languagetree = true,
},
indent = {
enable = true,
},
}
-- check for any override
options = require("core.utils").load_override(options, "nvim-treesitter/nvim-treesitter")
treesitter.setup(options)

View file

@ -1,41 +0,0 @@
local present, wk = pcall(require, "which-key")
if not present then
return
end
require("base46").load_highlight "whichkey"
local options = {
icons = {
breadcrumb = "»", -- symbol used in the command line area that shows your active key combo
separator = "", -- symbol used between a key and it's label
group = "+", -- symbol prepended to a group
},
popup_mappings = {
scroll_down = "<c-d>", -- binding to scroll down inside the popup
scroll_up = "<c-u>", -- binding to scroll up inside the popup
},
window = {
border = "none", -- none/single/double/shadow
},
layout = {
spacing = 6, -- spacing between columns
},
hidden = { "<silent>", "<cmd>", "<Cmd>", "<CR>", "call", "lua", "^:", "^ " },
triggers_blacklist = {
-- list of mode / prefixes that should never be hooked by WhichKey
i = { "j", "k" },
v = { "j", "k" },
},
}
options = require("core.utils").load_override(options, "folke/which-key.nvim")
wk.setup(options)

View file

@ -1,225 +0,0 @@
local plugins = {
["nvim-lua/plenary.nvim"] = { module = "plenary" },
["lewis6991/impatient.nvim"] = {},
["wbthomason/packer.nvim"] = {
cmd = require("core.lazy_load").packer_cmds,
config = function()
require "plugins"
end,
},
["NvChad/extensions"] = { module = { "telescope", "nvchad" } },
["NvChad/base46"] = {
config = function()
local ok, base46 = pcall(require, "base46")
if ok then
base46.load_theme()
end
end,
},
["NvChad/ui"] = {
after = "base46",
config = function()
local present, nvchad_ui = pcall(require, "nvchad_ui")
if present then
nvchad_ui.setup()
end
end,
},
["NvChad/nvterm"] = {
module = "nvterm",
config = function()
require "plugins.configs.nvterm"
end,
setup = function()
require("core.utils").load_mappings "nvterm"
end,
},
["kyazdani42/nvim-web-devicons"] = {
after = "ui",
module = "nvim-web-devicons",
config = function()
require("plugins.configs.others").devicons()
end,
},
["lukas-reineke/indent-blankline.nvim"] = {
opt = true,
setup = function()
require("core.lazy_load").on_file_open "indent-blankline.nvim"
require("core.utils").load_mappings "blankline"
end,
config = function()
require("plugins.configs.others").blankline()
end,
},
["NvChad/nvim-colorizer.lua"] = {
opt = true,
setup = function()
require("core.lazy_load").on_file_open "nvim-colorizer.lua"
end,
config = function()
require("plugins.configs.others").colorizer()
end,
},
["nvim-treesitter/nvim-treesitter"] = {
module = "nvim-treesitter",
setup = function()
require("core.lazy_load").on_file_open "nvim-treesitter"
end,
cmd = require("core.lazy_load").treesitter_cmds,
run = ":TSUpdate",
config = function()
require "plugins.configs.treesitter"
end,
},
-- git stuff
["lewis6991/gitsigns.nvim"] = {
ft = "gitcommit",
setup = function()
require("core.lazy_load").gitsigns()
end,
config = function()
require("plugins.configs.others").gitsigns()
end,
},
-- lsp stuff
["williamboman/mason.nvim"] = {
cmd = require("core.lazy_load").mason_cmds,
config = function()
require "plugins.configs.mason"
end,
},
["neovim/nvim-lspconfig"] = {
opt = true,
setup = function()
require("core.lazy_load").on_file_open "nvim-lspconfig"
end,
config = function()
require "plugins.configs.lspconfig"
end,
},
-- load luasnips + cmp related in insert mode only
["rafamadriz/friendly-snippets"] = {
module = { "cmp", "cmp_nvim_lsp" },
event = "InsertEnter",
},
["hrsh7th/nvim-cmp"] = {
after = "friendly-snippets",
config = function()
require "plugins.configs.cmp"
end,
},
["L3MON4D3/LuaSnip"] = {
wants = "friendly-snippets",
after = "nvim-cmp",
config = function()
require("plugins.configs.others").luasnip()
end,
},
["saadparwaiz1/cmp_luasnip"] = { after = "LuaSnip" },
["hrsh7th/cmp-nvim-lua"] = { after = "cmp_luasnip" },
["hrsh7th/cmp-nvim-lsp"] = { after = "cmp-nvim-lua" },
["hrsh7th/cmp-buffer"] = { after = "cmp-nvim-lsp" },
["hrsh7th/cmp-path"] = { after = "cmp-buffer" },
-- misc plugins
["windwp/nvim-autopairs"] = {
after = "nvim-cmp",
config = function()
require("plugins.configs.others").autopairs()
end,
},
["goolord/alpha-nvim"] = {
after = "base46",
disable = true,
config = function()
require "plugins.configs.alpha"
end,
},
["numToStr/Comment.nvim"] = {
module = "Comment",
keys = { "gc", "gb" },
config = function()
require("plugins.configs.others").comment()
end,
setup = function()
require("core.utils").load_mappings "comment"
end,
},
-- file managing , picker etc
["kyazdani42/nvim-tree.lua"] = {
ft = "alpha",
cmd = { "NvimTreeToggle", "NvimTreeFocus" },
config = function()
require "plugins.configs.nvimtree"
end,
setup = function()
require("core.utils").load_mappings "nvimtree"
end,
},
["nvim-telescope/telescope.nvim"] = {
cmd = "Telescope",
config = function()
require "plugins.configs.telescope"
end,
setup = function()
require("core.utils").load_mappings "telescope"
end,
},
-- Only load whichkey after all the gui
["folke/which-key.nvim"] = {
disable = true,
module = "which-key",
keys = "<leader>",
config = function()
require "plugins.configs.whichkey"
end,
setup = function()
require("core.utils").load_mappings "whichkey"
end,
},
}
-- Load all plugins
local present, packer = pcall(require, "packer")
if present then
vim.cmd "packadd packer.nvim"
-- Override with default plugins with user ones
plugins = require("core.utils").merge_plugins(plugins)
-- load packer init options
local init_options = require("plugins.configs.others").packer_init()
init_options = require("core.utils").load_override(init_options, "wbthomason/packer.nvim")
packer.init(init_options)
for _, v in pairs(plugins) do
packer.use(v)
end
end

View file

@ -1,458 +0,0 @@
-- Automatically generated packer.nvim plugin loader code
if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then
vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"')
return
end
vim.api.nvim_command('packadd packer.nvim')
local no_errors, error_msg = pcall(function()
_G._packer = _G._packer or {}
_G._packer.inside_compile = true
local time
local profile_info
local should_profile = false
if should_profile then
local hrtime = vim.loop.hrtime
profile_info = {}
time = function(chunk, start)
if start then
profile_info[chunk] = hrtime()
else
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
end
end
else
time = function(chunk, start) end
end
local function save_profiles(threshold)
local sorted_times = {}
for chunk_name, time_taken in pairs(profile_info) do
sorted_times[#sorted_times + 1] = {chunk_name, time_taken}
end
table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
local results = {}
for i, elem in ipairs(sorted_times) do
if not threshold or threshold and elem[2] > threshold then
results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
end
end
if threshold then
table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)')
end
_G._packer.profile_output = results
end
time([[Luarocks path setup]], true)
local package_path_str = "/home/drk/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/drk/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/drk/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/drk/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
local install_cpath_pattern = "/home/drk/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so"
if not string.find(package.path, package_path_str, 1, true) then
package.path = package.path .. ';' .. package_path_str
end
if not string.find(package.cpath, install_cpath_pattern, 1, true) then
package.cpath = package.cpath .. ';' .. install_cpath_pattern
end
time([[Luarocks path setup]], false)
time([[try_loadstring definition]], true)
local function try_loadstring(s, component, name)
local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
if not success then
vim.schedule(function()
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
end)
end
return result
end
time([[try_loadstring definition]], false)
time([[Defining packer_plugins]], true)
_G.packer_plugins = {
["Comment.nvim"] = {
config = { "\27LJ\2\2F\0\0\2\0\3\0\0066\0\0\0'\1\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\fcomment\27plugins.configs.others\frequire\0" },
keys = { { "", "gc" }, { "", "gb" } },
loaded = false,
needs_bufread = false,
only_cond = false,
path = "/home/drk/.local/share/nvim/site/pack/packer/opt/Comment.nvim",
url = "https://github.com/numToStr/Comment.nvim"
},
LuaSnip = {
after = { "cmp_luasnip" },
config = { "\27LJ\2\2F\0\0\2\0\3\0\0066\0\0\0'\1\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\fluasnip\27plugins.configs.others\frequire\0" },
load_after = {
["nvim-cmp"] = true
},
loaded = false,
needs_bufread = true,
path = "/home/drk/.local/share/nvim/site/pack/packer/opt/LuaSnip",
url = "https://github.com/L3MON4D3/LuaSnip",
wants = { "friendly-snippets" }
},
base46 = {
after = { "ui" },
config = { "\27LJ\2\2K\0\0\3\0\4\0\t6\0\0\0006\1\1\0'\2\2\0B\0\3\3\15\0\0\0X\2\2€9\2\3\1B\2\1\1K\0\1\0\15load_theme\vbase46\frequire\npcall\0" },
loaded = true,
only_config = true,
path = "/home/drk/.local/share/nvim/site/pack/packer/start/base46",
url = "https://github.com/NvChad/base46"
},
["cmp-buffer"] = {
after = { "cmp-path" },
after_files = { "/home/drk/.local/share/nvim/site/pack/packer/opt/cmp-buffer/after/plugin/cmp_buffer.lua" },
load_after = {
["cmp-nvim-lsp"] = true
},
loaded = false,
needs_bufread = false,
path = "/home/drk/.local/share/nvim/site/pack/packer/opt/cmp-buffer",
url = "https://github.com/hrsh7th/cmp-buffer"
},
["cmp-nvim-lsp"] = {
after = { "cmp-buffer" },
after_files = { "/home/drk/.local/share/nvim/site/pack/packer/opt/cmp-nvim-lsp/after/plugin/cmp_nvim_lsp.lua" },
load_after = {
["cmp-nvim-lua"] = true
},
loaded = false,
needs_bufread = false,
path = "/home/drk/.local/share/nvim/site/pack/packer/opt/cmp-nvim-lsp",
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
},
["cmp-nvim-lua"] = {
after = { "cmp-nvim-lsp" },
after_files = { "/home/drk/.local/share/nvim/site/pack/packer/opt/cmp-nvim-lua/after/plugin/cmp_nvim_lua.lua" },
load_after = {
cmp_luasnip = true
},
loaded = false,
needs_bufread = false,
path = "/home/drk/.local/share/nvim/site/pack/packer/opt/cmp-nvim-lua",
url = "https://github.com/hrsh7th/cmp-nvim-lua"
},
["cmp-path"] = {
after_files = { "/home/drk/.local/share/nvim/site/pack/packer/opt/cmp-path/after/plugin/cmp_path.lua" },
load_after = {
["cmp-buffer"] = true
},
loaded = false,
needs_bufread = false,
path = "/home/drk/.local/share/nvim/site/pack/packer/opt/cmp-path",
url = "https://github.com/hrsh7th/cmp-path"
},
cmp_luasnip = {
after = { "cmp-nvim-lua" },
after_files = { "/home/drk/.local/share/nvim/site/pack/packer/opt/cmp_luasnip/after/plugin/cmp_luasnip.lua" },
load_after = {
LuaSnip = true
},
loaded = false,
needs_bufread = false,
path = "/home/drk/.local/share/nvim/site/pack/packer/opt/cmp_luasnip",
url = "https://github.com/saadparwaiz1/cmp_luasnip"
},
extensions = {
loaded = false,
needs_bufread = false,
only_cond = false,
path = "/home/drk/.local/share/nvim/site/pack/packer/opt/extensions",
url = "https://github.com/NvChad/extensions"
},
["friendly-snippets"] = {
after = { "nvim-cmp" },
loaded = false,
needs_bufread = false,
only_cond = false,
path = "/home/drk/.local/share/nvim/site/pack/packer/opt/friendly-snippets",
url = "https://github.com/rafamadriz/friendly-snippets"
},
["gitsigns.nvim"] = {
config = { "\27LJ\2\2G\0\0\2\0\3\0\0066\0\0\0'\1\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\rgitsigns\27plugins.configs.others\frequire\0" },
loaded = false,
needs_bufread = false,
only_cond = false,
path = "/home/drk/.local/share/nvim/site/pack/packer/opt/gitsigns.nvim",
url = "https://github.com/lewis6991/gitsigns.nvim"
},
["impatient.nvim"] = {
loaded = true,
path = "/home/drk/.local/share/nvim/site/pack/packer/start/impatient.nvim",
url = "https://github.com/lewis6991/impatient.nvim"
},
["indent-blankline.nvim"] = {
config = { "\27LJ\2\2H\0\0\2\0\3\0\0066\0\0\0'\1\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\14blankline\27plugins.configs.others\frequire\0" },
loaded = false,
needs_bufread = false,
path = "/home/drk/.local/share/nvim/site/pack/packer/opt/indent-blankline.nvim",
url = "https://github.com/lukas-reineke/indent-blankline.nvim"
},
["mason.nvim"] = {
commands = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUninstall", "MasonUninstallAll", "MasonLog" },
config = { "\27LJ\2\0025\0\0\2\0\2\0\0046\0\0\0'\1\1\0B\0\2\1K\0\1\0\26plugins.configs.mason\frequire\0" },
loaded = false,
needs_bufread = false,
only_cond = false,
path = "/home/drk/.local/share/nvim/site/pack/packer/opt/mason.nvim",
url = "https://github.com/williamboman/mason.nvim"
},
["nvim-autopairs"] = {
config = { "\27LJ\2\2H\0\0\2\0\3\0\0066\0\0\0'\1\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\14autopairs\27plugins.configs.others\frequire\0" },
load_after = {
["nvim-cmp"] = true
},
loaded = false,
needs_bufread = false,
path = "/home/drk/.local/share/nvim/site/pack/packer/opt/nvim-autopairs",
url = "https://github.com/windwp/nvim-autopairs"
},
["nvim-cmp"] = {
after = { "nvim-autopairs", "LuaSnip" },
config = { "\27LJ\2\0023\0\0\2\0\2\0\0046\0\0\0'\1\1\0B\0\2\1K\0\1\0\24plugins.configs.cmp\frequire\0" },
load_after = {
["friendly-snippets"] = true
},
loaded = false,
needs_bufread = false,
path = "/home/drk/.local/share/nvim/site/pack/packer/opt/nvim-cmp",
url = "https://github.com/hrsh7th/nvim-cmp"
},
["nvim-colorizer.lua"] = {
config = { "\27LJ\2\2H\0\0\2\0\3\0\0066\0\0\0'\1\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\14colorizer\27plugins.configs.others\frequire\0" },
loaded = false,
needs_bufread = false,
path = "/home/drk/.local/share/nvim/site/pack/packer/opt/nvim-colorizer.lua",
url = "https://github.com/NvChad/nvim-colorizer.lua"
},
["nvim-lspconfig"] = {
config = { "\27LJ\2\0029\0\0\2\0\2\0\0046\0\0\0'\1\1\0B\0\2\1K\0\1\0\30plugins.configs.lspconfig\frequire\0" },
loaded = false,
needs_bufread = false,
path = "/home/drk/.local/share/nvim/site/pack/packer/opt/nvim-lspconfig",
url = "https://github.com/neovim/nvim-lspconfig"
},
["nvim-tree.lua"] = {
commands = { "NvimTreeToggle", "NvimTreeFocus" },
config = { "\27LJ\2\0028\0\0\2\0\2\0\0046\0\0\0'\1\1\0B\0\2\1K\0\1\0\29plugins.configs.nvimtree\frequire\0" },
loaded = false,
needs_bufread = false,
only_cond = false,
path = "/home/drk/.local/share/nvim/site/pack/packer/opt/nvim-tree.lua",
url = "https://github.com/kyazdani42/nvim-tree.lua"
},
["nvim-treesitter"] = {
commands = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSEnable", "TSDisable", "TSModuleInfo" },
config = { "\27LJ\2\2:\0\0\2\0\2\0\0046\0\0\0'\1\1\0B\0\2\1K\0\1\0\31plugins.configs.treesitter\frequire\0" },
loaded = false,
needs_bufread = false,
only_cond = false,
path = "/home/drk/.local/share/nvim/site/pack/packer/opt/nvim-treesitter",
url = "https://github.com/nvim-treesitter/nvim-treesitter"
},
["nvim-web-devicons"] = {
config = { "\27LJ\2\2G\0\0\2\0\3\0\0066\0\0\0'\1\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\rdevicons\27plugins.configs.others\frequire\0" },
load_after = {},
loaded = false,
needs_bufread = false,
only_cond = false,
path = "/home/drk/.local/share/nvim/site/pack/packer/opt/nvim-web-devicons",
url = "https://github.com/kyazdani42/nvim-web-devicons"
},
nvterm = {
config = { "\27LJ\2\0026\0\0\2\0\2\0\0046\0\0\0'\1\1\0B\0\2\1K\0\1\0\27plugins.configs.nvterm\frequire\0" },
loaded = false,
needs_bufread = false,
only_cond = false,
path = "/home/drk/.local/share/nvim/site/pack/packer/opt/nvterm",
url = "https://github.com/NvChad/nvterm"
},
["packer.nvim"] = {
commands = { "PackerSnapshot", "PackerSnapshotRollback", "PackerSnapshotDelete", "PackerInstall", "PackerUpdate", "PackerSync", "PackerClean", "PackerCompile", "PackerStatus", "PackerProfile", "PackerLoad" },
config = { "\27LJ\2\2'\0\0\2\0\2\0\0046\0\0\0'\1\1\0B\0\2\1K\0\1\0\fplugins\frequire\0" },
loaded = false,
needs_bufread = false,
only_cond = false,
path = "/home/drk/.local/share/nvim/site/pack/packer/opt/packer.nvim",
url = "https://github.com/wbthomason/packer.nvim"
},
["plenary.nvim"] = {
loaded = false,
needs_bufread = false,
only_cond = false,
path = "/home/drk/.local/share/nvim/site/pack/packer/opt/plenary.nvim",
url = "https://github.com/nvim-lua/plenary.nvim"
},
["telescope.nvim"] = {
commands = { "Telescope" },
config = { "\27LJ\2\0029\0\0\2\0\2\0\0046\0\0\0'\1\1\0B\0\2\1K\0\1\0\30plugins.configs.telescope\frequire\0" },
loaded = false,
needs_bufread = true,
only_cond = false,
path = "/home/drk/.local/share/nvim/site/pack/packer/opt/telescope.nvim",
url = "https://github.com/nvim-telescope/telescope.nvim"
},
ui = {
after = { "nvim-web-devicons" },
config = { "\27LJ\2\2I\0\0\3\0\4\0\t6\0\0\0006\1\1\0'\2\2\0B\0\3\3\15\0\0\0X\2\2€9\2\3\1B\2\1\1K\0\1\0\nsetup\14nvchad_ui\frequire\npcall\0" },
load_after = {},
loaded = true,
needs_bufread = false,
path = "/home/drk/.local/share/nvim/site/pack/packer/opt/ui",
url = "https://github.com/NvChad/ui"
}
}
time([[Defining packer_plugins]], false)
local module_lazy_loads = {
["^Comment"] = "Comment.nvim",
["^cmp"] = "friendly-snippets",
["^cmp_nvim_lsp"] = "friendly-snippets",
["^nvchad"] = "extensions",
["^nvim%-treesitter"] = "nvim-treesitter",
["^nvim%-web%-devicons"] = "nvim-web-devicons",
["^nvterm"] = "nvterm",
["^plenary"] = "plenary.nvim",
["^telescope"] = "extensions"
}
local lazy_load_called = {['packer.load'] = true}
local function lazy_load_module(module_name)
local to_load = {}
if lazy_load_called[module_name] then return nil end
lazy_load_called[module_name] = true
for module_pat, plugin_name in pairs(module_lazy_loads) do
if not _G.packer_plugins[plugin_name].loaded and string.match(module_name, module_pat) then
to_load[#to_load + 1] = plugin_name
end
end
if #to_load > 0 then
require('packer.load')(to_load, {module = module_name}, _G.packer_plugins)
local loaded_mod = package.loaded[module_name]
if loaded_mod then
return function(modname) return loaded_mod end
end
end
end
if not vim.g.packer_custom_loader_enabled then
table.insert(package.loaders, 1, lazy_load_module)
vim.g.packer_custom_loader_enabled = true
end
-- Setup for: nvim-lspconfig
time([[Setup for nvim-lspconfig]], true)
try_loadstring("\27LJ\2\2V\0\0\2\0\4\0\a6\0\0\0'\1\1\0B\0\2\0029\0\2\0'\1\3\0B\0\2\1K\0\1\0\19nvim-lspconfig\17on_file_open\19core.lazy_load\frequire\0", "setup", "nvim-lspconfig")
time([[Setup for nvim-lspconfig]], false)
-- Setup for: nvterm
time([[Setup for nvterm]], true)
try_loadstring("\27LJ\2\2K\0\0\2\0\4\0\a6\0\0\0'\1\1\0B\0\2\0029\0\2\0'\1\3\0B\0\2\1K\0\1\0\vnvterm\18load_mappings\15core.utils\frequire\0", "setup", "nvterm")
time([[Setup for nvterm]], false)
-- Setup for: nvim-colorizer.lua
time([[Setup for nvim-colorizer.lua]], true)
try_loadstring("\27LJ\2\2Z\0\0\2\0\4\0\a6\0\0\0'\1\1\0B\0\2\0029\0\2\0'\1\3\0B\0\2\1K\0\1\0\23nvim-colorizer.lua\17on_file_open\19core.lazy_load\frequire\0", "setup", "nvim-colorizer.lua")
time([[Setup for nvim-colorizer.lua]], false)
-- Setup for: indent-blankline.nvim
time([[Setup for indent-blankline.nvim]], true)
try_loadstring("\27LJ\2\2˜\1\0\0\2\0\a\0\r6\0\0\0'\1\1\0B\0\2\0029\0\2\0'\1\3\0B\0\2\0016\0\0\0'\1\4\0B\0\2\0029\0\5\0'\1\6\0B\0\2\1K\0\1\0\14blankline\18load_mappings\15core.utils\26indent-blankline.nvim\17on_file_open\19core.lazy_load\frequire\0", "setup", "indent-blankline.nvim")
time([[Setup for indent-blankline.nvim]], false)
-- Setup for: gitsigns.nvim
time([[Setup for gitsigns.nvim]], true)
try_loadstring("\27LJ\2\2?\0\0\2\0\3\0\0066\0\0\0'\1\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\rgitsigns\19core.lazy_load\frequire\0", "setup", "gitsigns.nvim")
time([[Setup for gitsigns.nvim]], false)
-- Setup for: nvim-tree.lua
time([[Setup for nvim-tree.lua]], true)
try_loadstring("\27LJ\2\2M\0\0\2\0\4\0\a6\0\0\0'\1\1\0B\0\2\0029\0\2\0'\1\3\0B\0\2\1K\0\1\0\rnvimtree\18load_mappings\15core.utils\frequire\0", "setup", "nvim-tree.lua")
time([[Setup for nvim-tree.lua]], false)
-- Setup for: Comment.nvim
time([[Setup for Comment.nvim]], true)
try_loadstring("\27LJ\2\2L\0\0\2\0\4\0\a6\0\0\0'\1\1\0B\0\2\0029\0\2\0'\1\3\0B\0\2\1K\0\1\0\fcomment\18load_mappings\15core.utils\frequire\0", "setup", "Comment.nvim")
time([[Setup for Comment.nvim]], false)
-- Setup for: telescope.nvim
time([[Setup for telescope.nvim]], true)
try_loadstring("\27LJ\2\2N\0\0\2\0\4\0\a6\0\0\0'\1\1\0B\0\2\0029\0\2\0'\1\3\0B\0\2\1K\0\1\0\14telescope\18load_mappings\15core.utils\frequire\0", "setup", "telescope.nvim")
time([[Setup for telescope.nvim]], false)
-- Setup for: nvim-treesitter
time([[Setup for nvim-treesitter]], true)
try_loadstring("\27LJ\2\2W\0\0\2\0\4\0\a6\0\0\0'\1\1\0B\0\2\0029\0\2\0'\1\3\0B\0\2\1K\0\1\0\20nvim-treesitter\17on_file_open\19core.lazy_load\frequire\0", "setup", "nvim-treesitter")
time([[Setup for nvim-treesitter]], false)
-- Config for: base46
time([[Config for base46]], true)
try_loadstring("\27LJ\2\2K\0\0\3\0\4\0\t6\0\0\0006\1\1\0'\2\2\0B\0\3\3\15\0\0\0X\2\2€9\2\3\1B\2\1\1K\0\1\0\15load_theme\vbase46\frequire\npcall\0", "config", "base46")
time([[Config for base46]], false)
-- Load plugins in order defined by `after`
time([[Sequenced loading]], true)
vim.cmd [[ packadd ui ]]
-- Config for: ui
try_loadstring("\27LJ\2\2I\0\0\3\0\4\0\t6\0\0\0006\1\1\0'\2\2\0B\0\3\3\15\0\0\0X\2\2€9\2\3\1B\2\1\1K\0\1\0\nsetup\14nvchad_ui\frequire\npcall\0", "config", "ui")
time([[Sequenced loading]], false)
-- Command lazy-loads
time([[Defining lazy-load commands]], true)
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file PackerSnapshotRollback lua require("packer.load")({'packer.nvim'}, { cmd = "PackerSnapshotRollback", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file PackerCompile lua require("packer.load")({'packer.nvim'}, { cmd = "PackerCompile", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file Telescope lua require("packer.load")({'telescope.nvim'}, { cmd = "Telescope", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file TSBufEnable lua require("packer.load")({'nvim-treesitter'}, { cmd = "TSBufEnable", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file PackerStatus lua require("packer.load")({'packer.nvim'}, { cmd = "PackerStatus", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file PackerUpdate lua require("packer.load")({'packer.nvim'}, { cmd = "PackerUpdate", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file PackerInstall lua require("packer.load")({'packer.nvim'}, { cmd = "PackerInstall", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file TSBufDisable lua require("packer.load")({'nvim-treesitter'}, { cmd = "TSBufDisable", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file MasonInstall lua require("packer.load")({'mason.nvim'}, { cmd = "MasonInstall", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file NvimTreeFocus lua require("packer.load")({'nvim-tree.lua'}, { cmd = "NvimTreeFocus", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file TSDisable lua require("packer.load")({'nvim-treesitter'}, { cmd = "TSDisable", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file PackerProfile lua require("packer.load")({'packer.nvim'}, { cmd = "PackerProfile", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file TSModuleInfo lua require("packer.load")({'nvim-treesitter'}, { cmd = "TSModuleInfo", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file NvimTreeToggle lua require("packer.load")({'nvim-tree.lua'}, { cmd = "NvimTreeToggle", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file TSInstall lua require("packer.load")({'nvim-treesitter'}, { cmd = "TSInstall", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file TSEnable lua require("packer.load")({'nvim-treesitter'}, { cmd = "TSEnable", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file PackerLoad lua require("packer.load")({'packer.nvim'}, { cmd = "PackerLoad", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file MasonUninstall lua require("packer.load")({'mason.nvim'}, { cmd = "MasonUninstall", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file MasonUninstallAll lua require("packer.load")({'mason.nvim'}, { cmd = "MasonUninstallAll", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file PackerSync lua require("packer.load")({'packer.nvim'}, { cmd = "PackerSync", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file PackerSnapshotDelete lua require("packer.load")({'packer.nvim'}, { cmd = "PackerSnapshotDelete", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file PackerSnapshot lua require("packer.load")({'packer.nvim'}, { cmd = "PackerSnapshot", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file MasonInstallAll lua require("packer.load")({'mason.nvim'}, { cmd = "MasonInstallAll", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file Mason lua require("packer.load")({'mason.nvim'}, { cmd = "Mason", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file MasonLog lua require("packer.load")({'mason.nvim'}, { cmd = "MasonLog", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file PackerClean lua require("packer.load")({'packer.nvim'}, { cmd = "PackerClean", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
time([[Defining lazy-load commands]], false)
-- Keymap lazy-loads
time([[Defining lazy-load keymaps]], true)
vim.cmd [[noremap <silent> gb <cmd>lua require("packer.load")({'Comment.nvim'}, { keys = "gb", prefix = "" }, _G.packer_plugins)<cr>]]
vim.cmd [[noremap <silent> gc <cmd>lua require("packer.load")({'Comment.nvim'}, { keys = "gc", prefix = "" }, _G.packer_plugins)<cr>]]
time([[Defining lazy-load keymaps]], false)
vim.cmd [[augroup packer_load_aucmds]]
vim.cmd [[au!]]
-- Filetype lazy-loads
time([[Defining lazy-load filetype autocommands]], true)
vim.cmd [[au FileType gitcommit ++once lua require("packer.load")({'gitsigns.nvim'}, { ft = "gitcommit" }, _G.packer_plugins)]]
vim.cmd [[au FileType alpha ++once lua require("packer.load")({'nvim-tree.lua'}, { ft = "alpha" }, _G.packer_plugins)]]
time([[Defining lazy-load filetype autocommands]], false)
-- Event lazy-loads
time([[Defining lazy-load event autocommands]], true)
vim.cmd [[au InsertEnter * ++once lua require("packer.load")({'friendly-snippets'}, { event = "InsertEnter *" }, _G.packer_plugins)]]
time([[Defining lazy-load event autocommands]], false)
vim.cmd("augroup END")
_G._packer.inside_compile = false
if _G._packer.needs_bufread == true then
vim.cmd("doautocmd BufRead")
end
_G._packer.needs_bufread = false
if should_profile then save_profiles() end
end)
if not no_errors then
error_msg = error_msg:gsub('"', '\\"')
vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
end

View file

@ -6,11 +6,11 @@
## OPTIONS ##
option1=" Logout"
option2=" Reboot"
option2=" Reboot"
option3=" Power off"
option4="鈴 Suspend"
option5=" Lock"
option6=" Change power profile"
option5=" Lock"
option6=" Change power profile"
option7=" Cancel"
## OPTIONS ARRAY ##

View file

@ -14,7 +14,7 @@ option1=" Turn on WiFi"
option2=" Turn off WiFi"
option3="睊 Disconnect WiFi"
option4="直 Connect WiFi"
option5=" Setup captive portal"
option5=" Setup captive portal"
option6=" Cancel"
options="$option1\n$option2\n$option3\n$option4\n$option5\n$option6"

View file

@ -11,8 +11,8 @@ add_newline = false
disabled = true
[character]
error_symbol = "[](bold red) "
success_symbol = "[](bold green)"
error_symbol = "[](bold red) "
success_symbol = "[](bold green)"
[directory]
truncation_length = 5

View file

@ -0,0 +1 @@
left_ptr_watch

View file

@ -0,0 +1 @@
sb_v_double_arrow

View file

@ -0,0 +1 @@
sb_h_double_arrow

View file

@ -0,0 +1 @@
vertical-text

View file

@ -0,0 +1 @@
left_ptr_watch

View file

@ -0,0 +1 @@
bd_double_arrow

View file

@ -0,0 +1 @@
left_ptr_watch

View file

@ -0,0 +1 @@
fd_double_arrow

View file

@ -0,0 +1 @@
left_ptr_watch

View file

@ -0,0 +1 @@
x-cursor

View file

@ -0,0 +1 @@
link

View file

@ -0,0 +1 @@
right_ptr

View file

@ -0,0 +1 @@
sb_v_double_arrow

View file

@ -0,0 +1 @@
sb_v_double_arrow

View file

@ -0,0 +1 @@
bd_double_arrow

View file

@ -0,0 +1 @@
watch

View file

@ -0,0 +1 @@
cross

View file

@ -0,0 +1 @@
not-allowed

View file

@ -0,0 +1 @@
left_ptr

View file

@ -0,0 +1 @@
cross

Some files were not shown because too many files have changed in this diff Show more