nvgoog stuff?
This commit is contained in:
@ -67,29 +67,29 @@
|
|||||||
"nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" },
|
"nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" },
|
||||||
"nvim-cmp-buffer-lines": { "branch": "master", "commit": "924ccc04dc5c919b6baa05d45818025baa82699a" },
|
"nvim-cmp-buffer-lines": { "branch": "master", "commit": "924ccc04dc5c919b6baa05d45818025baa82699a" },
|
||||||
"nvim-dap": { "branch": "master", "commit": "f0dca670fa059eb89dda8869a6310c804241345c" },
|
"nvim-dap": { "branch": "master", "commit": "f0dca670fa059eb89dda8869a6310c804241345c" },
|
||||||
"nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" },
|
"nvim-dap-ui": { "branch": "master", "commit": "947660daced01c3eb673e3dc9527c988e42fe4cc" },
|
||||||
"nvim-jdtls": { "branch": "master", "commit": "66b5ace68a5d1c45fdfb1afa8d847e87af2aa1f8" },
|
"nvim-jdtls": { "branch": "master", "commit": "66b5ace68a5d1c45fdfb1afa8d847e87af2aa1f8" },
|
||||||
"nvim-lightbulb": { "branch": "master", "commit": "8f00b89dd1b1dbde16872bee5fbcee2e58c9b8e9" },
|
"nvim-lightbulb": { "branch": "master", "commit": "8f00b89dd1b1dbde16872bee5fbcee2e58c9b8e9" },
|
||||||
"nvim-lint": { "branch": "master", "commit": "4dbc7ec60b33b656f7c54bb945671a55b18699f2" },
|
"nvim-lint": { "branch": "master", "commit": "4dbc7ec60b33b656f7c54bb945671a55b18699f2" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "ce0e625df61be77abe1340fbc9afe9ad39b31dd8" },
|
"nvim-lspconfig": { "branch": "master", "commit": "ce0e625df61be77abe1340fbc9afe9ad39b31dd8" },
|
||||||
"nvim-luapad": { "branch": "master", "commit": "a5b3d6aa1fe5fe75e6124927392a9d3a60a0ecce" },
|
"nvim-luapad": { "branch": "master", "commit": "a5b3d6aa1fe5fe75e6124927392a9d3a60a0ecce" },
|
||||||
"nvim-notify": { "branch": "master", "commit": "ebcdd8219e2a2cbc0a4bef68002f6867f1fde269" },
|
"nvim-notify": { "branch": "master", "commit": "1576123bff3bed67bc673a3076e591abfe5d8ca9" },
|
||||||
"nvim-scrollbar": { "branch": "main", "commit": "35f99d559041c7c0eff3a41f9093581ceea534e8" },
|
"nvim-scrollbar": { "branch": "main", "commit": "35f99d559041c7c0eff3a41f9093581ceea534e8" },
|
||||||
"nvim-surround": { "branch": "main", "commit": "703ec63aa798e5e07d309b35e42def34bebe0174" },
|
"nvim-surround": { "branch": "main", "commit": "703ec63aa798e5e07d309b35e42def34bebe0174" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "65ef62092ef997d2ecf68ede01a0afbda17808c3" },
|
"nvim-treesitter": { "branch": "master", "commit": "0da349ed303bea955942f409d29059cdb89dbe2c" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "cff25ce621e6d15fae0b0bfe38c00be50ce38468" },
|
"nvim-web-devicons": { "branch": "master", "commit": "3e24abe1ae66532135cec911562f553fe247cb56" },
|
||||||
"omnisharp-extended-lsp.nvim": { "branch": "main", "commit": "4be2e8689067494ed7e5a4f1221adc31d1a07783" },
|
"omnisharp-extended-lsp.nvim": { "branch": "main", "commit": "4be2e8689067494ed7e5a4f1221adc31d1a07783" },
|
||||||
"onedark.nvim": { "branch": "main", "commit": "b5161f0c631571640485be5d1c059cab82c86872" },
|
"onedark.nvim": { "branch": "main", "commit": "b5161f0c631571640485be5d1c059cab82c86872" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" },
|
"plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" },
|
||||||
"refactoring.nvim": { "branch": "master", "commit": "156532476deb10b1b2a32cb38e1078b3f9951c42" },
|
"refactoring.nvim": { "branch": "master", "commit": "156532476deb10b1b2a32cb38e1078b3f9951c42" },
|
||||||
"registers.nvim": { "branch": "main", "commit": "22bb98f93a423252fffeb3531f7bc12a3e07b63f" },
|
"registers.nvim": { "branch": "main", "commit": "22bb98f93a423252fffeb3531f7bc12a3e07b63f" },
|
||||||
"rust-tools.nvim": { "branch": "master", "commit": "0cc8adab23117783a0292a0c8a2fbed1005dc645" },
|
"rust-tools.nvim": { "branch": "master", "commit": "676187908a1ce35ffcd727c654ed68d851299d3e" },
|
||||||
"scope.nvim": { "branch": "main", "commit": "cd27af77ad61a7199af5c28d27013fb956eb0e3e" },
|
"scope.nvim": { "branch": "main", "commit": "cd27af77ad61a7199af5c28d27013fb956eb0e3e" },
|
||||||
"scss-syntax.vim": { "branch": "master", "commit": "bda22a93d1dcfcb8ee13be1988560d9bb5bd0fef" },
|
"scss-syntax.vim": { "branch": "master", "commit": "bda22a93d1dcfcb8ee13be1988560d9bb5bd0fef" },
|
||||||
"tabular": { "branch": "master", "commit": "339091ac4dd1f17e225fe7d57b48aff55f99b23a" },
|
"tabular": { "branch": "master", "commit": "339091ac4dd1f17e225fe7d57b48aff55f99b23a" },
|
||||||
"tagalong.vim": { "branch": "main", "commit": "5a2bbf2b1d5b657685a49d48d98a4aa921c1fde3" },
|
"tagalong.vim": { "branch": "main", "commit": "5a2bbf2b1d5b657685a49d48d98a4aa921c1fde3" },
|
||||||
"telescope-dap.nvim": { "branch": "master", "commit": "4e2d5efb92062f0b865fe59b200b5ed7793833bf" },
|
"telescope-dap.nvim": { "branch": "master", "commit": "4e2d5efb92062f0b865fe59b200b5ed7793833bf" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "3466159b0fcc1876483f6f53587562628664d850" },
|
"telescope.nvim": { "branch": "master", "commit": "983460fb8cd864748311f4c7f0c8337091f24d59" },
|
||||||
"telescope_citc": { "branch": "main", "commit": "f0f74127e262d097119d2946634d3aa7e49b0c2f" },
|
"telescope_citc": { "branch": "main", "commit": "f0f74127e262d097119d2946634d3aa7e49b0c2f" },
|
||||||
"telescope_codesearch": { "branch": "main", "commit": "a26077ad3c68cf897ae1c31da903d6516ebb9c92" },
|
"telescope_codesearch": { "branch": "main", "commit": "a26077ad3c68cf897ae1c31da903d6516ebb9c92" },
|
||||||
"telescope_fig": { "branch": "main", "commit": "f6122fe82417ebeaddb9343cfd5584f62a4b8df8" },
|
"telescope_fig": { "branch": "main", "commit": "f6122fe82417ebeaddb9343cfd5584f62a4b8df8" },
|
||||||
|
@ -19,6 +19,7 @@ M.convertLuaToVim = function(value)
|
|||||||
end
|
end
|
||||||
error("unsupported type for value: " .. type(value))
|
error("unsupported type for value: " .. type(value))
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Allow glugin options to be set by `spec.opts`
|
-- Allow glugin options to be set by `spec.opts`
|
||||||
-- This makes configuring options locally easier
|
-- This makes configuring options locally easier
|
||||||
M.glugOpts = function(name, spec)
|
M.glugOpts = function(name, spec)
|
||||||
@ -38,6 +39,7 @@ M.glugOpts = function(name, spec)
|
|||||||
end
|
end
|
||||||
return spec
|
return spec
|
||||||
end
|
end
|
||||||
|
|
||||||
M.glug = function(name, spec)
|
M.glug = function(name, spec)
|
||||||
return M.glugOpts(
|
return M.glugOpts(
|
||||||
name,
|
name,
|
||||||
@ -54,8 +56,10 @@ end
|
|||||||
-- come before `VeryLazy`, such as `FileType` and `BufRead`.
|
-- come before `VeryLazy`, such as `FileType` and `BufRead`.
|
||||||
-- The `VeryLazy` command is fired after the UI is first loaded, using
|
-- The `VeryLazy` command is fired after the UI is first loaded, using
|
||||||
-- this helps improve app start when nvim is opened with a file.
|
-- this helps improve app start when nvim is opened with a file.
|
||||||
|
|
||||||
-- Events to check autocmds for. We target events that could fire before vim fully loads.
|
-- Events to check autocmds for. We target events that could fire before vim fully loads.
|
||||||
local events = { "BufEnter", "BufRead", "BufReadPost", "BufReadPre", "BufWinEnter", "FileType" }
|
local events = { "BufEnter", "BufRead", "BufReadPost", "BufReadPre", "BufWinEnter", "FileType" }
|
||||||
|
|
||||||
-- A unique key to help identify autocmds.
|
-- A unique key to help identify autocmds.
|
||||||
local getAutocmdKey = function(autocmd)
|
local getAutocmdKey = function(autocmd)
|
||||||
return table.concat({
|
return table.concat({
|
||||||
@ -66,6 +70,7 @@ local getAutocmdKey = function(autocmd)
|
|||||||
autocmd.buffer or "",
|
autocmd.buffer or "",
|
||||||
}, "-")
|
}, "-")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Take note of which autocmds exist before any plugins are loaded.
|
-- Take note of which autocmds exist before any plugins are loaded.
|
||||||
local existingAutocmds = {}
|
local existingAutocmds = {}
|
||||||
vim.api.nvim_create_autocmd("User", {
|
vim.api.nvim_create_autocmd("User", {
|
||||||
@ -80,14 +85,17 @@ vim.api.nvim_create_autocmd("User", {
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
M.veryLazy = function(spec)
|
M.veryLazy = function(spec)
|
||||||
local originalConfig = spec.config
|
local originalConfig = spec.config
|
||||||
|
|
||||||
return vim.tbl_extend("force", spec, {
|
return vim.tbl_extend("force", spec, {
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
config = function(plugin, opts)
|
config = function(plugin, opts)
|
||||||
if type(originalConfig) == "function" then
|
if type(originalConfig) == "function" then
|
||||||
originalConfig(plugin, opts)
|
originalConfig(plugin, opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Execute any missed autocmd events that fired before the plugin was loaded,
|
-- Execute any missed autocmd events that fired before the plugin was loaded,
|
||||||
-- and only for autocmds that were set by this plugin.
|
-- and only for autocmds that were set by this plugin.
|
||||||
for _, autocmd in pairs(vim.api.nvim_get_autocmds({ event = events })) do
|
for _, autocmd in pairs(vim.api.nvim_get_autocmds({ event = events })) do
|
||||||
@ -104,6 +112,7 @@ M.veryLazy = function(spec)
|
|||||||
vim.api.nvim_exec_autocmds(autocmd.event, { group = autocmd.group, buffer = autocmd.buffer })
|
vim.api.nvim_exec_autocmds(autocmd.event, { group = autocmd.group, buffer = autocmd.buffer })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Source any ftplugin files for opened buffers.
|
-- Source any ftplugin files for opened buffers.
|
||||||
for _, bufnr in pairs(vim.api.nvim_list_bufs()) do
|
for _, bufnr in pairs(vim.api.nvim_list_bufs()) do
|
||||||
vim.api.nvim_buf_call(bufnr, function()
|
vim.api.nvim_buf_call(bufnr, function()
|
||||||
@ -116,4 +125,5 @@ M.veryLazy = function(spec)
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
@ -1,25 +1,29 @@
|
|||||||
local use_google = require("utils").use_google
|
local use_google = require("utils").use_google
|
||||||
local glug = require("glug").glug
|
|
||||||
local glugOpts = require("glug").glugOpts
|
|
||||||
local veryLazy = require("glug").veryLazy
|
|
||||||
|
|
||||||
if not use_google() then
|
if not use_google() then
|
||||||
return {}
|
return {}
|
||||||
end
|
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 veryLazy = require("nvgoog.util").veryLazy
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{ url = "sso://user/fentanes/nvgoog" },
|
{ url = "sso://user/fentanes/nvgoog" },
|
||||||
-- Prevent long sessions from losing cwd
|
-- Prevent long sessions from losing cwd
|
||||||
-- Load google paths like //google/* with `gf`
|
-- Load google paths like //google/* with `gf`
|
||||||
{ import = "nvgoog.google.misc" },
|
{ import = "nvgoog.google.misc" },
|
||||||
-- maktaba is required by all google plugins
|
-- maktaba is required by all google plugins
|
||||||
{
|
-- maktaba is required by all google plugins
|
||||||
name = "maktaba",
|
glug("maktaba", {
|
||||||
dir = "/usr/share/vim/google/maktaba",
|
lazy = true,
|
||||||
init = function()
|
dependencies = {},
|
||||||
|
config = function() -- init?
|
||||||
vim.cmd("source /usr/share/vim/google/glug/bootstrap.vim")
|
vim.cmd("source /usr/share/vim/google/glug/bootstrap.vim")
|
||||||
end,
|
end,
|
||||||
},
|
}),
|
||||||
glug("core"),
|
glug("core"),
|
||||||
glug("glaive"),
|
glug("glaive"),
|
||||||
glug("alert"),
|
glug("alert"),
|
||||||
@ -57,10 +61,6 @@ return {
|
|||||||
event = "BufNewFile",
|
event = "BufNewFile",
|
||||||
}),
|
}),
|
||||||
-- Adds G4 support to the vcscommand plugin
|
-- Adds G4 support to the vcscommand plugin
|
||||||
glug("vcscommand-g4", {
|
|
||||||
optional = true,
|
|
||||||
lazy = true,
|
|
||||||
}),
|
|
||||||
glug("googlepaths"),
|
glug("googlepaths"),
|
||||||
glug("ft-soy"),
|
glug("ft-soy"),
|
||||||
glug("ft-gss"),
|
glug("ft-gss"),
|
||||||
|
Reference in New Issue
Block a user