diff --git a/config/.config/nvim/lazy-lock.json b/config/.config/nvim/lazy-lock.json index 3333b01..e0be20c 100644 --- a/config/.config/nvim/lazy-lock.json +++ b/config/.config/nvim/lazy-lock.json @@ -3,7 +3,7 @@ "asyncrun.vim": { "branch": "master", "commit": "7191d0c30dd105e5d7f897b9a6ee19cabe734466" }, "auto-session": { "branch": "main", "commit": "21033c6815f249a7839c3a85fc8a6b44d74925c9" }, "calendar-vim": { "branch": "master", "commit": "a7e73e02c92566bf427b2a1d6a61a8f23542cc21" }, - "catppuccin": { "branch": "main", "commit": "233c4175780d9b4e39ae4fe4535c1e4c14bd76ed" }, + "catppuccin": { "branch": "main", "commit": "2df7036c5c303c9184869936e40ca18935e4afcb" }, "ciderlsp_nvim": { "branch": "main", "commit": "7007e1881eb421a4d6f7ef1f31e973f7cc0b4d8d" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" }, @@ -23,7 +23,7 @@ "factorus": { "branch": "master", "commit": "19816e370df82fe96ca96856cf2be4d1c82302da" }, "fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" }, "fzf": { "branch": "master", "commit": "3e9efd1401404da8afdcf9757ac9996f5c48290f" }, - "fzf.vim": { "branch": "master", "commit": "5d87ac1fe8d729f116bda2f90a7211ad309ddf5a" }, + "fzf.vim": { "branch": "master", "commit": "1dcdb21db618055134cd611f4f5918f6d00a5df0" }, "git-conflict.nvim": { "branch": "main", "commit": "8d962d83cae924a314965f738ed1e05a4000d682" }, "gitsigns.nvim": { "branch": "main", "commit": "4455bb5364d29ff86639dfd5533d4fe4b48192d4" }, "go.nvim": { "branch": "master", "commit": "a8095eb334495caec3099b717cc7f5b1fbc3e628" }, @@ -33,7 +33,7 @@ "impatient.nvim": { "branch": "main", "commit": "47302af74be7b79f002773011f0d8e85679a7618" }, "java-syntax.vim": { "branch": "master", "commit": "9a3d76a8c6cd7765ba93a7bdd9280594167e3f1b" }, "kotlin-vim": { "branch": "master", "commit": "53fe045906df8eeb07cb77b078fc93acda6c90b8" }, - "lazy.nvim": { "branch": "main", "commit": "d1b02c2dda88422ca573f2a1ebdfb213ce0124d6" }, + "lazy.nvim": { "branch": "main", "commit": "678179543e0d27650c328d8659f2c2cab4d854ef" }, "libp.nvim": { "branch": "main", "commit": "db62a17ad68946d970bca0b0736e854058d3b307" }, "lsp-status.nvim": { "branch": "master", "commit": "54f48eb5017632d81d0fd40112065f1d062d0629" }, "lsp-zero.nvim": { "branch": "v2.x", "commit": "8fda9a849d6ab4196ecf129905764ddefdfb64b5" }, @@ -48,13 +48,13 @@ "nerdcommenter": { "branch": "master", "commit": "b0b09ea46c9f0509556257bd8b838b40f493d6a0" }, "nui.nvim": { "branch": "main", "commit": "062e366afcdf2bc1e9d28313a1df4ff14f05cb4e" }, "null-ls.nvim": { "branch": "main", "commit": "a138b14099e9623832027ea12b4631ddd2a49256" }, - "nvim-cmp": { "branch": "main", "commit": "b5a636d46c69bb371995c22d7a10ee1544004879" }, + "nvim-cmp": { "branch": "main", "commit": "09ff53ff579cfa3368f8051b0dbe88406891aabe" }, "nvim-lightbulb": { "branch": "master", "commit": "ca5b44a8efffb5fec1963ccd21f25ec04cc778b7" }, "nvim-lspconfig": { "branch": "master", "commit": "0f598b9ab9f2a6d7e137074be99c8d89af44b990" }, "nvim-notify": { "branch": "master", "commit": "ea9c8ce7a37f2238f934e087c255758659948e0f" }, "nvim-osc52": { "branch": "main", "commit": "3e96035d62290183fe7a11418db2b254fcfcaee3" }, "nvim-scrollbar": { "branch": "main", "commit": "35f99d559041c7c0eff3a41f9093581ceea534e8" }, - "nvim-treesitter": { "branch": "master", "commit": "2c59e0ff3da6514b03d853ebecb6c36c515a5d7d" }, + "nvim-treesitter": { "branch": "master", "commit": "51dfcfdfdea564c7a6bf155cf5b7c9831193ddae" }, "nvim-web-devicons": { "branch": "master", "commit": "2a125024a137677930efcfdf720f205504c97268" }, "nvim_figtree": { "branch": "main", "commit": "9bc3025f46e34732382da1019e256a9d8bec1e55" }, "plenary.nvim": { "branch": "master", "commit": "499e0743cf5e8075cd32af68baa3946a1c76adf1" }, @@ -64,7 +64,7 @@ "symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" }, "telekasten.nvim": { "branch": "main", "commit": "36dad2692974a5cc69813441442ccce8c53fbfd4" }, "telescope-file-browser.nvim": { "branch": "master", "commit": "fc70589a93d7bb42f4671ad75c8628a29995bcbe" }, - "telescope.nvim": { "branch": "0.1.x", "commit": "533c7fb1b3fb412a16e1c1c9cf6d2b1ac130f1b7" }, + "telescope.nvim": { "branch": "0.1.x", "commit": "776b509f80dd49d8205b9b0d94485568236d1192" }, "telescope_citc": { "branch": "main", "commit": "d6421d5bfe058915ece0daec55e488f8ea05f207" }, "telescope_codesearch": { "branch": "main", "commit": "a26077ad3c68cf897ae1c31da903d6516ebb9c92" }, "telescope_fig": { "branch": "main", "commit": "90150e1aa368b49a5125689b3a6da573a99e2bda" }, @@ -73,6 +73,7 @@ "vcscommand.vim": { "branch": "master", "commit": "2fb32681361f37533455d20aaa7fc6eb11b0fa4b" }, "vim-better-whitespace": { "branch": "master", "commit": "1b22dc57a2751c7afbc6025a7da39b7c22db635d" }, "vim-dirdiff": { "branch": "master", "commit": "84bc8999fde4b3c2d8b228b560278ab30c7ea4c9" }, + "vim-imp": { "branch": "main", "commit": "394e926ce62010443731f3923031e5afa1279f3e" }, "vim-indent-guides": { "branch": "master", "commit": "a1e1390c0136e63e813d051de2003bf0ee18ae30" }, "vim-matchup": { "branch": "master", "commit": "3625e099b09bff2db5f04082cb09ba679525980c" }, "vim-ripgrep": { "branch": "master", "commit": "2bb2425387b449a0cd65a54ceb85e123d7a320b8" }, diff --git a/vim/.vim/lua/config/google.lua b/vim/.vim/lua/config/google.lua deleted file mode 100644 index 8b13789..0000000 --- a/vim/.vim/lua/config/google.lua +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vim/.vim/lua/config/imp-google.lua b/vim/.vim/lua/config/imp-google.lua new file mode 100644 index 0000000..035eac2 --- /dev/null +++ b/vim/.vim/lua/config/imp-google.lua @@ -0,0 +1,11 @@ +vim.cmd([[ +Glaive imp Suggest[default]=buffer,csearch,prompt Pick[default]=fzf +]]) + +-- To search for imports in the file's parent directory before using Code Search across all of google3, install ripgrep and try +vim.cmd([[ +Glaive imp Suggest[gcl]=buffer,ripgrep,csearch,prompt +\ Location[gcl]=parent Location[borg]=parent +\ Suggest[borg]=buffer,ripgrep,csearch,prompt +\ Suggest[aidl]=buffer,ripgrep,csearch,prompt +]]) diff --git a/vim/.vim/lua/config/imp.lua b/vim/.vim/lua/config/imp.lua deleted file mode 100644 index 8d88186..0000000 --- a/vim/.vim/lua/config/imp.lua +++ /dev/null @@ -1,26 +0,0 @@ -local map = require("utils").map -local use_google = require("utils").use_google - -map("n", "csi", ":ImpSuggest ") -map("n", "ii", ":ImpSuggest ") -map("n", "if", ":ImpSuggest ") - -if use_google() then - vim.cmd([[Glug! glaive]]) - --- vim.cmd([[Glaive imp Pick[default]=fzf Suggest[default]=buffer,primp,csearch,prompt Report[default]=echo]]) - - vim.cmd([[ - set runtimepath+=/google/src/files/head/depot/google3/experimental/users/tstone/vim/vim-imp - set runtimepath+=/google/src/files/head/depot/google3/experimental/users/tstone/vim/imp-csearch - Glug imp-google - Glaive imp Suggest[default]=buffer,csearch,prompt Pick[default]=fzf - ]]) - -- To search for imports in the file's parent directory before using Code Search across all of google3, install ripgrep and try - vim.cmd([[ -Glaive imp Suggest[gcl]=buffer,ripgrep,csearch,prompt - \ Location[gcl]=parent Location[borg]=parent - \ Suggest[borg]=buffer,ripgrep,csearch,prompt - \ Suggest[aidl]=buffer,ripgrep,csearch,prompt - ]]) -end diff --git a/vim/.vim/lua/config/nerdcommenter.lua b/vim/.vim/lua/config/nerdcommenter.lua index 885a549..22169ea 100644 --- a/vim/.vim/lua/config/nerdcommenter.lua +++ b/vim/.vim/lua/config/nerdcommenter.lua @@ -22,9 +22,3 @@ vim.g.NERDTrimTrailingWhitespace = 1 --Enable NERDCommenterToggle to check all selected lines is commented or not vim.g.NERDToggleCheckAllLines = 1 - -nnoremap c :call nerdcommenter#Comment(0,"toggle") -vnoremap c :call nerdcommenter#Comment(0,"toggle") - -nnoremap c$ :call nerdcommenter#Comment(0,"ToEOL") -vnoremap c$ :call nerdcommenter#Comment(0,"ToEOL") diff --git a/vim/.vim/lua/plugins/base.lua b/vim/.vim/lua/plugins/base.lua index b556296..12b75ec 100644 --- a/vim/.vim/lua/plugins/base.lua +++ b/vim/.vim/lua/plugins/base.lua @@ -23,15 +23,19 @@ return 'nvim-lua/plenary.nvim', { - 'scrooloose/nerdcommenter', - config = function() + 'preservim/nerdcommenter', + init = function() require("config.nerdcommenter") end, keys = { { "c", ":call nerdcommenter#Comment(0, 'toggle')" }, - { "c", ":call nerdcommenter#Comment(0, 'toggle')", 'v' }, + { "c", ":call nerdcommenter#Comment(0, 'toggle')", mode='v' }, + + { "cS", ":call nerdcommenter#Comment(0, 'sexy')" }, + { "cS", ":call nerdcommenter#Comment(0, 'sexy')", mode='v' }, + { "c$", ":call nerdcommenter#Comment(0, 'ToEOL')" }, - { "c$", ":call nerdcommenter#Comment(0, 'ToEOL')", 'v' }, + { "c$", ":call nerdcommenter#Comment(0, 'ToEOL')", mode='v' }, } }, { @@ -150,7 +154,7 @@ return { '', [[:lua require('telescope').extensions.codesearch.find_files{}]],'n', { noremap = true, silent=true }}, { '', [[:lua require('telescope').extensions.codesearch.find_query{}]], { noremap = true, silent = true }}, { 'cs', [[:lua require('telescope').extensions.codesearch.find_query{}]], { noremap = true, silent = true }}, - { 'cs', [[:lua require('telescope').extensions.codesearch.find_query{}]], 'v', { noremap = true, silent = true }}, + { 'cs', [[:lua require('telescope').extensions.codesearch.find_query{}]], mode='v', { noremap = true, silent = true }}, { 'CS', [[:lua require('telescope').extensions.codesearch.find_query{default_text_expand=''}]], { noremap = true, silent = true } }, }, }, @@ -286,7 +290,7 @@ return { "iamcco/markdown-preview.nvim", build = "cd app && npm install", - setup = function() + init = function() vim.g.mkdp_filetypes = { "markdown" } end, ft = { "markdown" } diff --git a/vim/.vim/lua/plugins/google.lua b/vim/.vim/lua/plugins/google.lua index a4ebe0a..24da718 100644 --- a/vim/.vim/lua/plugins/google.lua +++ b/vim/.vim/lua/plugins/google.lua @@ -1,90 +1,118 @@ local use_google = require("utils").use_google -return { - { - name = "ai.nvim", - url = 'sso://googler@user/vvvv/ai.nvim', - }, - { - name = "cmp_nvim_ciderlsp", - url = 'sso://googler@user/piloto/cmp-nvim-ciderlsp', - lazy = false; - dependencies = { - 'hrsh7th/nvim-cmp', - } - }, - { - name = "ciderlsp_nvim", - url = 'sso://googler@user/kdark/ciderlsp-nvim', - lazy = false; - dependencies = { - 'hrsh7th/nvim-cmp', - } - }, - { - name = "nvim_figtree", - url = "sso://googler@user/jackcogdill/nvim-figtree", - }, - { - name = "telescope_codesearch", - url = 'sso://googler@user/vintharas/telescope-codesearch.nvim', - dependencies = { 'nvim-telescope/telescope.nvim' }, - }, - { - name = "telescope_citc", - url = 'sso://googler@user/aktau/telescope-citc.nvim', - dependencies = { 'nvim-telescope/telescope.nvim' } - }, - { - name = "telescope_fig", - url = 'sso://googler@user/tylersaunders/telescope-fig.nvim', - dependencies = { 'nvim-telescope/telescope.nvim' } - }, - { - name = "google_comments", - url = 'sso://googler@user/chmnchiang/google-comments', - -- '/google/src/head/depot/google3/experimental/users/chmnchiang/neovim/google-comments', - -- '/google/src/cloud/cnieves/google-comments/google3/experimental/users/chmnchiang/neovim/google-comments', - dependencies = {'rcarriga/nvim-notify', 'nvim-lua/plenary.nvim'}, - config = function() - require("config.google-comments") - end, - }, - - -- { - -- '/google/src/cloud/cnieves/google-comments/google3/experimental/users/cnieves/neovim/critique', - -- config = [[ require("critique").setup() ]] - -- }, - - { - name = "hg", - url = "sso://googler@user/smwang/hg.nvim", - dependencies = { "ipod825/libp.nvim" }, - config = function() - require("config.fig") - require("hg").setup() - end, +local function goog(plugin, config) + return { + name = plugin, + dir = "/usr/share/vim/google/" .. plugin, + dependencies = { "maktaba" }, + config = config, } -} - -- { - -- 'google/vim-glaive', - -- after = { - -- 'google/vim-maktaba', - -- } - -- -- disable = use_google(), - -- -- cond = not use_google(), - -- } - -- { - -- 'google/vim-maktaba', - -- -- disable = use_google(), - -- -- cond = not use_google(), - -- } - -- { - -- 'flwyd/vim-imp', - -- disable = use_google(), - -- -- cond = not use_google(), - -- after = { - -- 'google/vim-maktaba', - -- 'google/vim-glaive', - -- } - -- } +end + +if use_google() then + return { + { + name = "maktaba", + dir = "/usr/share/vim/google/maktaba", + init = function () + vim.cmd("source /usr/share/vim/google/glug/bootstrap.vim") + end, + }, + goog("core"), + goog("glaive"), + goog("alert"), + goog("csearch"), + goog("codefmt"), + goog("codefmt-google"), + goog("languages"), + goog("googlestyle"), + goog("googlespell"), + goog("googlepaths"), + goog("google-filetypes"), + goog("ft-java"), + goog("ft-kotlin"), + goog("ft-proto"), + goog("critique"), + goog("piper"), + goog("gtimporter"), + goog("blaze"), + goog("buganizer"), + goog("relatedfiles"), + goog("g4"), + goog("outline-window"), + goog("fzf-query"), + { + name = "imp-google", + dir = "/usr/share/vim/google/imp-google", + dependencies = { "maktaba", "vim-imp", "glaive" }, + config = function() + require("config.imp-google") + end, + }, + { + "flwyd/vim-imp", + dependencies = {"imp-google"}, + keys = { + { "ii", ":ImpSuggest " }, + } + }, + { + name = "ai.nvim", + url = 'sso://googler@user/vvvv/ai.nvim', + }, + { + name = "cmp_nvim_ciderlsp", + url = 'sso://googler@user/piloto/cmp-nvim-ciderlsp', + lazy = false; + dependencies = { + 'hrsh7th/nvim-cmp', + } + }, + { + name = "ciderlsp_nvim", + url = 'sso://googler@user/kdark/ciderlsp-nvim', + lazy = false; + dependencies = { + 'hrsh7th/nvim-cmp', + } + }, + { + name = "nvim_figtree", + url = "sso://googler@user/jackcogdill/nvim-figtree", + }, + { + name = "telescope_codesearch", + url = 'sso://googler@user/vintharas/telescope-codesearch.nvim', + dependencies = { 'nvim-telescope/telescope.nvim' }, + }, + { + name = "telescope_citc", + url = 'sso://googler@user/aktau/telescope-citc.nvim', + dependencies = { 'nvim-telescope/telescope.nvim' } + }, + { + name = "telescope_fig", + url = 'sso://googler@user/tylersaunders/telescope-fig.nvim', + dependencies = { 'nvim-telescope/telescope.nvim' } + }, + { + name = "google_comments", + url = 'sso://googler@user/chmnchiang/google-comments', + dependencies = {'rcarriga/nvim-notify', 'nvim-lua/plenary.nvim'}, + config = function() + require("config.google-comments") + end, + }, + { + name = "hg", + url = "sso://googler@user/smwang/hg.nvim", + dependencies = { "ipod825/libp.nvim" }, + config = function() + require("config.fig") + require("hg").setup() + end, + } + } +else + return {} +end diff --git a/vim/.vim/prefs/google.vim b/vim/.vim/prefs/google.vim index 90f8a48..b66a6e2 100644 --- a/vim/.vim/prefs/google.vim +++ b/vim/.vim/prefs/google.vim @@ -5,36 +5,6 @@ let g:VCSCommandDisableMappings = 1 let g:signify_skip_filename_pattern = ['\.pipertmp.*'] -Glug alert -Glug csearch -" Glug! codefmt ktfmt_executable=`["/google/bin/releases/kotlin-google-eng/ktfmt/ktfmt_deploy.jar", "--google-style"]` -Glug! codefmt -Glug codefmt-google -Glug languages -" applies google coding style settings to files whitelisted as google code. probably also want -Glug googlestyle -" internal spell-checking integration and improved default configuration. -Glug googlespell -" hooks for google-internal virtual file paths such as //depot and /cns. -Glug googlepaths -" core syntax and filetype settings for google-internal filetypes. -Glug google-filetypes -Glug ft-java -Glug ft-kotlin -Glug ft-proto -Glug critique -Glug piper -Glug gtimporter -Glug blaze -let g:blazevim_quickfix_autoopen = 1 - -Glug buganizer plugin[mappings] -Glug relatedfiles plugin[mappings] -Glug g4 - -Glug outline-window -Glug fzf-query - function s:blazeExec(cmd, targets) if len(a:targets) == 0 exe VimuxRunCommand("build_target.py " . expand('%:p') . " " . a:cmd) @@ -160,11 +130,6 @@ com! -nargs=? -complete=file Blame :call G4Blame() nnoremap cc :CritiqueUnresolvedComments -" nnoremap ps :PiperSelectActiveFiles -nnoremap ps :FzfHgFiles -nnoremap pl :PiperLoadActiveAsBuffers -nnoremap po :PiperOpenPath - nmap rbs ss rb nmap yb :let @+ = join(blaze#GetTargets(), ' ') diff --git a/vim/.vimrc b/vim/.vimrc index dff03f2..c599f49 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -193,5 +193,3 @@ syntax on if filereadable(expand("~/use_google")) source ~/.vim/prefs/google.vim endif -lua require("config.imp") -