diff --git a/config/.config/nvim/plugin/packer_compiled.lua b/config/.config/nvim/plugin/packer_compiled.lua index 6c47e92..c6e2ffa 100644 --- a/config/.config/nvim/plugin/packer_compiled.lua +++ b/config/.config/nvim/plugin/packer_compiled.lua @@ -136,6 +136,11 @@ _G.packer_plugins = { path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/cmp-path", url = "https://github.com/hrsh7th/cmp-path" }, + ["cmp-spell"] = { + loaded = true, + path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/cmp-spell", + url = "https://github.com/f3fora/cmp-spell" + }, ["cmp-under-comparator"] = { loaded = true, path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/cmp-under-comparator", @@ -201,6 +206,7 @@ _G.packer_plugins = { url = "https://github.com/onsails/lspkind.nvim" }, ["lualine.nvim"] = { + config = { ' require("lualine_config") ' }, loaded = true, path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/lualine.nvim", url = "https://github.com/nvim-lualine/lualine.nvim" @@ -405,30 +411,34 @@ _G.packer_plugins = { } time([[Defining packer_plugins]], false) --- Config for: lsp_lines.nvim -time([[Config for lsp_lines.nvim]], true) -require("lsp_lines").setup() -time([[Config for lsp_lines.nvim]], false) --- Config for: fidget.nvim -time([[Config for fidget.nvim]], true) -require("fidget").setup() -time([[Config for fidget.nvim]], false) -- Config for: auto-session time([[Config for auto-session]], true) try_loadstring("\27LJ\2\n\1\0\0\4\0\6\0\t6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0005\3\4\0=\3\5\2B\0\2\1K\0\1\0\31auto_session_suppress_dirs\1\4\0\0\a~/\16~/Downloads\6/\1\0\1\14log_level\nerror\nsetup\17auto-session\frequire\0", "config", "auto-session") time([[Config for auto-session]], false) +-- Config for: lualine.nvim +time([[Config for lualine.nvim]], true) + require("lualine_config") +time([[Config for lualine.nvim]], false) -- Config for: nvim-scrollbar time([[Config for nvim-scrollbar]], true) require("scrollbar").setup() time([[Config for nvim-scrollbar]], false) --- Config for: catppuccin -time([[Config for catppuccin]], true) -require("catppuccin-config") -time([[Config for catppuccin]], false) -- Config for: git-conflict.nvim time([[Config for git-conflict.nvim]], true) require('git-conflict').setup() time([[Config for git-conflict.nvim]], false) +-- Config for: lsp_lines.nvim +time([[Config for lsp_lines.nvim]], true) +require("lsp_lines").setup() +time([[Config for lsp_lines.nvim]], false) +-- Config for: catppuccin +time([[Config for catppuccin]], true) +require("catppuccin-config") +time([[Config for catppuccin]], false) +-- Config for: fidget.nvim +time([[Config for fidget.nvim]], true) +require("fidget").setup() +time([[Config for fidget.nvim]], false) -- Load plugins in order defined by `after` time([[Sequenced loading]], true) vim.cmd [[ packadd LuaSnip ]] @@ -437,8 +447,8 @@ time([[Sequenced loading]], false) -- Command lazy-loads time([[Defining lazy-load commands]], true) -pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file UndotreeToggle lua require("packer.load")({'undotree'}, { cmd = "UndotreeToggle", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file Neogit lua require("packer.load")({'neogit'}, { cmd = "Neogit", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) +pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file UndotreeToggle lua require("packer.load")({'undotree'}, { cmd = "UndotreeToggle", l1 = , l2 = , bang = , args = , mods = "" }, _G.packer_plugins)]]) time([[Defining lazy-load commands]], false) vim.cmd [[augroup packer_load_aucmds]] diff --git a/google/.hgrc b/google/.hgrc index 5415b30..86ed48d 100644 --- a/google/.hgrc +++ b/google/.hgrc @@ -25,7 +25,7 @@ summarize.extra_args = --proxy [merge-tools] # meld.args = --auto-merge --label='incoming' $local --label='merged' $base --label='existing' $other -o $output # https://www.mercurial-scm.org/wiki/MergingWithVim#More_Useful_3-Way_Diff -vimdiff.executable = vimdiff +vimdiff.executable = nvim vimdiff.args = -f -d $output -M $local $base $other -c "wincmd J" -c "set modifiable" -c "set write" vimdiff.premerge = keep diff --git a/vim/.vim/lua/catppuccin-config.lua b/vim/.vim/lua/catppuccin-config.lua index 1e3ad44..5f4f064 100644 --- a/vim/.vim/lua/catppuccin-config.lua +++ b/vim/.vim/lua/catppuccin-config.lua @@ -2,7 +2,7 @@ vim.g.catppuccin_flavour = "macchiato" -- latte, frappe, macchiato, mocha local colors = require("catppuccin.palettes").get_palette() require("catppuccin").setup({ - -- flavour = "macchiato", + flavour = vim.g.catppuccin_flavour, --"macchiato", integrations = { cmp = true, -- coc_nvim = false, @@ -26,7 +26,7 @@ require("catppuccin").setup({ -- nvimtree = true, -- overseer = false, -- pounce = false, - symbols_outline = true, + symbols_outline = true, telescope = true, treesitter = true, -- treesitter_context = false, diff --git a/vim/.vim/lua/lsp.lua b/vim/.vim/lua/lsp.lua index 96956e1..75614d5 100644 --- a/vim/.vim/lua/lsp.lua +++ b/vim/.vim/lua/lsp.lua @@ -105,6 +105,15 @@ cmp.setup({ { name = 'nvim_lsp_signature_help' }, { name = 'nvim_ciderlsp', priority = 9 }, { name = "buffer", keyword_length = 5 }, + { + name = 'spell', + option = { + keep_all_entries = false, + enable_in_context = function() + return true + end, + }, + }, }, sorting = { @@ -238,7 +247,7 @@ local on_attach = function(client, bufnr) vim.api.nvim_command("augroup LSP") vim.api.nvim_command("autocmd!") - if client.resolved_capabilities.document_highlight then + if client.server_capabilities.document_highlight then vim.api.nvim_command("autocmd CursorHold lua vim.lsp.buf.document_highlight()") vim.api.nvim_command("autocmd CursorHoldI lua vim.lsp.buf.document_highlight()") vim.api.nvim_command("autocmd CursorMoved lua vim.lsp.util.buf_clear_references()") diff --git a/vim/.vim/lua/lualine_config.lua b/vim/.vim/lua/lualine_config.lua index 3c635af..6418a5a 100644 --- a/vim/.vim/lua/lualine_config.lua +++ b/vim/.vim/lua/lualine_config.lua @@ -44,34 +44,41 @@ require('lualine').setup { lualine_a = {'mode'}, lualine_b = {'branch', 'diff', getCitc, isCiderLspAttached}, lualine_c = {'filename', {"aerial", depth=-1}, getLightbulb}, - lualine_x = {'filetype'}, lualine_x = { { 'diagnostics', sources = {"nvim_lsp"}, symbols = {error = ' ', warn = ' ', info = ' ', hint = ' '} }, 'encoding', 'filetype' }, - lualine_y = {}, + lualine_y = {'searchcount'}, lualine_z = {'location'} }, + tabline = { + lualine_a = {{'tabs', mode = 1}}, + -- lualine_b = {'branch'}, + -- lualine_c = {'filename'}, + lualine_x = { + { 'diagnostics', sources = {"nvim_lsp", "nvim_workspace_diagnostic"}, symbols = {error = ' ', warn = ' ', info = ' ', hint = ' '} }, + } + }, -- default -- sections = { - -- lualine_a = {'mode'}, - -- lualine_b = {'branch', 'diff', 'diagnostics'}, - -- lualine_c = {'filename'}, - -- lualine_x = {'encoding', 'fileformat', 'filetype'}, - -- lualine_y = {'progress'}, - -- lualine_z = {'location'} - -- }, - inactive_sections = { - lualine_a = {}, - lualine_b = {}, - -- lualine_c = {'filename'}, - lualine_x = {'location'}, - lualine_y = {}, - lualine_z = {} - }, - -- tabline = {}, - -- winbar = {}, - -- inactive_winbar = {}, - -- extensions = {} -} + -- lualine_a = {'mode'}, + -- lualine_b = {'branch', 'diff', 'diagnostics'}, + -- lualine_c = {'filename'}, + -- lualine_x = {'encoding', 'fileformat', 'filetype'}, + -- lualine_y = {'progress'}, + -- lualine_z = {'location'} + -- }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + -- lualine_c = {'filename'}, + lualine_x = {'location'}, + lualine_y = {}, + lualine_z = {} + }, + -- tabline = {}, + -- winbar = {}, + -- inactive_winbar = {}, + -- extensions = {} + } diff --git a/vim/.vim/lua/plugins.lua b/vim/.vim/lua/plugins.lua index 10c11f6..2a698a1 100644 --- a/vim/.vim/lua/plugins.lua +++ b/vim/.vim/lua/plugins.lua @@ -5,12 +5,12 @@ if fn.empty(fn.glob(install_path)) > 0 then vim.o.runtimepath = vim.fn.stdpath('data') .. '/site/pack/*/start/*,' .. vim.o.runtimepath end -local packerGroup = vim.api.nvim_create_augroup("packer_auto_compile", { clear = true }) -vim.api.nvim_create_autocmd("BufWritePost", { - pattern = "*/vim/lua/plugins.lua", - command = "luafile | PackerCompile", - group = packerGroup, -}) +vim.cmd([[ + augroup packer_user_config + autocmd! + autocmd BufWritePost plugins.lua source | PackerCompile + augroup end +]]) require('packer').startup(function(use) -- Packer can manage itself @@ -42,6 +42,7 @@ require('packer').startup(function(use) 'hrsh7th/cmp-buffer', 'lukas-reineke/cmp-under-comparator', 'hrsh7th/cmp-cmdline', + 'f3fora/cmp-spell', 'hrsh7th/cmp-nvim-lsp-document-symbol', 'hrsh7th/cmp-nvim-lsp-signature-help', 'hrsh7th/cmp-nvim-lua', @@ -60,7 +61,7 @@ require('packer').startup(function(use) use { 'ErichDonGubler/lsp_lines.nvim', config = [[require("lsp_lines").setup()]] } use 'jghauser/mkdir.nvim' - use 'simrat39/symbols-outline.nvim' + use { 'simrat39/symbols-outline.nvim' } use { 'petertriho/nvim-scrollbar', config = [[require("scrollbar").setup()]] } use { @@ -78,7 +79,10 @@ require('packer').startup(function(use) end } use 'sso://googler@user/vintharas/telescope-codesearch.nvim' - use 'nvim-lualine/lualine.nvim' + use { + 'nvim-lualine/lualine.nvim', + config = [[ require("lualine_config") ]] + } use 'rcarriga/nvim-notify' -- Git @@ -154,9 +158,9 @@ require("lsp") require("diagnostics") require("treesitter") require("telescope_config") -require("lualine_config") require("notify_config") require("symbols-outline-config") +require("spell_config") -- redundant w/ lsp_lines vim.diagnostic.config({ diff --git a/vim/.vim/lua/spell_config.lua b/vim/.vim/lua/spell_config.lua new file mode 100644 index 0000000..a6820c3 --- /dev/null +++ b/vim/.vim/lua/spell_config.lua @@ -0,0 +1,2 @@ +vim.opt.spell = true +vim.opt.spelllang = { 'en_us' } diff --git a/vim/.vim/lua/symbols-outline-config.lua b/vim/.vim/lua/symbols-outline-config.lua index 7d18bb7..7c8ee1d 100644 --- a/vim/.vim/lua/symbols-outline-config.lua +++ b/vim/.vim/lua/symbols-outline-config.lua @@ -19,5 +19,6 @@ require("symbols-outline").setup( ) local map = require("utils").map + + map('n', 'so', ':SymbolsOutline') -map('n', 'o', ':SymbolsOutline') diff --git a/zsh/.aliases.sh b/zsh/.aliases.sh index 1830f86..e5e27d4 100644 --- a/zsh/.aliases.sh +++ b/zsh/.aliases.sh @@ -131,3 +131,10 @@ to_mac(){ scp $1 cnieves-macbookpro.roam.internal:~/Downloads echo "Saved $1 to downloads" } + +bdoctor() { + hourly=$(builddoctor analyze --blueprint //depot/google3/java/com/google/android/gmscore/tools/build_doctor/build_doctor.blueprint --cl $1 --analysis_type=PERIODIC --analysis_name=hourly --buildable_unit_type BUILD --buildable_unit gmscore.build_doctor.debug_container | grep http) + default=$(builddoctor analyze --blueprint //depot/google3/java/com/google/android/gmscore/tools/build_doctor/build_doctor.blueprint --cl $1 --analysis_type=PERIODIC --buildable_unit_type BUILD --buildable_unit gmscore.build_doctor.debug_container | grep http) + echo "DEFAULT: $default" + echo "HOURLY: $hourly" +} diff --git a/zsh/.bash_profile b/zsh/.bash_profile index 2704c28..7248b11 100644 --- a/zsh/.bash_profile +++ b/zsh/.bash_profile @@ -7,7 +7,6 @@ export GO111MODULE=auto export CLOUDSDK_PYTHON=python2 export PATH="/opt/local/bin:/opt/local/sbin:$PATH" -export EDITOR='nvim' HISTCONTROL=ignoreboth diff --git a/zsh/.zshrc b/zsh/.zshrc index ecc7f4f..02e9c46 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -35,6 +35,7 @@ else zle clear-screen -w fi } +export EDITOR='nvim' zle -N fancy-ctrl-z bindkey '^Z' fancy-ctrl-z bindkey "^A" beginning-of-line