diff --git a/.Brewfile b/.Brewfile index ffb287e..46ad313 100644 --- a/.Brewfile +++ b/.Brewfile @@ -86,6 +86,7 @@ brew "nnn" brew "openjdk" brew "pandoc" brew "pinentry-mac" +brew "powerline-go" brew "ruby-build" brew "rbenv" brew "rclone" @@ -93,7 +94,6 @@ brew "reattach-to-user-namespace" brew "redis" brew "ripgrep" brew "speedtest-cli" -brew "starship" brew "stow" brew "teensy_loader_cli" brew "terraform-ls" diff --git a/.config/lvim/config.lua b/.config/lvim/config.lua index 524e24d..9b9dbec 100644 --- a/.config/lvim/config.lua +++ b/.config/lvim/config.lua @@ -106,55 +106,98 @@ vim.cmd("set timeoutlen=500") -- Additional Plugins lvim.plugins = { - { - "p00f/nvim-ts-rainbow", - }, - { "tpope/vim-repeat" }, - { - "tpope/vim-surround", - keys = {"c", "d", "y"} - }, - { - "metakirby5/codi.vim", - cmd = "Codi", - }, - { - "monaqa/dial.nvim", - event = "BufRead", - config = function() - local dial = require "dial" - vim.cmd [[ + { + "tpope/vim-surround", + keys = { "c", "d", "y" }, + }, + { + "ethanholz/nvim-lastplace", + event = "BufRead", + config = function() + require("nvim-lastplace").setup({ + lastplace_ignore_buftype = { "quickfix", "nofile", "help" }, + lastplace_ignore_filetype = { + "gitcommit", + "gitrebase", + "svn", + "hgcommit", + }, + lastplace_open_folds = true, + }) + end, + }, + { + "lukas-reineke/indent-blankline.nvim", + event = "BufRead", + setup = function() + vim.g.indentLine_enabled = 1 + vim.g.indent_blankline_char = "▏" + vim.g.indent_blankline_filetype_exclude = { "help", "terminal", "dashboard" } + vim.g.indent_blankline_buftype_exclude = { "terminal" } + vim.g.indent_blankline_show_trailing_blankline_indent = false + vim.g.indent_blankline_show_first_indent_level = false + end, + }, + { + "ggandor/lightspeed.nvim", + event = "BufRead", + }, + { + "nacro90/numb.nvim", + event = "BufRead", + config = function() + require("numb").setup({ + show_numbers = true, -- Enable 'number' for the window while peeking + show_cursorline = true, -- Enable 'cursorline' for the window while peeking + }) + end, + }, + { + "windwp/nvim-spectre", + event = "BufRead", + config = function() + require("spectre").setup() + end, + }, + { + "andymass/vim-matchup", + event = "CursorMoved", + config = function() + vim.g.matchup_matchparen_offscreen = { method = "popup" } + end, + }, + { + "p00f/nvim-ts-rainbow", + }, + { "tpope/vim-repeat" }, + { + "monaqa/dial.nvim", + event = "BufRead", + config = function() + local dial = require("dial") + vim.cmd([[ nmap (dial-increment) nmap (dial-decrement) vmap (dial-increment) vmap (dial-decrement) vmap g (dial-increment-additional) vmap g (dial-decrement-additional) - ]] + ]]) - dial.augends["custom#boolean"] = dial.common.enum_cyclic { - name = "boolean", - strlist = { "true", "false" }, - } - table.insert(dial.config.searchlist.normal, "custom#boolean") + dial.augends["custom#boolean"] = dial.common.enum_cyclic({ + name = "boolean", + strlist = { "true", "false" }, + }) + table.insert(dial.config.searchlist.normal, "custom#boolean") - -- For Languages which prefer True/False, e.g. python. - dial.augends["custom#Boolean"] = dial.common.enum_cyclic { - name = "Boolean", - strlist = { "True", "False" }, - } - table.insert(dial.config.searchlist.normal, "custom#Boolean") - end, - }, - { - "phaazon/hop.nvim", - event = "BufRead", - config = function() - require("hop").setup() - vim.api.nvim_set_keymap("n", "s", ":HopChar2", { silent = true }) - vim.api.nvim_set_keymap("n", "S", ":HopWord", { silent = true }) - end, - }, + -- For Languages which prefer True/False, e.g. python. + dial.augends["custom#Boolean"] = dial.common.enum_cyclic({ + name = "Boolean", + strlist = { "True", "False" }, + }) + table.insert(dial.config.searchlist.normal, "custom#Boolean") + end, + }, } -- Autocommands (https://neovim.io/doc/user/autocmd.html) @@ -163,11 +206,11 @@ lvim.plugins = { -- } -- Typescript/javascript -lvim.lang.typescript.formatters = { { exe = "eslint"}, { exe = "prettier" } } +lvim.lang.typescript.formatters = { { exe = "eslint" }, { exe = "prettier" } } lvim.lang.typescriptreact.formatters = lvim.lang.typescript.formatters lvim.lang.typescript.linters = { { exe = "eslint" } } lvim.lang.typescriptreact.linters = lvim.lang.typescript.linters -lvim.lang.javascript.formatters = { { exe = "eslint"}, { exe = "prettier" } } +lvim.lang.javascript.formatters = { { exe = "eslint" }, { exe = "prettier" } } lvim.lang.javascriptreact.formatters = lvim.lang.javascript.formatters lvim.lang.javascript.linters = { { exe = "eslint" } } lvim.lang.javascriptreact.linters = lvim.lang.javascript.linters @@ -175,3 +218,5 @@ lvim.lang.javascriptreact.linters = lvim.lang.javascript.linters -- JSON lvim.lang.json.formatters = { { exe = "prettier" } } +-- Lua +lvim.lang.lua.formatters = { { exe = "stylua" } } diff --git a/.config/lvim/plugin/packer_compiled.lua b/.config/lvim/plugin/packer_compiled.lua index 6db5540..e8edeaf 100644 --- a/.config/lvim/plugin/packer_compiled.lua +++ b/.config/lvim/plugin/packer_compiled.lua @@ -83,12 +83,6 @@ _G.packer_plugins = { needs_bufread = false, path = "/Users/wizehive/.local/share/lunarvim/site/pack/packer/opt/barbar.nvim" }, - ["codi.vim"] = { - commands = { "Codi" }, - loaded = false, - needs_bufread = false, - path = "/Users/wizehive/.local/share/lunarvim/site/pack/packer/opt/codi.vim" - }, ["dashboard-nvim"] = { config = { "\27LJ\2\n<\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\19core.dashboard\frequire\0" }, loaded = false, @@ -112,11 +106,15 @@ _G.packer_plugins = { needs_bufread = false, path = "/Users/wizehive/.local/share/lunarvim/site/pack/packer/opt/gitsigns.nvim" }, - ["hop.nvim"] = { - config = { "\27LJ\2\n\1\0\0\6\0\r\0\0226\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\0016\0\3\0009\0\4\0009\0\5\0'\2\6\0'\3\a\0'\4\b\0005\5\t\0B\0\5\0016\0\3\0009\0\4\0009\0\5\0'\2\6\0'\3\n\0'\4\v\0005\5\f\0B\0\5\1K\0\1\0\1\0\1\vsilent\2\17:HopWord\6S\1\0\1\vsilent\2\18:HopChar2\6s\6n\20nvim_set_keymap\bapi\bvim\nsetup\bhop\frequire\0" }, + ["indent-blankline.nvim"] = { loaded = false, needs_bufread = false, - path = "/Users/wizehive/.local/share/lunarvim/site/pack/packer/opt/hop.nvim" + path = "/Users/wizehive/.local/share/lunarvim/site/pack/packer/opt/indent-blankline.nvim" + }, + ["lightspeed.nvim"] = { + loaded = false, + needs_bufread = false, + path = "/Users/wizehive/.local/share/lunarvim/site/pack/packer/opt/lightspeed.nvim" }, ["lualine.nvim"] = { config = { "\27LJ\2\n:\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\17core.lualine\frequire\0" }, @@ -131,6 +129,12 @@ _G.packer_plugins = { loaded = true, path = "/Users/wizehive/.local/share/lunarvim/site/pack/packer/start/null-ls.nvim" }, + ["numb.nvim"] = { + config = { "\27LJ\2\nX\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0B\0\2\1K\0\1\0\1\0\2\20show_cursorline\2\17show_numbers\2\nsetup\tnumb\frequire\0" }, + loaded = false, + needs_bufread = false, + path = "/Users/wizehive/.local/share/lunarvim/site/pack/packer/opt/numb.nvim" + }, ["nvim-autopairs"] = { config = { "\27LJ\2\n<\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\19core.autopairs\frequire\0" }, load_after = { @@ -159,6 +163,12 @@ _G.packer_plugins = { loaded = true, path = "/Users/wizehive/.local/share/lunarvim/site/pack/packer/start/nvim-dap" }, + ["nvim-lastplace"] = { + config = { "\27LJ\2\n\1\0\0\4\0\b\0\v6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\4\0005\3\3\0=\3\5\0025\3\6\0=\3\a\2B\0\2\1K\0\1\0\30lastplace_ignore_filetype\1\5\0\0\14gitcommit\14gitrebase\bsvn\rhgcommit\29lastplace_ignore_buftype\1\0\1\25lastplace_open_folds\2\1\4\0\0\rquickfix\vnofile\thelp\nsetup\19nvim-lastplace\frequire\0" }, + loaded = false, + needs_bufread = false, + path = "/Users/wizehive/.local/share/lunarvim/site/pack/packer/opt/nvim-lastplace" + }, ["nvim-lspconfig"] = { loaded = true, path = "/Users/wizehive/.local/share/lunarvim/site/pack/packer/start/nvim-lspconfig" @@ -169,6 +179,12 @@ _G.packer_plugins = { needs_bufread = false, path = "/Users/wizehive/.local/share/lunarvim/site/pack/packer/opt/nvim-lspinstall" }, + ["nvim-spectre"] = { + config = { "\27LJ\2\n5\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\fspectre\frequire\0" }, + loaded = false, + needs_bufread = false, + path = "/Users/wizehive/.local/share/lunarvim/site/pack/packer/opt/nvim-spectre" + }, ["nvim-toggleterm.lua"] = { config = { "\27LJ\2\n;\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\18core.terminal\frequire\0" }, loaded = false, @@ -215,6 +231,13 @@ _G.packer_plugins = { loaded = true, path = "/Users/wizehive/.local/share/lunarvim/site/pack/packer/start/telescope.nvim" }, + ["vim-matchup"] = { + after_files = { "/Users/wizehive/.local/share/lunarvim/site/pack/packer/opt/vim-matchup/after/plugin/matchit.vim" }, + config = { "\27LJ\2\nN\0\0\2\0\4\0\0056\0\0\0009\0\1\0005\1\3\0=\1\2\0K\0\1\0\1\0\1\vmethod\npopup!matchup_matchparen_offscreen\6g\bvim\0" }, + loaded = false, + needs_bufread = true, + path = "/Users/wizehive/.local/share/lunarvim/site/pack/packer/opt/vim-matchup" + }, ["vim-repeat"] = { loaded = true, path = "/Users/wizehive/.local/share/lunarvim/site/pack/packer/start/vim-repeat" @@ -239,6 +262,18 @@ _G.packer_plugins = { } time([[Defining packer_plugins]], false) +-- Setup for: indent-blankline.nvim +time([[Setup for indent-blankline.nvim]], true) +try_loadstring("\27LJ\2\n\2\0\0\2\0\v\0\0256\0\0\0009\0\1\0)\1\1\0=\1\2\0006\0\0\0009\0\1\0'\1\4\0=\1\3\0006\0\0\0009\0\1\0005\1\6\0=\1\5\0006\0\0\0009\0\1\0005\1\b\0=\1\a\0006\0\0\0009\0\1\0+\1\1\0=\1\t\0006\0\0\0009\0\1\0+\1\1\0=\1\n\0K\0\1\0-indent_blankline_show_first_indent_level4indent_blankline_show_trailing_blankline_indent\1\2\0\0\rterminal%indent_blankline_buftype_exclude\1\4\0\0\thelp\rterminal\14dashboard&indent_blankline_filetype_exclude\b▏\26indent_blankline_char\23indentLine_enabled\6g\bvim\0", "setup", "indent-blankline.nvim") +time([[Setup for indent-blankline.nvim]], false) +-- Config for: telescope.nvim +time([[Config for telescope.nvim]], true) +try_loadstring("\27LJ\2\n<\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\19core.telescope\frequire\0", "config", "telescope.nvim") +time([[Config for telescope.nvim]], false) +-- Config for: nvim-tree.lua +time([[Config for nvim-tree.lua]], true) +try_loadstring("\27LJ\2\n;\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\18core.nvimtree\frequire\0", "config", "nvim-tree.lua") +time([[Config for nvim-tree.lua]], false) -- Config for: lualine.nvim time([[Config for lualine.nvim]], true) try_loadstring("\27LJ\2\n:\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\17core.lualine\frequire\0", "config", "lualine.nvim") @@ -247,10 +282,6 @@ time([[Config for lualine.nvim]], false) time([[Config for project.nvim]], true) try_loadstring("\27LJ\2\n:\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\17core.project\frequire\0", "config", "project.nvim") time([[Config for project.nvim]], false) --- Config for: nvim-tree.lua -time([[Config for nvim-tree.lua]], true) -try_loadstring("\27LJ\2\n;\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\18core.nvimtree\frequire\0", "config", "nvim-tree.lua") -time([[Config for nvim-tree.lua]], false) -- Config for: nvim-dap time([[Config for nvim-dap]], true) try_loadstring("\27LJ\2\n6\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\rcore.dap\frequire\0", "config", "nvim-dap") @@ -259,32 +290,23 @@ time([[Config for nvim-dap]], false) time([[Config for nvim-treesitter]], true) try_loadstring("\27LJ\2\n=\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\20core.treesitter\frequire\0", "config", "nvim-treesitter") time([[Config for nvim-treesitter]], false) --- Config for: telescope.nvim -time([[Config for telescope.nvim]], true) -try_loadstring("\27LJ\2\n<\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\19core.telescope\frequire\0", "config", "telescope.nvim") -time([[Config for telescope.nvim]], false) - --- Command lazy-loads -time([[Defining lazy-load commands]], true) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file Codi lua require("packer.load")({'codi.vim'}, { cmd = "Codi", l1 = , l2 = , bang = , args = }, _G.packer_plugins)]]) -time([[Defining lazy-load commands]], false) - -- Keymap lazy-loads time([[Defining lazy-load keymaps]], true) +vim.cmd [[noremap d lua require("packer.load")({'vim-surround'}, { keys = "d", prefix = "" }, _G.packer_plugins)]] vim.cmd [[noremap y lua require("packer.load")({'vim-surround'}, { keys = "y", prefix = "" }, _G.packer_plugins)]] vim.cmd [[noremap c lua require("packer.load")({'vim-surround'}, { keys = "c", prefix = "" }, _G.packer_plugins)]] -vim.cmd [[noremap d lua require("packer.load")({'vim-surround'}, { keys = "d", prefix = "" }, _G.packer_plugins)]] time([[Defining lazy-load keymaps]], false) vim.cmd [[augroup packer_load_aucmds]] vim.cmd [[au!]] -- Event lazy-loads time([[Defining lazy-load event autocommands]], true) -vim.cmd [[au InsertEnter * ++once lua require("packer.load")({'nvim-compe', 'vim-vsnip'}, { event = "InsertEnter *" }, _G.packer_plugins)]] -vim.cmd [[au BufWinEnter * ++once lua require("packer.load")({'nvim-toggleterm.lua', 'which-key.nvim', 'barbar.nvim', 'dashboard-nvim'}, { event = "BufWinEnter *" }, _G.packer_plugins)]] +vim.cmd [[au BufWinEnter * ++once lua require("packer.load")({'which-key.nvim', 'nvim-toggleterm.lua', 'dashboard-nvim', 'barbar.nvim'}, { event = "BufWinEnter *" }, _G.packer_plugins)]] +vim.cmd [[au CursorMoved * ++once lua require("packer.load")({'vim-matchup'}, { event = "CursorMoved *" }, _G.packer_plugins)]] +vim.cmd [[au InsertEnter * ++once lua require("packer.load")({'vim-vsnip', 'nvim-compe'}, { event = "InsertEnter *" }, _G.packer_plugins)]] +vim.cmd [[au BufRead * ++once lua require("packer.load")({'gitsigns.nvim', 'indent-blankline.nvim', 'lightspeed.nvim', 'numb.nvim', 'nvim-spectre', 'nvim-comment', 'nvim-lastplace', 'dial.nvim'}, { event = "BufRead *" }, _G.packer_plugins)]] vim.cmd [[au InsertCharPre * ++once lua require("packer.load")({'friendly-snippets'}, { event = "InsertCharPre *" }, _G.packer_plugins)]] vim.cmd [[au VimEnter * ++once lua require("packer.load")({'nvim-lspinstall'}, { event = "VimEnter *" }, _G.packer_plugins)]] -vim.cmd [[au BufRead * ++once lua require("packer.load")({'gitsigns.nvim', 'hop.nvim', 'nvim-comment', 'dial.nvim'}, { event = "BufRead *" }, _G.packer_plugins)]] time([[Defining lazy-load event autocommands]], false) vim.cmd("augroup END") if should_profile then save_profiles() end diff --git a/.config/zsh/powerline.zsh b/.config/zsh/powerline.zsh new file mode 100644 index 0000000..941ac17 --- /dev/null +++ b/.config/zsh/powerline.zsh @@ -0,0 +1,23 @@ +function powerline_precmd() { + PS1="$($GOPATH/bin/powerline-go -error $? -jobs ${${(%):%j}:-0})" + + # Uncomment the following line to automatically clear errors after showing + # them once. This not only clears the error for powerline-go, but also for + # everything else you run in that shell. Don't enable this if you're not + # sure this is what you want. + + #set "?" +} + +function install_powerline_precmd() { + for s in "${precmd_functions[@]}"; do + if [ "$s" = "powerline_precmd" ]; then + return + fi + done + precmd_functions+=(powerline_precmd) +} + +if [ "$TERM" != "linux" ] && [ -f "$GOPATH/bin/powerline-go" ]; then + install_powerline_precmd +fi diff --git a/.zshrc b/.zshrc index c525782..4629b5a 100644 --- a/.zshrc +++ b/.zshrc @@ -107,4 +107,4 @@ source $ZSH/oh-my-zsh.sh # uninstall by removing these lines # [ -f ~/.config/tabtab/__tabtab.fish ]; and . ~/.config/tabtab/__tabtab.fish; or true -source <("/usr/local/bin/starship" init zsh --print-full-init) +# source <("/usr/local/bin/starship" init zsh --print-full-init)