diff --git a/.config/bottom/bottom.toml b/.config/bottom/bottom.toml index 6e4dbaa06..b58615cba 100644 --- a/.config/bottom/bottom.toml +++ b/.config/bottom/bottom.toml @@ -7,7 +7,6 @@ left_legend = true unnormalized_cpu = true enable_cache_memory = true group_processes = false -tree = true battery = true expanded_on_startup = true show_table_scroll_position = true diff --git a/.config/nvim/lua/config/keymaps.lua b/.config/nvim/lua/config/keymaps.lua index f3c9dbe0a..29cdb5a80 100644 --- a/.config/nvim/lua/config/keymaps.lua +++ b/.config/nvim/lua/config/keymaps.lua @@ -16,6 +16,7 @@ M.sections = { e = { desc = icons.FileTree .. " File Manager" }, } +-- TODO: Move these to LazyKeysSpec tables M.standard_maps = function() local maps = f.empty_map_table() -- Standard -- diff --git a/.config/nvim/lua/funcs.lua b/.config/nvim/lua/funcs.lua index c63d69cd2..b88dddec7 100644 --- a/.config/nvim/lua/funcs.lua +++ b/.config/nvim/lua/funcs.lua @@ -329,4 +329,7 @@ function M.get_lsp_key(key) end end +function M.lazy_file() +end + return M diff --git a/.config/nvim/lua/plugins/cmp/dap.lua b/.config/nvim/lua/plugins/cmp/dap.lua index 477e65222..1c4fabb0d 100644 --- a/.config/nvim/lua/plugins/cmp/dap.lua +++ b/.config/nvim/lua/plugins/cmp/dap.lua @@ -1,6 +1,9 @@ local M = { "rcarriga/cmp-dap" } +M.event = { "VeryLazy" } + M.dependencies = { "nvim-cmp" } + M.config = function() require("cmp").setup.filetype({ "dap-repl", "dapui_watches", "dapui_hover" }, { sources = { diff --git a/.config/nvim/lua/plugins/lazy.lua b/.config/nvim/lua/plugins/lazy.lua index 08086b330..d7f434ac5 100644 --- a/.config/nvim/lua/plugins/lazy.lua +++ b/.config/nvim/lua/plugins/lazy.lua @@ -4,12 +4,14 @@ local icons = require("config.icons") M.opts = { dev = { path = (os.getenv("XDG_DOCUMENTS_DIR") or "~/Documents") .. "/dev/nvim", + patterns = { "ssnailed" }, }, install = { missing = true, colorscheme = { "tokyonight" }, }, ui = { + title = "packages", border = "single", icons = { cmd = icons.Console .. " ", @@ -29,6 +31,26 @@ M.opts = { task = icons.Task, }, }, + change_detection = { + enabled = false, + }, + -- checker = { + -- enabled = true, + -- }, + disabled_plugins = { + "gzip", + -- "matchit", + "matchparen", + "netrwPlugin", + "tarPlugin", + -- "tohtml", + "tutor", + "zipPlugin", + }, + profiling = { + loader = true, + require = true, + } } return M diff --git a/.config/nvim/lua/plugins/lsp/aerial.lua b/.config/nvim/lua/plugins/lsp/aerial.lua index 54a04e20d..83e5cb8ff 100644 --- a/.config/nvim/lua/plugins/lsp/aerial.lua +++ b/.config/nvim/lua/plugins/lsp/aerial.lua @@ -1,6 +1,6 @@ local M = { "stevearc/aerial.nvim" } -M.event = { "BufReadPost", "BufNewFile", "BufNew" } +M.event = { "BufReadPost", "BufNewFile", "BufWritePre" } M.opts = { attach_mode = "global", diff --git a/.config/nvim/lua/plugins/lsp/mason-lspconfig.lua b/.config/nvim/lua/plugins/lsp/mason-lspconfig.lua index a20273511..fe0a7d0de 100644 --- a/.config/nvim/lua/plugins/lsp/mason-lspconfig.lua +++ b/.config/nvim/lua/plugins/lsp/mason-lspconfig.lua @@ -4,7 +4,7 @@ local serverconf = require("config.lsp") M.dependencies = { "mason.nvim", "neoconf.nvim", "neodev.nvim" } -M.event = { "BufReadPost", "BufNewFile", "BufNew" } +M.event = { "BufReadPost", "BufNewFile", "BufWritePre" } M.cmd = { "LspInstall", "LspUninstall" } diff --git a/.config/nvim/lua/plugins/lsp/null-ls.lua b/.config/nvim/lua/plugins/lsp/null-ls.lua index a9bacc7ab..2796ecc9a 100644 --- a/.config/nvim/lua/plugins/lsp/null-ls.lua +++ b/.config/nvim/lua/plugins/lsp/null-ls.lua @@ -1,6 +1,6 @@ local M = { "nvimtools/none-ls.nvim" } -M.event = { "BufReadPost", "BufNewFile", "BufNew" } +M.event = { "BufReadPost", "BufNewFile", "BufWritePre" } M.dependencies = { "mason-null-ls.nvim" } diff --git a/.config/nvim/lua/plugins/misc/alpha.lua b/.config/nvim/lua/plugins/misc/alpha.lua index 02007606c..6cfef7b32 100644 --- a/.config/nvim/lua/plugins/misc/alpha.lua +++ b/.config/nvim/lua/plugins/misc/alpha.lua @@ -1,5 +1,9 @@ local M = { "goolord/alpha-nvim" } +M.lazy = true + +M.event = { "VimEnter" } + M.dependencies = { "telescope.nvim", "todo-comments.nvim" } M.opts = function() diff --git a/.config/nvim/lua/plugins/misc/autopairs.lua b/.config/nvim/lua/plugins/misc/autopairs.lua index f72911204..9c8759ad5 100644 --- a/.config/nvim/lua/plugins/misc/autopairs.lua +++ b/.config/nvim/lua/plugins/misc/autopairs.lua @@ -1,6 +1,8 @@ local M = { "windwp/nvim-autopairs" } -M.event = { "BufReadPost", "BufNewFile", "BufNew" } +M.lazy = true + +M.event = { "VeryLazy" } M.opts = { check_ts = true, diff --git a/.config/nvim/lua/plugins/misc/bufferline.lua b/.config/nvim/lua/plugins/misc/bufferline.lua index 2e3ca77fc..ad3e80982 100644 --- a/.config/nvim/lua/plugins/misc/bufferline.lua +++ b/.config/nvim/lua/plugins/misc/bufferline.lua @@ -1,6 +1,6 @@ local M = { "akinsho/bufferline.nvim" } -M.event = { "BufReadPost", "BufNewFile", "BufNew" } +M.event = { "VeryLazy" } M.opts = function() local icons = require("config.icons") diff --git a/.config/nvim/lua/plugins/misc/colorizer.lua b/.config/nvim/lua/plugins/misc/colorizer.lua index 85c4b0d87..d41e1de7b 100644 --- a/.config/nvim/lua/plugins/misc/colorizer.lua +++ b/.config/nvim/lua/plugins/misc/colorizer.lua @@ -1,5 +1,7 @@ local M = { "NvChad/nvim-colorizer.lua" } +M.lazy = true + M.cmd = { "ColorizerToggle", "ColorizerAttachToBuffer", "ColorizerDetachFromBuffer", "ColorizerReloadAllBuffers" } M.opts = { user_default_options = { names = false } } diff --git a/.config/nvim/lua/plugins/misc/comment.lua b/.config/nvim/lua/plugins/misc/comment.lua index 0a59fd16a..259be9f9f 100644 --- a/.config/nvim/lua/plugins/misc/comment.lua +++ b/.config/nvim/lua/plugins/misc/comment.lua @@ -1,6 +1,6 @@ local M = { "numToStr/Comment.nvim" } -M.event = { "BufReadPost", "BufNewFile", "BufNew" } +M.event = { "BufReadPost", "BufNewFile", "BufWritePre" } M.opts = { mappings = { diff --git a/.config/nvim/lua/plugins/misc/gitsigns.lua b/.config/nvim/lua/plugins/misc/gitsigns.lua index 95d974310..2f093aa6b 100644 --- a/.config/nvim/lua/plugins/misc/gitsigns.lua +++ b/.config/nvim/lua/plugins/misc/gitsigns.lua @@ -1,6 +1,6 @@ local M = { "lewis6991/gitsigns.nvim" } -M.event = { "BufReadPost", "BufNewFile", "BufNew" } +M.event = { "BufReadPost", "BufNewFile", "BufWritePre" } local icons = require("config.icons") diff --git a/.config/nvim/lua/plugins/misc/indent-blankline.lua b/.config/nvim/lua/plugins/misc/indent-blankline.lua index 426325234..faf8a38fc 100644 --- a/.config/nvim/lua/plugins/misc/indent-blankline.lua +++ b/.config/nvim/lua/plugins/misc/indent-blankline.lua @@ -2,7 +2,7 @@ local M = { "lukas-reineke/indent-blankline.nvim" } M.main = "ibl" -M.event = { "BufReadPost", "BufNewFile", "BufNew" } +M.event = { "BufReadPost", "BufNewFile", "BufWritePre" } M.dependencies = { "nvim-treesitter" } @@ -19,13 +19,17 @@ M.opts = { }, exclude = { filetypes = { - "help", - "packer", - "NvimTree", - }, - buftypes = { - "terminal", - "nofile", + "help", + "alpha", + "dashboard", + "neo-tree", + "Trouble", + "trouble", + "lazy", + "mason", + "notify", + "toggleterm", + "lazyterm", }, }, } diff --git a/.config/nvim/lua/plugins/misc/lualine.lua b/.config/nvim/lua/plugins/misc/lualine.lua index c65c6ca6c..1cf01e7e3 100644 --- a/.config/nvim/lua/plugins/misc/lualine.lua +++ b/.config/nvim/lua/plugins/misc/lualine.lua @@ -1,5 +1,7 @@ local M = { "nvim-lualine/lualine.nvim" } +-- M.event = { "VeryLazy" } + M.opts = function() local colors = require("tokyonight.colors").setup({ transform = true }) local icons = require("config.icons") diff --git a/.config/nvim/lua/plugins/misc/tabnine.lua b/.config/nvim/lua/plugins/misc/tabnine.lua index 1f4be3c8e..e9282c99b 100644 --- a/.config/nvim/lua/plugins/misc/tabnine.lua +++ b/.config/nvim/lua/plugins/misc/tabnine.lua @@ -2,7 +2,7 @@ local M = { "codota/tabnine-nvim" } M.build = "./dl_binaries.sh" -M.event = { "BufReadPost", "BufNewFile", "BufNew" } +M.event = { "BufReadPost", "BufNewFile", "BufWritePre" } M.main = "tabnine" diff --git a/.config/nvim/lua/plugins/misc/todo-comments.lua b/.config/nvim/lua/plugins/misc/todo-comments.lua index 9ce177884..7f801abce 100644 --- a/.config/nvim/lua/plugins/misc/todo-comments.lua +++ b/.config/nvim/lua/plugins/misc/todo-comments.lua @@ -1,7 +1,7 @@ local M = { "folke/todo-comments.nvim" } local icons = require("config.icons") -M.event = { "BufReadPost", "BufNewFile", "BufNew" } +M.event = { "BufReadPost", "BufNewFile", "BufWritePre" } M.opts = { signs = false, diff --git a/.config/nvim/lua/plugins/misc/treesitter.lua b/.config/nvim/lua/plugins/misc/treesitter.lua index 9e6ead3db..8cf931afd 100644 --- a/.config/nvim/lua/plugins/misc/treesitter.lua +++ b/.config/nvim/lua/plugins/misc/treesitter.lua @@ -2,7 +2,7 @@ local M = { "nvim-treesitter/nvim-treesitter" } M.build = ":TSUpdate" -M.event = { "BufReadPost", "BufNewFile", "BufNew" } +M.event = { "BufReadPost", "BufNewFile", "BufWritePre" } -- M.cmd = { -- "TSBufDisable", diff --git a/.config/zsh/plugins/fzf/bindings.zsh b/.config/zsh/plugins/fzf/bindings.zsh index cc7c52a7f..2cf10b9e3 100644 --- a/.config/zsh/plugins/fzf/bindings.zsh +++ b/.config/zsh/plugins/fzf/bindings.zsh @@ -1,15 +1,6 @@ -# ____ ____ -# / __/___ / __/ -# / /_/_ / / /_ -# / __/ / /_/ __/ -# /_/ /___/_/ key-bindings.zsh -# -# - $FZF_TMUX_OPTS -# - $FZF_CTRL_T_COMMAND -# - $FZF_CTRL_T_OPTS -# - $FZF_CTRL_R_OPTS -# - $FZF_ALT_C_COMMAND -# - $FZF_ALT_C_OPTS +#!/bin/zsh + +# TODO: move this into other zsh config # Key bindings # ------------ @@ -71,30 +62,27 @@ bindkey -M vicmd '^T' fzf-file-widget bindkey -M viins '^T' fzf-file-widget # ALT-C - cd into the selected directory -# WARN: Disabled because the vim-browse patch for st uses this key combo already -# LF is better for this anyways - -# fzf-cd-widget() { -# local cmd="${FZF_ALT_C_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \ -# -o -type d -print 2> /dev/null | cut -b3-"}" -# setopt localoptions pipefail no_aliases 2> /dev/null -# local dir="$(eval "$cmd" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore $FZF_DEFAULT_OPTS $FZF_ALT_C_OPTS" $(__fzfcmd) +m)" -# if [[ -z "$dir" ]]; then -# zle redisplay -# return 0 -# fi -# zle push-line # Clear buffer. Auto-restored on next prompt. -# BUFFER="builtin cd -- ${(q)dir}" -# zle accept-line -# local ret=$? -# unset dir # ensure this doesn't end up appearing in prompt expansion -# zle reset-prompt -# return $ret -# } -# zle -N fzf-cd-widget -# bindkey -M emacs '\ec' fzf-cd-widget -# bindkey -M vicmd '\ec' fzf-cd-widget -# bindkey -M viins '\ec' fzf-cd-widget +fzf-cd-widget() { + local cmd="${FZF_ALT_C_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \ + -o -type d -print 2> /dev/null | cut -b3-"}" + setopt localoptions pipefail no_aliases 2> /dev/null + local dir="$(eval "$cmd" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore $FZF_DEFAULT_OPTS $FZF_ALT_C_OPTS" $(__fzfcmd) +m)" + if [[ -z "$dir" ]]; then + zle redisplay + return 0 + fi + zle push-line # Clear buffer. Auto-restored on next prompt. + BUFFER="builtin cd -- ${(q)dir}" + zle accept-line + local ret=$? + unset dir # ensure this doesn't end up appearing in prompt expansion + zle reset-prompt + return $ret +} +zle -N fzf-cd-widget +bindkey -M emacs '\ec' fzf-cd-widget +bindkey -M vicmd '\ec' fzf-cd-widget +bindkey -M viins '\ec' fzf-cd-widget # CTRL-R - Paste the selected command from history into the command line fzf-history-widget() {