diff --git a/vim/.vim/lua/plugin_init.lua b/vim/.vim/lua/plugin_init.lua index 83de0c2..d96c3fa 100644 --- a/vim/.vim/lua/plugin_init.lua +++ b/vim/.vim/lua/plugin_init.lua @@ -17,12 +17,6 @@ local plugins = { -- this entry tells lazy.nvim to load the list of of *.lua files from plugins/ { import = "plugins" }, } -if use_google() then - table.insert(plugins, { - url = "sso://user/fentanes/nvgoog", - import = "nvgoog.default", - }) -end require("lazy").setup(plugins) require("config.clipboard") require("config.zip") diff --git a/vim/.vim/lua/plugins/cmp.lua b/vim/.vim/lua/plugins/cmp.lua index 7d6a051..526729b 100644 --- a/vim/.vim/lua/plugins/cmp.lua +++ b/vim/.vim/lua/plugins/cmp.lua @@ -80,12 +80,12 @@ return { cmp.setup.filetype("txt", { enabled = false, }) - -- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). cmp.setup.cmdline({ "/", "?" }, { mapping = cmp.mapping.preset.cmdline(), sources = cmp.config.sources({ { name = "treesitter" }, + { name = "buffer" }, }), }) diff --git a/vim/.vim/lua/plugins/google.lua b/vim/.vim/lua/plugins/google.lua index 00b8160..b53d0f4 100644 --- a/vim/.vim/lua/plugins/google.lua +++ b/vim/.vim/lua/plugins/google.lua @@ -6,16 +6,16 @@ end vim.opt.rtp:append("/google/src/head/depot/google3/experimental/users/fentanes/nvgoog/") --- local glug = require("nvgoog.google.util.glug").glug --- local glugOpts = require("nvgoog.google.util.glug").glugOpts local glug = require("glug").glug local glugOpts = require("glug").glugOpts +local superlazy = require("nvgoog.util.superlazy") return { - { url = "sso://user/fentanes/nvgoog" }, + -- { url = "sso://user/fentanes/nvgoog" }, -- Prevent long sessions from losing cwd -- Load google paths like //google/* with `gf` - { import = "nvgoog.google.misc" }, + -- { import = "nvgoog.google.misc" }, + { import = "nvgoog.google.format" }, -- maktaba is required by all google plugins glug("maktaba", { lazy = true, @@ -24,9 +24,6 @@ return { vim.cmd("source /usr/share/vim/google/glug/bootstrap.vim") end, }), - glug("logmsgs", { - event = "VeryLazy", - }), glug("googler", { event = "VeryLazy", }), @@ -41,9 +38,6 @@ return { -- Add support for google filetypes glug("google-filetypes", { event = { "BufReadPre", "BufNewFile" }, dependencies = {} }), - -- Configures nvim to respect Google's coding style - -- glug("googlestyle", { event = { "BufRead", "BufNewFile" } }), - glug("add_usings"), -- Autogens boilerplate when creating new files glug("autogen", { @@ -51,6 +45,17 @@ return { }), -- Adds G4 support to the vcscommand plugin glug("googlepaths"), + -- Set up syntax, indent, and core settings for various filetypes + superlazy(glug("ft-cpp", { event = "BufRead,BufNewFile *.[ch],*.cc,*.cpp" })), + superlazy(glug("ft-go", { event = "BufRead,BufNewFile *.go" })), + superlazy(glug("ft-java", { event = "BufRead,BufNewFile *.java" })), + superlazy(glug("ft-javascript", { event = "BufRead,BufNewFile *.js,*.jsx" })), + superlazy(glug("ft-kotlin", { event = "BufRead,BufNewFile *.kt,*.kts" })), + superlazy(glug("ft-python", { event = "BufRead,BufNewFile *.py" })), + + -- Configures nvim to respect Google's coding style + superlazy(glug("googlestyle", { event = { "BufRead", "BufNewFile" } })), + glug("ft-soy"), glug("ft-gss"), glug("ft-proto"), @@ -326,80 +331,4 @@ return { require("hg").setup() end, }, - { - { - "sakal/neoblaze.nvim", - url = "sso://user/sakal/neoblaze.nvim", - lazy = false, -- Can be disabled if you only use keybinds. - keys = { - { - "B", - desc = "Blaze", - }, - { - "Bb", - function() - require("neoblaze").build() - end, - desc = "Build", - }, - { - "Bt", - function() - require("neoblaze").test() - end, - desc = "Test", - }, - { - "Br", - function() - require("neoblaze").run() - end, - desc = "Run", - }, - { - "Bs", - function() - require("neoblaze").update_goldens() - end, - desc = "Update goldens", - }, - { - "BB", - function() - require("neoblaze").build({ blaze_exe = "iblaze" }) - end, - desc = "Build (iblaze)", - }, - { - "BT", - function() - require("neoblaze").test({ blaze_exe = "iblaze" }) - end, - desc = "Test (iblaze)", - }, - { - "BR", - function() - require("neoblaze").run({ blaze_exe = "iblaze" }) - end, - desc = "Run (iblaze)", - }, - { - "Be", - function() - require("neoblaze").retry() - end, - desc = "Retry", - }, - { - "By", - function() - require("neoblaze").yank() - end, - desc = "Yank target to system clipboard", - }, - }, - }, - }, } diff --git a/vim/.vim/lua/plugins/themes-work.lua b/vim/.vim/lua/plugins/themes-work.lua index 9876925..df33b29 100644 --- a/vim/.vim/lua/plugins/themes-work.lua +++ b/vim/.vim/lua/plugins/themes-work.lua @@ -1,31 +1,6 @@ local use_google = require("utils").use_google return { - { - "Shatur/neovim-ayu", - priority = 1000, -- make sure to load this before all the other start plugins - lazy = not use_google(), -- make sure we load this during startup if it is your main colorscheme - cond = use_google(), - config = function() - require("ayu").setup({ - mirage = false, -- Set to `true` to use `mirage` variant instead of `dark` for dark background. - overrides = {}, -- A dictionary of group names, each associated with a dictionary of parameters (`bg`, `fg`, `sp` and `style`) and colors in hex. - -- vim.cmd("colorscheme ayu"), - -- vim.cmd("colorscheme ayu-mirage"), - }) - end, - }, - { - "ramojus/mellifluous.nvim", - priority = 1000, -- make sure to load this before all the other start plugins - lazy = not use_google(), -- make sure we load this during startup if it is your main colorscheme - cond = use_google(), - config = function() - require("mellifluous").setup({ --[[...]] - }) -- optional, see configuration section. - -- vim.cmd("colorscheme mellifluous") - end, - }, { "ful1e5/onedark.nvim", priority = 1000, -- make sure to load this before all the other start plugins