Compare commits
12 Commits
f96692fba0
...
2ee005922e
Author | SHA1 | Date | |
---|---|---|---|
2ee005922e | |||
86ba911c48 | |||
74e6536138 | |||
d3035d8dee | |||
3dfc991b0e | |||
85a5490659 | |||
c80993e8f5 | |||
96e3cd913a | |||
8eb418bd82 | |||
27b63b8a41 | |||
9028ccc503 | |||
b4e5d6a60a |
15
config/.config/nvim/after/queries/markdown/highlights.csm
Normal file
15
config/.config/nvim/after/queries/markdown/highlights.csm
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
((atx_heading
|
||||||
|
(atx_h1_marker) @_h1
|
||||||
|
(_) @h1))
|
||||||
|
((atx_heading
|
||||||
|
(atx_h2_marker) @_h2
|
||||||
|
(_) @h2))
|
||||||
|
((atx_heading
|
||||||
|
(atx_h3_marker) @_h3
|
||||||
|
(_) @h3))
|
||||||
|
((atx_heading
|
||||||
|
(atx_h4_marker) @_h4
|
||||||
|
(_) @h4))
|
||||||
|
((atx_heading
|
||||||
|
(atx_h5_marker) @_h5
|
||||||
|
(_) @h5))
|
15
config/.config/nvim/after/queries/markdown/highlights.scm
Normal file
15
config/.config/nvim/after/queries/markdown/highlights.scm
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
((atx_heading
|
||||||
|
(atx_h1_marker) @_h1
|
||||||
|
(_) @h1))
|
||||||
|
((atx_heading
|
||||||
|
(atx_h2_marker) @_h2
|
||||||
|
(_) @h2))
|
||||||
|
((atx_heading
|
||||||
|
(atx_h3_marker) @_h3
|
||||||
|
(_) @h3))
|
||||||
|
((atx_heading
|
||||||
|
(atx_h4_marker) @_h4
|
||||||
|
(_) @h4))
|
||||||
|
((atx_heading
|
||||||
|
(atx_h5_marker) @_h5
|
||||||
|
(_) @h5))
|
@ -90,7 +90,7 @@ _G.packer_plugins = {
|
|||||||
url = "https://github.com/skywind3000/asyncrun.vim"
|
url = "https://github.com/skywind3000/asyncrun.vim"
|
||||||
},
|
},
|
||||||
["auto-session"] = {
|
["auto-session"] = {
|
||||||
config = { "\27LJ\2\n<EFBFBD>\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 = { "\27LJ\2\n<EFBFBD>\1\0\0\a\0\t\1\0146\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0005\3\4\0006\4\5\0009\4\6\4'\6\a\0B\4\2\0?\4\0\0=\3\b\2B\0\2\1K\0\1\0\31auto_session_suppress_dirs\tHOME\vgetenv\aos\1\4\0\0\a~/\16~/Downloads\6/\1\0\1\14log_level\nerror\nsetup\17auto-session\frequire\t<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\4\0" },
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/auto-session",
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/auto-session",
|
||||||
url = "https://github.com/rmagatti/auto-session"
|
url = "https://github.com/rmagatti/auto-session"
|
||||||
@ -136,6 +136,11 @@ _G.packer_plugins = {
|
|||||||
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/cmp-path",
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/cmp-path",
|
||||||
url = "https://github.com/hrsh7th/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"] = {
|
["cmp-under-comparator"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/cmp-under-comparator",
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/cmp-under-comparator",
|
||||||
@ -154,6 +159,12 @@ _G.packer_plugins = {
|
|||||||
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/opt/cmp_luasnip",
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/opt/cmp_luasnip",
|
||||||
url = "https://github.com/saadparwaiz1/cmp_luasnip"
|
url = "https://github.com/saadparwaiz1/cmp_luasnip"
|
||||||
},
|
},
|
||||||
|
critique = {
|
||||||
|
config = { ' require("critique").setup() ' },
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/critique",
|
||||||
|
url = "/google/src/cloud/cnieves/google-comments/google3/experimental/users/cnieves/neovim/critique"
|
||||||
|
},
|
||||||
["fidget.nvim"] = {
|
["fidget.nvim"] = {
|
||||||
config = { 'require("fidget").setup()' },
|
config = { 'require("fidget").setup()' },
|
||||||
loaded = true,
|
loaded = true,
|
||||||
@ -179,6 +190,15 @@ _G.packer_plugins = {
|
|||||||
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/opt/gitsigns.nvim",
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/opt/gitsigns.nvim",
|
||||||
url = "https://github.com/lewis6991/gitsigns.nvim"
|
url = "https://github.com/lewis6991/gitsigns.nvim"
|
||||||
},
|
},
|
||||||
|
["google-comments"] = {
|
||||||
|
cond = { true },
|
||||||
|
config = { ' require("google_comments") ' },
|
||||||
|
loaded = false,
|
||||||
|
needs_bufread = false,
|
||||||
|
only_cond = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/opt/google-comments",
|
||||||
|
url = "sso://googler@user/chmnchiang/google-comments"
|
||||||
|
},
|
||||||
["java-syntax.vim"] = {
|
["java-syntax.vim"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/java-syntax.vim",
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/java-syntax.vim",
|
||||||
@ -201,6 +221,7 @@ _G.packer_plugins = {
|
|||||||
url = "https://github.com/onsails/lspkind.nvim"
|
url = "https://github.com/onsails/lspkind.nvim"
|
||||||
},
|
},
|
||||||
["lualine.nvim"] = {
|
["lualine.nvim"] = {
|
||||||
|
config = { ' require("lualine_config") ' },
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/lualine.nvim",
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/lualine.nvim",
|
||||||
url = "https://github.com/nvim-lualine/lualine.nvim"
|
url = "https://github.com/nvim-lualine/lualine.nvim"
|
||||||
@ -239,12 +260,18 @@ _G.packer_plugins = {
|
|||||||
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/nvim-lightbulb",
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/nvim-lightbulb",
|
||||||
url = "https://github.com/kosayoda/nvim-lightbulb"
|
url = "https://github.com/kosayoda/nvim-lightbulb"
|
||||||
},
|
},
|
||||||
|
["nvim-lsp-installer"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/nvim-lsp-installer",
|
||||||
|
url = "https://github.com/williamboman/nvim-lsp-installer"
|
||||||
|
},
|
||||||
["nvim-lspconfig"] = {
|
["nvim-lspconfig"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
|
||||||
url = "https://github.com/neovim/nvim-lspconfig"
|
url = "https://github.com/neovim/nvim-lspconfig"
|
||||||
},
|
},
|
||||||
["nvim-notify"] = {
|
["nvim-notify"] = {
|
||||||
|
config = { ' require("notify_config") ' },
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/nvim-notify",
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/nvim-notify",
|
||||||
url = "https://github.com/rcarriga/nvim-notify"
|
url = "https://github.com/rcarriga/nvim-notify"
|
||||||
@ -286,8 +313,11 @@ _G.packer_plugins = {
|
|||||||
url = "https://github.com/simrat39/symbols-outline.nvim"
|
url = "https://github.com/simrat39/symbols-outline.nvim"
|
||||||
},
|
},
|
||||||
["telescope-codesearch.nvim"] = {
|
["telescope-codesearch.nvim"] = {
|
||||||
loaded = true,
|
cond = { true },
|
||||||
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/telescope-codesearch.nvim",
|
loaded = false,
|
||||||
|
needs_bufread = false,
|
||||||
|
only_cond = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/opt/telescope-codesearch.nvim",
|
||||||
url = "sso://googler@user/vintharas/telescope-codesearch.nvim"
|
url = "sso://googler@user/vintharas/telescope-codesearch.nvim"
|
||||||
},
|
},
|
||||||
["telescope.nvim"] = {
|
["telescope.nvim"] = {
|
||||||
@ -352,6 +382,11 @@ _G.packer_plugins = {
|
|||||||
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/vim-ripgrep",
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/vim-ripgrep",
|
||||||
url = "https://github.com/jremmen/vim-ripgrep"
|
url = "https://github.com/jremmen/vim-ripgrep"
|
||||||
},
|
},
|
||||||
|
["vim-searchindex"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/vim-searchindex",
|
||||||
|
url = "https://github.com/google/vim-searchindex"
|
||||||
|
},
|
||||||
["vim-signify"] = {
|
["vim-signify"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/vim-signify",
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/vim-signify",
|
||||||
@ -394,41 +429,73 @@ _G.packer_plugins = {
|
|||||||
},
|
},
|
||||||
["vim-windowswap"] = {
|
["vim-windowswap"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/vim-windowswap",
|
needs_bufread = false,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/opt/vim-windowswap",
|
||||||
url = "https://github.com/wesQ3/vim-windowswap"
|
url = "https://github.com/wesQ3/vim-windowswap"
|
||||||
},
|
},
|
||||||
vimux = {
|
vimux = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/vimux",
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/vimux",
|
||||||
url = "https://github.com/preservim/vimux"
|
url = "https://github.com/preservim/vimux"
|
||||||
|
},
|
||||||
|
["zettelkasten.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/usr/local/google/home/cnieves/.local/share/nvim/site/pack/packer/start/zettelkasten.nvim",
|
||||||
|
url = "https://github.com/Furkanzmc/zettelkasten.nvim"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
time([[Defining packer_plugins]], false)
|
time([[Defining packer_plugins]], false)
|
||||||
-- Config for: lsp_lines.nvim
|
-- Setup for: vim-windowswap
|
||||||
time([[Config for lsp_lines.nvim]], true)
|
time([[Setup for vim-windowswap]], true)
|
||||||
require("lsp_lines").setup()
|
vim.g.windowswap_map_keys = 0
|
||||||
time([[Config for lsp_lines.nvim]], false)
|
time([[Setup for vim-windowswap]], false)
|
||||||
|
time([[packadd for vim-windowswap]], true)
|
||||||
|
vim.cmd [[packadd vim-windowswap]]
|
||||||
|
time([[packadd for vim-windowswap]], false)
|
||||||
|
-- Config for: critique
|
||||||
|
time([[Config for critique]], true)
|
||||||
|
require("critique").setup()
|
||||||
|
time([[Config for critique]], false)
|
||||||
-- Config for: fidget.nvim
|
-- Config for: fidget.nvim
|
||||||
time([[Config for fidget.nvim]], true)
|
time([[Config for fidget.nvim]], true)
|
||||||
require("fidget").setup()
|
require("fidget").setup()
|
||||||
time([[Config for fidget.nvim]], false)
|
time([[Config for fidget.nvim]], false)
|
||||||
|
-- Config for: lualine.nvim
|
||||||
|
time([[Config for lualine.nvim]], true)
|
||||||
|
require("lualine_config")
|
||||||
|
time([[Config for lualine.nvim]], false)
|
||||||
-- Config for: auto-session
|
-- Config for: auto-session
|
||||||
time([[Config for auto-session]], true)
|
time([[Config for auto-session]], true)
|
||||||
try_loadstring("\27LJ\2\n<EFBFBD>\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")
|
try_loadstring("\27LJ\2\n<EFBFBD>\1\0\0\a\0\t\1\0146\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0005\3\4\0006\4\5\0009\4\6\4'\6\a\0B\4\2\0?\4\0\0=\3\b\2B\0\2\1K\0\1\0\31auto_session_suppress_dirs\tHOME\vgetenv\aos\1\4\0\0\a~/\16~/Downloads\6/\1\0\1\14log_level\nerror\nsetup\17auto-session\frequire\t<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\4\0", "config", "auto-session")
|
||||||
time([[Config for auto-session]], false)
|
time([[Config for auto-session]], false)
|
||||||
-- Config for: nvim-scrollbar
|
-- Config for: nvim-scrollbar
|
||||||
time([[Config for nvim-scrollbar]], true)
|
time([[Config for nvim-scrollbar]], true)
|
||||||
require("scrollbar").setup()
|
require("scrollbar").setup()
|
||||||
time([[Config for nvim-scrollbar]], false)
|
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
|
-- Config for: git-conflict.nvim
|
||||||
time([[Config for git-conflict.nvim]], true)
|
time([[Config for git-conflict.nvim]], true)
|
||||||
require('git-conflict').setup()
|
require('git-conflict').setup()
|
||||||
time([[Config for git-conflict.nvim]], false)
|
time([[Config for git-conflict.nvim]], false)
|
||||||
|
-- Config for: catppuccin
|
||||||
|
time([[Config for catppuccin]], true)
|
||||||
|
require("catppuccin-config")
|
||||||
|
time([[Config for catppuccin]], 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: nvim-notify
|
||||||
|
time([[Config for nvim-notify]], true)
|
||||||
|
require("notify_config")
|
||||||
|
time([[Config for nvim-notify]], false)
|
||||||
|
-- Conditional loads
|
||||||
|
time([[Conditional loading of telescope-codesearch.nvim]], true)
|
||||||
|
require("packer.load")({"telescope-codesearch.nvim"}, {}, _G.packer_plugins)
|
||||||
|
time([[Conditional loading of telescope-codesearch.nvim]], false)
|
||||||
|
time([[Conditional loading of google-comments]], true)
|
||||||
|
require("packer.load")({"google-comments"}, {}, _G.packer_plugins)
|
||||||
|
time([[Conditional loading of google-comments]], false)
|
||||||
-- Load plugins in order defined by `after`
|
-- Load plugins in order defined by `after`
|
||||||
time([[Sequenced loading]], true)
|
time([[Sequenced loading]], true)
|
||||||
vim.cmd [[ packadd LuaSnip ]]
|
vim.cmd [[ packadd LuaSnip ]]
|
||||||
@ -437,16 +504,16 @@ time([[Sequenced loading]], false)
|
|||||||
|
|
||||||
-- Command lazy-loads
|
-- Command lazy-loads
|
||||||
time([[Defining lazy-load commands]], true)
|
time([[Defining lazy-load commands]], true)
|
||||||
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file UndotreeToggle lua require("packer.load")({'undotree'}, { cmd = "UndotreeToggle", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
|
|
||||||
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file Neogit lua require("packer.load")({'neogit'}, { cmd = "Neogit", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
|
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file Neogit lua require("packer.load")({'neogit'}, { cmd = "Neogit", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
|
||||||
|
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file UndotreeToggle lua require("packer.load")({'undotree'}, { cmd = "UndotreeToggle", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
|
||||||
time([[Defining lazy-load commands]], false)
|
time([[Defining lazy-load commands]], false)
|
||||||
|
|
||||||
vim.cmd [[augroup packer_load_aucmds]]
|
vim.cmd [[augroup packer_load_aucmds]]
|
||||||
vim.cmd [[au!]]
|
vim.cmd [[au!]]
|
||||||
-- Event lazy-loads
|
-- Event lazy-loads
|
||||||
time([[Defining lazy-load event autocommands]], true)
|
time([[Defining lazy-load event autocommands]], true)
|
||||||
vim.cmd [[au VimEnter * ++once lua require("packer.load")({'vim-matchup'}, { event = "VimEnter *" }, _G.packer_plugins)]]
|
|
||||||
vim.cmd [[au User ActuallyEditing ++once lua require("packer.load")({'gitsigns.nvim'}, { event = "User ActuallyEditing" }, _G.packer_plugins)]]
|
vim.cmd [[au User ActuallyEditing ++once lua require("packer.load")({'gitsigns.nvim'}, { event = "User ActuallyEditing" }, _G.packer_plugins)]]
|
||||||
|
vim.cmd [[au VimEnter * ++once lua require("packer.load")({'vim-matchup'}, { event = "VimEnter *" }, _G.packer_plugins)]]
|
||||||
time([[Defining lazy-load event autocommands]], false)
|
time([[Defining lazy-load event autocommands]], false)
|
||||||
vim.cmd("augroup END")
|
vim.cmd("augroup END")
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ summarize.extra_args = --proxy
|
|||||||
[merge-tools]
|
[merge-tools]
|
||||||
# meld.args = --auto-merge --label='incoming' $local --label='merged' $base --label='existing' $other -o $output
|
# 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
|
# 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.args = -f -d $output -M $local $base $other -c "wincmd J" -c "set modifiable" -c "set write"
|
||||||
vimdiff.premerge = keep
|
vimdiff.premerge = keep
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
unbind C-b
|
unbind C-b
|
||||||
|
set-option -g update-environment "SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY"
|
||||||
|
|
||||||
set -g prefix C-a
|
set -g prefix C-a
|
||||||
bind C-a send-prefix
|
bind C-a send-prefix
|
||||||
@ -6,7 +7,10 @@ bind C-a send-prefix
|
|||||||
set -g prefix `
|
set -g prefix `
|
||||||
bind-key ` send-prefix
|
bind-key ` send-prefix
|
||||||
|
|
||||||
|
# Tick -> Ctrl-A, sets prefix to Ctrl-A
|
||||||
bind-key C-a set-option -g prefix C-a
|
bind-key C-a set-option -g prefix C-a
|
||||||
|
|
||||||
|
# Ctrl-A -> Ctrl-b, sets prefix to Tick
|
||||||
bind-key C-b set-option -g prefix `
|
bind-key C-b set-option -g prefix `
|
||||||
|
|
||||||
set-option -g history-limit 100000000
|
set-option -g history-limit 100000000
|
||||||
|
34
tmux/.tmux/plugins/tmux/.editorconfig
Normal file
34
tmux/.tmux/plugins/tmux/.editorconfig
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# EditorConfig helps developers define and maintain consistent
|
||||||
|
# coding styles between different editors and IDEs
|
||||||
|
# EditorConfig is awesome: https://EditorConfig.org
|
||||||
|
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
indent_size = 2
|
||||||
|
indent_style = space
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
# go
|
||||||
|
[*.go]
|
||||||
|
indent_style = tab
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
# python
|
||||||
|
[*.{ini,py,py.tpl,rst}]
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
# rust
|
||||||
|
[*.rs]
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
# documentation, utils
|
||||||
|
[*.{md,mdx,diff}]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
|
# windows shell scripts
|
||||||
|
[*.{cmd,bat,ps1}]
|
||||||
|
end_of_line = crlf
|
11
vim/.vim/after/syntax/markdown.vim
Normal file
11
vim/.vim/after/syntax/markdown.vim
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
" rainbow markdown
|
||||||
|
highlight h1 guifg=#50fa7b gui=bold
|
||||||
|
highlight _h1 guifg=#50fa7b gui=nocombine
|
||||||
|
highlight h2 guifg=#ff79c6 gui=bold
|
||||||
|
highlight _h2 guifg=#ff79c6 gui=nocombine
|
||||||
|
highlight h3 guifg=#ffb86c gui=bold
|
||||||
|
highlight _h3 guifg=#ffb86c gui=nocombine
|
||||||
|
highlight h4 guifg=#8be9fd gui=bold
|
||||||
|
highlight _h4 guifg=#8be9fd gui=nocombine
|
||||||
|
highlight h5 guifg=#f1fa8c gui=bold
|
||||||
|
highlight _h5 guifg=#f1fa8c gui=nocombine
|
@ -2,7 +2,7 @@ vim.g.catppuccin_flavour = "macchiato" -- latte, frappe, macchiato, mocha
|
|||||||
local colors = require("catppuccin.palettes").get_palette()
|
local colors = require("catppuccin.palettes").get_palette()
|
||||||
|
|
||||||
require("catppuccin").setup({
|
require("catppuccin").setup({
|
||||||
-- flavour = "macchiato",
|
flavour = "macchiato",
|
||||||
integrations = {
|
integrations = {
|
||||||
cmp = true,
|
cmp = true,
|
||||||
-- coc_nvim = false,
|
-- coc_nvim = false,
|
||||||
@ -26,7 +26,7 @@ require("catppuccin").setup({
|
|||||||
-- nvimtree = true,
|
-- nvimtree = true,
|
||||||
-- overseer = false,
|
-- overseer = false,
|
||||||
-- pounce = false,
|
-- pounce = false,
|
||||||
symbols_outline = true,
|
symbols_outline = true,
|
||||||
telescope = true,
|
telescope = true,
|
||||||
treesitter = true,
|
treesitter = true,
|
||||||
-- treesitter_context = false,
|
-- treesitter_context = false,
|
||||||
|
@ -1,40 +1,37 @@
|
|||||||
-- Here are all the options and their default values:
|
-- Here are all the options and their default values:
|
||||||
require('google.comments').setup {
|
require('google.comments').setup {
|
||||||
-- The command for fetching comments, refer to `get_comments.par --help` to
|
-- The command for fetching comments, refer to `get_comments.par --help` to
|
||||||
-- see all the options.
|
-- see all the options.
|
||||||
-- command = {'/google/bin/releases/editor-devtools/get_comments.par', '--full', '--json', "-x=''"},
|
-- command = {'/google/bin/releases/editor-devtools/get_comments.par', '--full', '--json', "-x=''"},
|
||||||
command = {'/google/bin/releases/editor-devtools/get_comments.par', '--json', '--full', '--noresolved', '--cl_comments', '--file_comments', '--unreplied_only', ' -x ""'},
|
stubby = true,
|
||||||
-- Define your own icon by `vim.fn.sign_define('ICON_NAME', {text = ' '})`.
|
--
|
||||||
-- See :help sign_define
|
command = {'/google/bin/releases/editor-devtools/get_comments.par', '--json', '--full', '--noresolved', '--cl_comments', '--file_comments'},
|
||||||
-- The sign property passed to setup should be the 'ICON_NAME' in the define
|
-- /google/bin/releases/editor-devtools/get_comments.par --json --full --noresolved --cl_comments --file_comments -x "" --cl 487267122
|
||||||
-- example above.
|
-- command = {'stubby --output_json call blade:codereview-rpc CodereviewRpcService.GetComments "changelist_number: $(/google/data/ro/teams/fig/bin/vcstool pending-change-number)"'},
|
||||||
sign = 'COMMENT_ICON',
|
-- Define your own icon by `vim.fn.sign_define('ICON_NAME', {text = ' '})`.
|
||||||
-- Fetch the comments after calling `setup`.
|
-- See :help sign_define
|
||||||
auto_fetch = true,
|
-- The sign property passed to setup should be the 'ICON_NAME' in the define
|
||||||
display = {
|
-- example above.
|
||||||
-- The width of the comment display window.
|
sign = 'COMMENT_ICON',
|
||||||
width = 50,
|
-- Fetch the comments after calling `setup`.
|
||||||
-- When showing file paths, use relative paths or not.
|
auto_fetch = true,
|
||||||
relative_path = true,
|
display = {
|
||||||
},
|
-- The width of the comment display window.
|
||||||
--- Enable viewing comments through floating window
|
width = 50,
|
||||||
floating = true,
|
-- When showing file paths, use relative paths or not.
|
||||||
--- Options used when creating the floating window.
|
relative_path = true,
|
||||||
floating_window_options = require('google.comments.options')
|
},
|
||||||
.default_floating_window_options,
|
--- Enable viewing comments through floating window
|
||||||
|
floating = true,
|
||||||
|
--- Options used when creating the floating window.
|
||||||
|
floating_window_options = require('google.comments.options').default_floating_window_options,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local map = require("utils").map
|
||||||
-- here are some mappings you might want:
|
-- here are some mappings you might want:
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>nc',
|
map('n', '<Leader>nc', [[<Cmd>lua require('google.comments').goto_next_comment()<CR>]])
|
||||||
[[<Cmd>lua require('google.comments').goto_next_comment()<CR>]],
|
map('n', '<Leader>pc', [[<Cmd>lua require('google.comments').goto_prev_comment()<CR>]])
|
||||||
{ noremap = true, silent = true })
|
map('n', '<Leader>lc', [[<Cmd>lua require('google.comments').toggle_line_comments()<CR>]])
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>pc',
|
map('n', '<Leader>ac', [[<Cmd>lua require('google.comments').toggle_all_comments()<CR>]])
|
||||||
[[<Cmd>lua require('google.comments').goto_prev_comment()<CR>]],
|
|
||||||
{ noremap = true, silent = true })
|
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>lc',
|
|
||||||
[[<Cmd>lua require('google.comments').toggle_line_comments()<CR>]],
|
|
||||||
{ noremap = true, silent = true })
|
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>ac',
|
|
||||||
[[<Cmd>lua require('google.comments').toggle_all_comments()<CR>]],
|
|
||||||
{ noremap = true, silent = true })
|
|
||||||
|
|
||||||
vim.fn.sign_define('COMMENT_ICON', {text = ''})
|
vim.fn.sign_define('COMMENT_ICON', {text = ''})
|
||||||
|
@ -4,7 +4,7 @@ local configs = require("lspconfig.configs")
|
|||||||
local notify = require 'notify'
|
local notify = require 'notify'
|
||||||
configs.ciderlsp = {
|
configs.ciderlsp = {
|
||||||
default_config = {
|
default_config = {
|
||||||
cmd = { "/google/bin/releases/cider/ciderlsp/ciderlsp", "--tooltag=nvim-cmp", "--forward_sync_responses", "--enable_semantic_tokens", "--relay_mode=true", "--hub_addr=blade:languageservices-staging" ,"--enable_document_highlight"},
|
cmd = { "/google/bin/releases/cider/ciderlsp/ciderlsp", "--tooltag=nvim-cmp", "--forward_sync_responses" },
|
||||||
-- cmd = {'/google/bin/releases/cider/ciderlsp/ciderlsp', '--forward_sync_responses', '--enable_document_highlight'};
|
-- cmd = {'/google/bin/releases/cider/ciderlsp/ciderlsp', '--forward_sync_responses', '--enable_document_highlight'};
|
||||||
filetypes = { "c", "cpp", "java", "kotlin", "objc", "proto", "textproto", "go", "python", "bzl" },
|
filetypes = { "c", "cpp", "java", "kotlin", "objc", "proto", "textproto", "go", "python", "bzl" },
|
||||||
root_dir = lspconfig.util.root_pattern("BUILD"),
|
root_dir = lspconfig.util.root_pattern("BUILD"),
|
||||||
@ -105,6 +105,15 @@ cmp.setup({
|
|||||||
{ name = 'nvim_lsp_signature_help' },
|
{ name = 'nvim_lsp_signature_help' },
|
||||||
{ name = 'nvim_ciderlsp', priority = 9 },
|
{ name = 'nvim_ciderlsp', priority = 9 },
|
||||||
{ name = "buffer", keyword_length = 5 },
|
{ name = "buffer", keyword_length = 5 },
|
||||||
|
{
|
||||||
|
name = 'spell',
|
||||||
|
option = {
|
||||||
|
keep_all_entries = false,
|
||||||
|
enable_in_context = function()
|
||||||
|
return true
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
sorting = {
|
sorting = {
|
||||||
@ -238,7 +247,7 @@ local on_attach = function(client, bufnr)
|
|||||||
|
|
||||||
vim.api.nvim_command("augroup LSP")
|
vim.api.nvim_command("augroup LSP")
|
||||||
vim.api.nvim_command("autocmd!")
|
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 <buffer> lua vim.lsp.buf.document_highlight()")
|
vim.api.nvim_command("autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()")
|
||||||
vim.api.nvim_command("autocmd CursorHoldI <buffer> lua vim.lsp.buf.document_highlight()")
|
vim.api.nvim_command("autocmd CursorHoldI <buffer> lua vim.lsp.buf.document_highlight()")
|
||||||
vim.api.nvim_command("autocmd CursorMoved <buffer> lua vim.lsp.util.buf_clear_references()")
|
vim.api.nvim_command("autocmd CursorMoved <buffer> lua vim.lsp.util.buf_clear_references()")
|
||||||
|
@ -30,6 +30,19 @@ local function getLightbulb()
|
|||||||
return require('nvim-lightbulb').get_status_text()
|
return require('nvim-lightbulb').get_status_text()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function getLGTMs()
|
||||||
|
local comments = require("google.comments")
|
||||||
|
local tracker = require("google.comments.tracker")
|
||||||
|
local dump = require("utils").dump
|
||||||
|
|
||||||
|
print(dump(tracker.get_all_comments()))
|
||||||
|
local lgtm = comments.get_lgtms()
|
||||||
|
local appr = comments.get_approvals()
|
||||||
|
print("lgtms"..dump(lgtm))
|
||||||
|
print("approvals"..dump(appr))
|
||||||
|
return "LGTM:"..table.concat(lgtm, ",").." Approval:"..table.concat(appr, ",")
|
||||||
|
end
|
||||||
|
|
||||||
require('lualine').setup {
|
require('lualine').setup {
|
||||||
options = {
|
options = {
|
||||||
theme = 'auto',
|
theme = 'auto',
|
||||||
@ -44,34 +57,42 @@ require('lualine').setup {
|
|||||||
lualine_a = {'mode'},
|
lualine_a = {'mode'},
|
||||||
lualine_b = {'branch', 'diff', getCitc, isCiderLspAttached},
|
lualine_b = {'branch', 'diff', getCitc, isCiderLspAttached},
|
||||||
lualine_c = {'filename', {"aerial", depth=-1}, getLightbulb},
|
lualine_c = {'filename', {"aerial", depth=-1}, getLightbulb},
|
||||||
lualine_x = {'filetype'},
|
|
||||||
lualine_x = {
|
lualine_x = {
|
||||||
{ 'diagnostics', sources = {"nvim_lsp"}, symbols = {error = ' ', warn = ' ', info = ' ', hint = ' '} },
|
{ 'diagnostics', sources = {"nvim_lsp"}, symbols = {error = ' ', warn = ' ', info = ' ', hint = ' '} },
|
||||||
'encoding',
|
'encoding',
|
||||||
'filetype'
|
'filetype'
|
||||||
},
|
},
|
||||||
lualine_y = {},
|
lualine_y = {'searchcount'},
|
||||||
lualine_z = {'location'}
|
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 = ' '} },
|
||||||
|
},
|
||||||
|
-- lualine_y = { getLGTMs }
|
||||||
|
},
|
||||||
-- default
|
-- default
|
||||||
-- sections = {
|
-- sections = {
|
||||||
-- lualine_a = {'mode'},
|
-- lualine_a = {'mode'},
|
||||||
-- lualine_b = {'branch', 'diff', 'diagnostics'},
|
-- lualine_b = {'branch', 'diff', 'diagnostics'},
|
||||||
-- lualine_c = {'filename'},
|
-- lualine_c = {'filename'},
|
||||||
-- lualine_x = {'encoding', 'fileformat', 'filetype'},
|
-- lualine_x = {'encoding', 'fileformat', 'filetype'},
|
||||||
-- lualine_y = {'progress'},
|
-- lualine_y = {'progress'},
|
||||||
-- lualine_z = {'location'}
|
-- lualine_z = {'location'}
|
||||||
-- },
|
-- },
|
||||||
inactive_sections = {
|
inactive_sections = {
|
||||||
lualine_a = {},
|
lualine_a = {},
|
||||||
lualine_b = {},
|
lualine_b = {},
|
||||||
-- lualine_c = {'filename'},
|
-- lualine_c = {'filename'},
|
||||||
lualine_x = {'location'},
|
lualine_x = {'location'},
|
||||||
lualine_y = {},
|
lualine_y = {},
|
||||||
lualine_z = {}
|
lualine_z = {}
|
||||||
},
|
},
|
||||||
-- tabline = {},
|
-- tabline = {},
|
||||||
-- winbar = {},
|
-- winbar = {},
|
||||||
-- inactive_winbar = {},
|
-- inactive_winbar = {},
|
||||||
-- extensions = {}
|
-- extensions = {}
|
||||||
}
|
}
|
||||||
|
@ -2,3 +2,4 @@ local colors = require("catppuccin.palettes").get_palette()
|
|||||||
require("notify").setup({
|
require("notify").setup({
|
||||||
background_colour = colors.base,
|
background_colour = colors.base,
|
||||||
})
|
})
|
||||||
|
vim.notify = require("notify")
|
||||||
|
4
vim/.vim/lua/orgconfig.lua
Normal file
4
vim/.vim/lua/orgconfig.lua
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
require('orgmode').setup({
|
||||||
|
org_agenda_files = {'~/org/*'},
|
||||||
|
org_default_notes_file = '~/org/refile.org',
|
||||||
|
})
|
@ -5,12 +5,15 @@ if fn.empty(fn.glob(install_path)) > 0 then
|
|||||||
vim.o.runtimepath = vim.fn.stdpath('data') .. '/site/pack/*/start/*,' .. vim.o.runtimepath
|
vim.o.runtimepath = vim.fn.stdpath('data') .. '/site/pack/*/start/*,' .. vim.o.runtimepath
|
||||||
end
|
end
|
||||||
|
|
||||||
local packerGroup = vim.api.nvim_create_augroup("packer_auto_compile", { clear = true })
|
vim.cmd([[
|
||||||
vim.api.nvim_create_autocmd("BufWritePost", {
|
augroup packer_user_config
|
||||||
pattern = "*/vim/lua/plugins.lua",
|
autocmd!
|
||||||
command = "luafile <afile> | PackerCompile",
|
autocmd BufWritePost plugins.lua source <afile> | PackerCompile
|
||||||
group = packerGroup,
|
augroup end
|
||||||
})
|
]])
|
||||||
|
|
||||||
|
|
||||||
|
local file_exists = require("utils").file_exists
|
||||||
|
|
||||||
require('packer').startup(function(use)
|
require('packer').startup(function(use)
|
||||||
-- Packer can manage itself
|
-- Packer can manage itself
|
||||||
@ -26,6 +29,11 @@ require('packer').startup(function(use)
|
|||||||
}
|
}
|
||||||
|
|
||||||
use 'nvim-lua/plenary.nvim'
|
use 'nvim-lua/plenary.nvim'
|
||||||
|
-- use 'vimwiki/vimwiki'
|
||||||
|
-- use 'michal-h21/vim-zettel'
|
||||||
|
use 'Furkanzmc/zettelkasten.nvim'
|
||||||
|
|
||||||
|
use 'google/vim-searchindex'
|
||||||
|
|
||||||
-- Pretty symbols
|
-- Pretty symbols
|
||||||
use 'kyazdani42/nvim-web-devicons'
|
use 'kyazdani42/nvim-web-devicons'
|
||||||
@ -41,7 +49,9 @@ require('packer').startup(function(use)
|
|||||||
'hrsh7th/cmp-nvim-lsp',
|
'hrsh7th/cmp-nvim-lsp',
|
||||||
'hrsh7th/cmp-buffer',
|
'hrsh7th/cmp-buffer',
|
||||||
'lukas-reineke/cmp-under-comparator',
|
'lukas-reineke/cmp-under-comparator',
|
||||||
|
'williamboman/nvim-lsp-installer',
|
||||||
'hrsh7th/cmp-cmdline',
|
'hrsh7th/cmp-cmdline',
|
||||||
|
'f3fora/cmp-spell',
|
||||||
'hrsh7th/cmp-nvim-lsp-document-symbol',
|
'hrsh7th/cmp-nvim-lsp-document-symbol',
|
||||||
'hrsh7th/cmp-nvim-lsp-signature-help',
|
'hrsh7th/cmp-nvim-lsp-signature-help',
|
||||||
'hrsh7th/cmp-nvim-lua',
|
'hrsh7th/cmp-nvim-lua',
|
||||||
@ -60,7 +70,7 @@ require('packer').startup(function(use)
|
|||||||
use { 'ErichDonGubler/lsp_lines.nvim', config = [[require("lsp_lines").setup()]] }
|
use { 'ErichDonGubler/lsp_lines.nvim', config = [[require("lsp_lines").setup()]] }
|
||||||
|
|
||||||
use 'jghauser/mkdir.nvim'
|
use 'jghauser/mkdir.nvim'
|
||||||
use 'simrat39/symbols-outline.nvim'
|
use { 'simrat39/symbols-outline.nvim' }
|
||||||
use { 'petertriho/nvim-scrollbar', config = [[require("scrollbar").setup()]] }
|
use { 'petertriho/nvim-scrollbar', config = [[require("scrollbar").setup()]] }
|
||||||
|
|
||||||
use {
|
use {
|
||||||
@ -73,13 +83,38 @@ require('packer').startup(function(use)
|
|||||||
config = function()
|
config = function()
|
||||||
require("auto-session").setup {
|
require("auto-session").setup {
|
||||||
log_level = "error",
|
log_level = "error",
|
||||||
auto_session_suppress_dirs = { "~/", "~/Downloads", "/"},
|
auto_session_suppress_dirs = { "~/", "~/Downloads", "/", os.getenv("HOME")},
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
use 'sso://googler@user/vintharas/telescope-codesearch.nvim'
|
|
||||||
use 'nvim-lualine/lualine.nvim'
|
use {
|
||||||
use 'rcarriga/nvim-notify'
|
'sso://googler@user/vintharas/telescope-codesearch.nvim',
|
||||||
|
cond = file_exists(os.getenv("HOME").."/use_google"),
|
||||||
|
}
|
||||||
|
|
||||||
|
use {
|
||||||
|
'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',
|
||||||
|
cond = file_exists(os.getenv("HOME").."/use_google"),
|
||||||
|
requires = {'rcarriga/nvim-notify', 'nvim-lua/plenary.nvim'},
|
||||||
|
config = [[ require("google_comments") ]]
|
||||||
|
}
|
||||||
|
|
||||||
|
use {
|
||||||
|
'/google/src/cloud/cnieves/google-comments/google3/experimental/users/cnieves/neovim/critique',
|
||||||
|
config = [[ require("critique").setup() ]]
|
||||||
|
}
|
||||||
|
|
||||||
|
use {
|
||||||
|
'nvim-lualine/lualine.nvim',
|
||||||
|
config = [[ require("lualine_config") ]]
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'rcarriga/nvim-notify',
|
||||||
|
config = [[ require("notify_config") ]]
|
||||||
|
}
|
||||||
|
|
||||||
-- Git
|
-- Git
|
||||||
use {
|
use {
|
||||||
@ -132,7 +167,10 @@ require('packer').startup(function(use)
|
|||||||
use 'tmux-plugins/vim-tmux-focus-events'
|
use 'tmux-plugins/vim-tmux-focus-events'
|
||||||
use 'tpope/vim-obsession'
|
use 'tpope/vim-obsession'
|
||||||
use 'Valloric/MatchTagAlways'
|
use 'Valloric/MatchTagAlways'
|
||||||
use 'wesQ3/vim-windowswap'
|
use {
|
||||||
|
'wesQ3/vim-windowswap',
|
||||||
|
setup = [[ vim.g.windowswap_map_keys = 0 ]]
|
||||||
|
}
|
||||||
|
|
||||||
use 'tpope/vim-surround'
|
use 'tpope/vim-surround'
|
||||||
use 'scrooloose/nerdcommenter'
|
use 'scrooloose/nerdcommenter'
|
||||||
@ -154,9 +192,8 @@ require("lsp")
|
|||||||
require("diagnostics")
|
require("diagnostics")
|
||||||
require("treesitter")
|
require("treesitter")
|
||||||
require("telescope_config")
|
require("telescope_config")
|
||||||
require("lualine_config")
|
|
||||||
require("notify_config")
|
|
||||||
require("symbols-outline-config")
|
require("symbols-outline-config")
|
||||||
|
require("spell_config")
|
||||||
|
|
||||||
-- redundant w/ lsp_lines
|
-- redundant w/ lsp_lines
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
|
2
vim/.vim/lua/spell_config.lua
Normal file
2
vim/.vim/lua/spell_config.lua
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
vim.opt.spell = true
|
||||||
|
vim.opt.spelllang = { 'en_us' }
|
@ -19,5 +19,6 @@ require("symbols-outline").setup(
|
|||||||
)
|
)
|
||||||
|
|
||||||
local map = require("utils").map
|
local map = require("utils").map
|
||||||
|
|
||||||
|
|
||||||
map('n', '<leader>so', ':SymbolsOutline<cr>')
|
map('n', '<leader>so', ':SymbolsOutline<cr>')
|
||||||
map('n', '<leader>o', ':SymbolsOutline<cr>')
|
|
||||||
|
@ -1,21 +1,31 @@
|
|||||||
require('nvim-treesitter.configs').setup {
|
require('nvim-treesitter.configs').setup {
|
||||||
-- A list of parser names, or "all"
|
-- A list of parser names, or "all"
|
||||||
-- ensure_installed = { "c", "lua", "vim", "java", "kotlin"},
|
-- ensure_installed = { "c", "lua", "vim", "java", "kotlin"},
|
||||||
ensure_installed = "all",
|
ensure_installed = "all",
|
||||||
|
|
||||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||||
sync_install = false,
|
sync_install = false,
|
||||||
|
|
||||||
highlight = {
|
highlight = {
|
||||||
-- `false` will disable the whole extension
|
-- `false` will disable the whole extension
|
||||||
enable = true,
|
enable = true,
|
||||||
|
|
||||||
disable = {"java"},
|
-- rainbow markdown
|
||||||
|
custom_captures = {
|
||||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
["h1"] = "h1",
|
||||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
["_h1"] = "_h1",
|
||||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
["h2"] = "h2",
|
||||||
-- Instead of true it can also be a list of languages
|
["_h2"] = "_h2",
|
||||||
additional_vim_regex_highlighting = false,
|
["h3"] = "h3",
|
||||||
},
|
["_h3"] = "_h3",
|
||||||
|
["h4"] = "h4",
|
||||||
|
["_h4"] = "_h4",
|
||||||
|
["h5"] = "h5",
|
||||||
|
["_h5"] = "_h5",
|
||||||
|
},
|
||||||
|
indent = {
|
||||||
|
enable = true
|
||||||
|
},
|
||||||
|
disable = {"java"},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
@ -8,4 +8,22 @@ function M.map(mode, lhs, rhs, opts)
|
|||||||
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
|
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function M.file_exists(name)
|
||||||
|
local f=io.open(name,"r")
|
||||||
|
if f~=nil then io.close(f) return true else return false end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.dump(o)
|
||||||
|
if type(o) == 'table' then
|
||||||
|
local s = '{ '
|
||||||
|
for k,v in pairs(o) do
|
||||||
|
if type(k) ~= 'number' then k = '"'..k..'"' end
|
||||||
|
s = s .. '['..k..'] = ' .. dump(v) .. ','
|
||||||
|
end
|
||||||
|
return s .. '} '
|
||||||
|
else
|
||||||
|
return tostring(o)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
Submodule vim/.vim/plugged/vim-signify deleted from 8bc268c79d
82
vim/.vim/prefs/'
Normal file
82
vim/.vim/prefs/'
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
-- Imports the plugin's additional Lua modules.
|
||||||
|
-- local fetch = require("example-plugin.fetch")
|
||||||
|
-- local update = require("example-plugin.update")
|
||||||
|
|
||||||
|
-- Creates an object for the module. All of the module's
|
||||||
|
-- functions are associated with this object, which is
|
||||||
|
-- returned when the module is called with `require`.
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
-- Routes calls made to this module to functions in the
|
||||||
|
-- plugin's other modules.
|
||||||
|
-- M.fetch_todos = fetch.fetch_todos
|
||||||
|
-- M.insert_todo = update.insert_todo
|
||||||
|
-- M.complete_todo = update.complete_todo
|
||||||
|
|
||||||
|
function M.setup()
|
||||||
|
vim.api.nvim_create_user_command('CritiqueHelloWorld', M.hello_world, {})
|
||||||
|
-- vim.api.nvim_create_user_command('CritiqueOpenTree', M.open_window, {})
|
||||||
|
end
|
||||||
|
|
||||||
|
local buf, win
|
||||||
|
|
||||||
|
function M.hello_world()
|
||||||
|
vim.notify("HELLO WORLD!!!")
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.open_window()
|
||||||
|
buf = vim.api.nvim_create_buf(false, true) -- create new emtpy buffer
|
||||||
|
|
||||||
|
vim.api.nvim_buf_set_option(buf, 'bufhidden', 'wipe')
|
||||||
|
|
||||||
|
-- get dimensions
|
||||||
|
local width = vim.api.nvim_get_option("columns")
|
||||||
|
local height = vim.api.nvim_get_option("lines")
|
||||||
|
|
||||||
|
-- calculate our floating window size
|
||||||
|
local win_height = math.ceil(height * 0.8 - 4)
|
||||||
|
local win_width = math.ceil(width * 0.8)
|
||||||
|
|
||||||
|
-- and its starting position
|
||||||
|
local row = math.ceil((height - win_height) / 2 - 1)
|
||||||
|
local col = math.ceil((width - win_width) / 2)
|
||||||
|
|
||||||
|
-- set some options
|
||||||
|
local opts = {
|
||||||
|
style = "minimal",
|
||||||
|
relative = "editor",
|
||||||
|
width = win_width,
|
||||||
|
height = win_height,
|
||||||
|
row = row,
|
||||||
|
col = col
|
||||||
|
}
|
||||||
|
|
||||||
|
-- and finally create it with buffer attached
|
||||||
|
win = vim.api.nvim_open_win(buf, true, opts)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function update_view()
|
||||||
|
-- we will use vim systemlist function which run shell
|
||||||
|
-- command and return result as list
|
||||||
|
local result = vim.fn.systemlist('hg xl')
|
||||||
|
|
||||||
|
-- with small indentation results will look better
|
||||||
|
for k,v in pairs(result) do
|
||||||
|
result[k] = ' '..result[k]
|
||||||
|
end
|
||||||
|
|
||||||
|
api.nvim_buf_set_lines(buf, 0, -1, false, {
|
||||||
|
center('Critique'),
|
||||||
|
''
|
||||||
|
})
|
||||||
|
|
||||||
|
api.nvim_buf_set_lines(buf, 0, -1, false, result)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function center(str)
|
||||||
|
local width = api.nvim_win_get_width(0)
|
||||||
|
local shift = math.floor(width / 2) - math.floor(string.len(str) / 2)
|
||||||
|
return string.rep(' ', shift) .. str
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
@ -1,76 +0,0 @@
|
|||||||
" AirLine visual settings
|
|
||||||
if !exists('g:airline_symbols')
|
|
||||||
let g:airline_symbols = {}
|
|
||||||
endif
|
|
||||||
|
|
||||||
let g:airline_theme='onedark'
|
|
||||||
" let g:airline_stl_path_style = 'short'
|
|
||||||
|
|
||||||
let g:airline#extensions#coc#enabled = 1
|
|
||||||
|
|
||||||
let g:airline_left_sep=''
|
|
||||||
let g:airline_left_alt_sep = ''
|
|
||||||
let g:airline_right_sep=''
|
|
||||||
let g:airline_right_alt_sep = ''
|
|
||||||
let g:airline_symbols.branch = ''
|
|
||||||
let g:airline_symbols.readonly = ''
|
|
||||||
let g:airline_symbols.dirty = ''
|
|
||||||
let g:airline_symbols.linenr = ''
|
|
||||||
"let g:airline_symbols.whitespace = 'Ξ'
|
|
||||||
let g:airline_powerline_fonts = 1
|
|
||||||
let g:airline#extensions#tabline#enabled = 1
|
|
||||||
let g:airline#extensions#tabline#formatter = 'unique_tail_improved'
|
|
||||||
let g:airline#extensions#tabline#show_buffers = 0
|
|
||||||
let g:airline#extensions#tabline#show_splits = 1
|
|
||||||
let g:airline#extensions#tabline#show_tabs = 1
|
|
||||||
let g:airline#extensions#tabline#show_tab_nr = 0
|
|
||||||
let g:airline#extensions#tabline#show_tab_type = 0
|
|
||||||
let g:airline#extensions#tabline#exclude_preview = 1
|
|
||||||
let g:airline#extensions#tabline#show_close_button = 0
|
|
||||||
let g:airline#extensions#tabline#fnamemod = ':t'
|
|
||||||
|
|
||||||
lua << EOF
|
|
||||||
function getCitc()
|
|
||||||
local fname = vim.api.nvim_buf_get_name(0)
|
|
||||||
if string.find(fname, '/google/src/cloud/', 1, true) then
|
|
||||||
local parts = split(fname, '/')
|
|
||||||
return parts[5]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
EOF
|
|
||||||
|
|
||||||
" let g:airline_section_c = execute("lua getCitc()")
|
|
||||||
let g:airline_mode_map = {
|
|
||||||
\ '__' : '------',
|
|
||||||
\ 'n' : 'NORMAL',
|
|
||||||
\ 'c' : 'COMMAND',
|
|
||||||
\ 'i' : 'INSERT',
|
|
||||||
\ 'R' : 'REPLACE',
|
|
||||||
\ 's' : 'SELECT',
|
|
||||||
\ 'S' : 'S-LINE',
|
|
||||||
\ '' : 'S-BLOCK',
|
|
||||||
\ 'v' : 'VISUAL',
|
|
||||||
\ 'V' : 'V-LINE',
|
|
||||||
\ '' : 'V-BLOCK',
|
|
||||||
\ }
|
|
||||||
|
|
||||||
let g:PaperColor_Theme_Options = {
|
|
||||||
\ 'language': {
|
|
||||||
\ 'python': {
|
|
||||||
\ 'highlight_builtins' : 1
|
|
||||||
\ },
|
|
||||||
\ 'cpp': {
|
|
||||||
\ 'highlight_standard_library': 1
|
|
||||||
\ },
|
|
||||||
\ 'c': {
|
|
||||||
\ 'highlight_builtins' : 1
|
|
||||||
\ }
|
|
||||||
\ },
|
|
||||||
\ 'theme': {
|
|
||||||
\ 'default.dark': {
|
|
||||||
\ 'transparent_background': 1
|
|
||||||
\ }
|
|
||||||
\ }
|
|
||||||
\ }
|
|
||||||
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
|||||||
function! s:FindProjectRoot(buffer) abort
|
|
||||||
for l:path in ale#path#Upwards(expand('#' . a:buffer . ':p:h'))
|
|
||||||
if filereadable(l:path . '/BUILD')
|
|
||||||
return l:path
|
|
||||||
endif
|
|
||||||
endfor
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
let ciderlsp = {
|
|
||||||
\ 'name': 'CiderLSP',
|
|
||||||
\ 'lsp': 'stdio',
|
|
||||||
\ 'executable': '/google/bin/releases/cider/ciderlsp/ciderlsp',
|
|
||||||
\ 'command': '%e --noforward_sync_responses',
|
|
||||||
\ 'project_root': function('s:FindProjectRoot'),
|
|
||||||
\}
|
|
||||||
|
|
||||||
call ale#linter#Define('java', ciderlsp)
|
|
||||||
let g:ale_lint_on_save = 1
|
|
||||||
let g:ale_detail_to_floating_preview = 1
|
|
||||||
let g:ale_linters={'java': ['CiderLSP']}
|
|
||||||
let g:ale_completion_enabled = 1
|
|
@ -1,53 +0,0 @@
|
|||||||
Plug 'prabirshrestha/vim-lsp'
|
|
||||||
Plug 'prabirshrestha/asyncomplete.vim'
|
|
||||||
Plug 'prabirshrestha/asyncomplete-lsp.vim'
|
|
||||||
|
|
||||||
au User lsp_setup call lsp#register_server({
|
|
||||||
\ 'name': 'CiderLSP',
|
|
||||||
\ 'cmd': {server_info->[
|
|
||||||
\ '/google/bin/releases/cider/ciderlsp/ciderlsp',
|
|
||||||
\ '--tooltag=vim-lsp',
|
|
||||||
\ '--noforward_sync_responses',
|
|
||||||
\ '-hub_addr=blade:languageservices-staging'
|
|
||||||
\ ]},
|
|
||||||
\ 'allowlist': ['c', 'cpp', 'java', 'kotlin', 'proto', 'textproto', 'go', 'python', 'bzl', 'sql', 'yaml', 'googlesql', 'build', 'typescript', 'gcl', 'soy'],
|
|
||||||
\})
|
|
||||||
|
|
||||||
" Send async completion requests.
|
|
||||||
" WARNING: Might interfere with other completion plugins.
|
|
||||||
let g:lsp_async_completion = 1
|
|
||||||
|
|
||||||
" Enable UI for diagnostics
|
|
||||||
let g:lsp_signs_enabled = 1 " enable diagnostics signs in the gutter
|
|
||||||
let g:lsp_diagnostics_echo_cursor = 1 " enable echo under cursor when in normal mode
|
|
||||||
let g:lsp_diagnostics_float_cursor = 1 " enable floating window diagnostics
|
|
||||||
|
|
||||||
|
|
||||||
" Automatically show completion options
|
|
||||||
let g:asyncomplete_auto_popup = 1
|
|
||||||
|
|
||||||
function! s:on_lsp_buffer_enabled() abort
|
|
||||||
setlocal omnifunc=lsp#complete
|
|
||||||
setlocal signcolumn=yes
|
|
||||||
if exists('+tagfunc') | setlocal tagfunc=lsp#tagfunc | endif
|
|
||||||
nmap <buffer> gd <plug>(lsp-definition)
|
|
||||||
nmap <buffer> gs <plug>(lsp-document-symbol-search)
|
|
||||||
nmap <buffer> gS <plug>(lsp-workspace-symbol-search)
|
|
||||||
nmap <buffer> gr <plug>(lsp-references)
|
|
||||||
nmap <buffer> gi <plug>(lsp-implementation)
|
|
||||||
nmap <buffer> gt <plug>(lsp-type-definition)
|
|
||||||
nmap <buffer> ga <plug>(lsp-code-action)
|
|
||||||
nmap <buffer> <leader>rn <plug>(lsp-rename)
|
|
||||||
nmap <buffer> [g <plug>(lsp-previous-diagnostic)
|
|
||||||
nmap <buffer> ]g <plug>(lsp-next-diagnostic)
|
|
||||||
inoremap <buffer> <expr><c-f> lsp#scroll(+4)
|
|
||||||
inoremap <buffer> <expr><c-d> lsp#scroll(-4)
|
|
||||||
|
|
||||||
nmap <buffer> L <plug>(lsp-hover)
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
augroup lsp_install
|
|
||||||
au!
|
|
||||||
" call s:on_lsp_buffer_enabled only for languages that has the server registered.
|
|
||||||
autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled()
|
|
||||||
augroup END
|
|
@ -1,22 +0,0 @@
|
|||||||
let s:brown = "964B00"
|
|
||||||
let s:aqua = "3AFFDB"
|
|
||||||
let s:blue = "689FB6"
|
|
||||||
let s:darkBlue = "44788E"
|
|
||||||
let s:purple = "834F79"
|
|
||||||
let s:lightPurple = "834F79"
|
|
||||||
let s:red = "AE403F"
|
|
||||||
let s:beige = "F5C06F"
|
|
||||||
let s:yellow = "F09F17"
|
|
||||||
let s:orange = "D4843E"
|
|
||||||
let s:darkOrange = "F16529"
|
|
||||||
let s:pink = "CB6F6F"
|
|
||||||
let s:salmon = "EE6E73"
|
|
||||||
let s:green = "8FAA54"
|
|
||||||
let s:lightGreen = "31B53E"
|
|
||||||
let s:white = "FFFFFF"
|
|
||||||
let s:rspec_red = 'FE405F'
|
|
||||||
let s:git_orange = 'F54D27'
|
|
||||||
|
|
||||||
" If you have vim-devicons you can customize your icons for each file type.
|
|
||||||
let g:NERDTreeExtensionHighlightColor = {} "this line is needed to avoid error
|
|
||||||
let g:NERDTreeExtensionHighlightColor['java'] = s:lightGreen "assigning it to an empty string will skip highlight
|
|
@ -2,9 +2,9 @@ source /usr/share/vim/google/glug/bootstrap.vim
|
|||||||
source /usr/share/vim/google/core.vim
|
source /usr/share/vim/google/core.vim
|
||||||
|
|
||||||
Plug 'vim-scripts/vcscommand.vim'
|
Plug 'vim-scripts/vcscommand.vim'
|
||||||
Plug 'sso://user/chmnchiang/google-comments'
|
|
||||||
Plug 'sso://googler@user/piloto/cmp-nvim-ciderlsp'
|
Plug 'sso://googler@user/piloto/cmp-nvim-ciderlsp'
|
||||||
Plug 'williamboman/nvim-lsp-installer'
|
|
||||||
|
let g:VCSCommandDisableMappings = 1
|
||||||
|
|
||||||
let g:signify_skip_filename_pattern = ['\.pipertmp.*']
|
let g:signify_skip_filename_pattern = ['\.pipertmp.*']
|
||||||
|
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
autocmd InsertLeave * :lua require('google.comments').update_signs()
|
|
||||||
autocmd InsertLeave * :GoogleCommentsFetchComments
|
|
@ -1,14 +1,16 @@
|
|||||||
set runtimepath+=/google/src/files/head/depot/google3/experimental/users/tstone/vim/vim-imp
|
if filereadable(expand("~/use_google"))
|
||||||
set runtimepath+=/google/src/files/head/depot/google3/experimental/users/tstone/vim/imp-csearch
|
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! glaive
|
Glug! glaive
|
||||||
" Glaive imp Suggest[default]=buffer,primp,csearch,prompt Report[default]=popupnotify
|
" Glaive imp Suggest[default]=buffer,primp,csearch,prompt Report[default]=popupnotify
|
||||||
" Glaive imp Suggest[default]=buffer,csearch,prompt,primp Report[default]=popupnotify
|
" Glaive imp Suggest[default]=buffer,csearch,prompt,primp Report[default]=popupnotify
|
||||||
" Glaive imp Pick[default]=inputlist Suggest[default]=buffer,primp,csearch,prompt Report[default]=echo
|
" Glaive imp Pick[default]=inputlist Suggest[default]=buffer,primp,csearch,prompt Report[default]=echo
|
||||||
Glaive imp Pick[default]=fzf Suggest[default]=buffer,primp,csearch,prompt Report[default]=echo
|
Glaive imp Pick[default]=fzf Suggest[default]=buffer,primp,csearch,prompt Report[default]=echo
|
||||||
"
|
"
|
||||||
" nnoremap <leader>csi :CsImporter<cr>
|
" nnoremap <leader>csi :CsImporter<cr>
|
||||||
nnoremap <leader>csi :ImpSuggest <C-r><C-w><cr>
|
nnoremap <leader>csi :ImpSuggest <C-r><C-w><cr>
|
||||||
nnoremap <leader>ii :ImpSuggest <C-r><C-w><cr>
|
nnoremap <leader>ii :ImpSuggest <C-r><C-w><cr>
|
||||||
nnoremap <leader>if :ImpFirst <C-r><C-w><cr>
|
nnoremap <leader>if :ImpFirst <C-r><C-w><cr>
|
||||||
|
|
||||||
|
endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
let g:windowswap_map_keys = 0 "prevent default bindings
|
nnoremap <silent> <leader>yw :call WindowSwap#EasyWindowSwap()<CR>
|
||||||
nnoremap <silent> <leader>yw :call WindowSwap#MarkWindowSwap()<CR>
|
unmap <leader>ww
|
||||||
|
|
||||||
" --------- SURROUND MAPPINGS ---------
|
" --------- SURROUND MAPPINGS ---------
|
||||||
" <leader>" Surround a word with "quotes"
|
" <leader>" Surround a word with "quotes"
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
Plug 'SirVer/ultisnips'
|
Plug 'SirVer/ultisnips'
|
||||||
Plug 'honza/vim-snippets'
|
Plug 'honza/vim-snippets'
|
||||||
|
|
||||||
" Glug ultisnips-google
|
if filereadable(expand("~/use_google"))
|
||||||
|
Glug ultisnips-google
|
||||||
|
endif
|
||||||
|
13
vim/.vimrc
13
vim/.vimrc
@ -8,6 +8,7 @@ set rtp+=~/.vim/after
|
|||||||
set directory=/tmp
|
set directory=/tmp
|
||||||
set undodir=/tmp
|
set undodir=/tmp
|
||||||
set nobackup
|
set nobackup
|
||||||
|
set formatoptions+=j
|
||||||
set nowritebackup
|
set nowritebackup
|
||||||
au BufWritePre * let &bex = '@' . strftime("%F.%H:%M")
|
au BufWritePre * let &bex = '@' . strftime("%F.%H:%M")
|
||||||
|
|
||||||
@ -95,19 +96,12 @@ call plug#begin('~/.vim/plugged')
|
|||||||
source ~/.vim/prefs/golang.vim
|
source ~/.vim/prefs/golang.vim
|
||||||
source ~/.vim/prefs/ultisnips.vim
|
source ~/.vim/prefs/ultisnips.vim
|
||||||
source ~/.vim/prefs/ripgrep.vim
|
source ~/.vim/prefs/ripgrep.vim
|
||||||
|
source ~/.vim/prefs/imp.vim
|
||||||
source ~/.vim/prefs/fzf.vim
|
source ~/.vim/prefs/fzf.vim
|
||||||
source ~/.vim/prefs/devicons.vim
|
|
||||||
source ~/.vim/prefs/airline.vim
|
|
||||||
call plug#end() " required
|
call plug#end() " required
|
||||||
|
|
||||||
lua require("plugins")
|
lua require("plugins")
|
||||||
|
|
||||||
if filereadable(expand("~/use_google"))
|
|
||||||
source ~/.vim/prefs/imp.vim
|
|
||||||
source ~/.vim/prefs/google_comments.vim
|
|
||||||
lua require("google_comments")
|
|
||||||
endif
|
|
||||||
|
|
||||||
filetype plugin on " redundant?
|
filetype plugin on " redundant?
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
|
|
||||||
@ -167,3 +161,6 @@ function! GenerateUnicode(first, last)
|
|||||||
$put =c
|
$put =c
|
||||||
endwhile
|
endwhile
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
set colorcolumn=80
|
||||||
|
set mouse=
|
||||||
|
@ -39,95 +39,3 @@ alias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\
|
|||||||
|
|
||||||
# recursively delete .DS_Store files
|
# recursively delete .DS_Store files
|
||||||
alias ds_clean='find ./ -name ".DS_Store" -depth -exec rm {} \;'
|
alias ds_clean='find ./ -name ".DS_Store" -depth -exec rm {} \;'
|
||||||
|
|
||||||
sl() {
|
|
||||||
blaze build --config gmscore_arm64 //java/com/google/android/gmscore/$1:$2
|
|
||||||
|
|
||||||
# some targets end in ".apk", this prevents adding the suffix to targets that
|
|
||||||
# already have it
|
|
||||||
if [[ "$2" == *".apk"* ]]; then
|
|
||||||
adb install -d -r blaze-bin/java/com/google/android/gmscore/$1/$2
|
|
||||||
else
|
|
||||||
adb install -d -r blaze-bin/java/com/google/android/gmscore/$1/$2.apk
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
sl_gms() {
|
|
||||||
sl integ GmsCore_prodnext_xxhdpi_debug
|
|
||||||
}
|
|
||||||
|
|
||||||
build_gms() {
|
|
||||||
blaze build --config gmscore_arm64 //java/com/google/android/gmscore/integ:GmsCore_prodnext_xxhdpi_debug
|
|
||||||
}
|
|
||||||
|
|
||||||
cdm() {
|
|
||||||
adb shell am start -n com.google.android.gms/.chimera.debug.ChimeraDebugActivity
|
|
||||||
}
|
|
||||||
|
|
||||||
cdp() {
|
|
||||||
adb shell am start -n com.google.android.gms/.chimera.multipackage.debug.MultiPackageDebugActivity
|
|
||||||
}
|
|
||||||
|
|
||||||
icdm() {
|
|
||||||
adb shell am start -n com.google.android.gms.isolated/com.google.android.gms.chimera.debug.ChimeraDebugActivity
|
|
||||||
}
|
|
||||||
|
|
||||||
hgr() {
|
|
||||||
source /google/src/head/depot/google3/experimental/users/cnieves/util/hgr.sh || return
|
|
||||||
hgr "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
jt() {
|
|
||||||
if [[ $PWD =~ '(.*)/javatests(.*)' ]]; then
|
|
||||||
cd "${match[1]}/java${match[2]}"
|
|
||||||
else
|
|
||||||
cd "${PWD/\/google3\/java//google3/javatests}"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
get_current_activity() {
|
|
||||||
adb shell dumpsys window | grep -E 'mCurrentFocus'
|
|
||||||
}
|
|
||||||
|
|
||||||
cl_search() {
|
|
||||||
# hg status -n --change . --template= | xargs -i sh -c "echo {} && grep '$1' {}"
|
|
||||||
rg --ignore-case $1 $(hg pstatus -ma -n --template= -- 2>/dev/null)
|
|
||||||
}
|
|
||||||
|
|
||||||
todos() {
|
|
||||||
cl_search "TODO"
|
|
||||||
}
|
|
||||||
|
|
||||||
cl_replace() {
|
|
||||||
hg status -n --change . --template= | xargs -i sh -c "sed -i '$1' {}"
|
|
||||||
}
|
|
||||||
|
|
||||||
restart_gms() {
|
|
||||||
adb shell am force-stop com.google.android.gms
|
|
||||||
adb shell am broadcast -a com.google.android.gms.INITIALIZE
|
|
||||||
}
|
|
||||||
|
|
||||||
objfs_cp() {
|
|
||||||
tmp=$(mktemp) && \
|
|
||||||
fileutil cp -f $1 $tmp && unzip $tmp $2 && unlink $tmp
|
|
||||||
}
|
|
||||||
|
|
||||||
from_cloud(){
|
|
||||||
scp baggins.c.googlers.com:$1 ~/Downloads/
|
|
||||||
echo "Saved $1 to downloads"
|
|
||||||
}
|
|
||||||
|
|
||||||
to_cloud(){
|
|
||||||
scp $1 baggins.c.googlers.com:~/Downloads
|
|
||||||
echo "Saved $1 to downloads"
|
|
||||||
}
|
|
||||||
|
|
||||||
from_mac(){
|
|
||||||
scp cnieves-macbookpro.roam.internal:$1 ~/Downloads/
|
|
||||||
echo "Saved $1 to downloads"
|
|
||||||
}
|
|
||||||
|
|
||||||
to_mac(){
|
|
||||||
scp $1 cnieves-macbookpro.roam.internal:~/Downloads
|
|
||||||
echo "Saved $1 to downloads"
|
|
||||||
}
|
|
||||||
|
@ -7,7 +7,6 @@ export GO111MODULE=auto
|
|||||||
export CLOUDSDK_PYTHON=python2
|
export CLOUDSDK_PYTHON=python2
|
||||||
|
|
||||||
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
|
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
|
||||||
export EDITOR='nvim'
|
|
||||||
|
|
||||||
HISTCONTROL=ignoreboth
|
HISTCONTROL=ignoreboth
|
||||||
|
|
||||||
@ -19,8 +18,8 @@ export NVM_DIR="$HOME/.nvm"
|
|||||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||||
|
|
||||||
|
source ~/.aliases.sh
|
||||||
|
|
||||||
if [[ -f "$HOME/use_google" ]]; then
|
if [[ -f "$HOME/use_google" ]]; then
|
||||||
source $HOME/.bash_profile.google
|
source $HOME/.bash_profile.google
|
||||||
fi
|
fi
|
||||||
source ~/.aliases.sh
|
|
||||||
|
@ -61,11 +61,121 @@ alias safergcp=/google/bin/releases/safer-gcp/tools/safergcp
|
|||||||
alias add_deps_to_usages='/google/src/head/depot/google3/apps/framework/tools/add_deps_to_usages.sh'
|
alias add_deps_to_usages='/google/src/head/depot/google3/apps/framework/tools/add_deps_to_usages.sh'
|
||||||
alias plxutil='/google/data/ro/teams/plx/plxutil'
|
alias plxutil='/google/data/ro/teams/plx/plxutil'
|
||||||
export HGSHORT_CMDS="cat head tail mv cp rm chmod g4 diff merge patch meld trim less more"
|
export HGSHORT_CMDS="cat head tail mv cp rm chmod g4 diff merge patch meld trim less more"
|
||||||
source /etc/bash_completion.d/hgd
|
export HGSHORT_DIR='/google/src/head/depot/google3/experimental/fig_contrib/hgshort' # default
|
||||||
|
alias vim="source $HGSHORT_DIR/tobashargs.sh nvim"
|
||||||
|
source /google/src/head/depot/google3/experimental/fig_contrib/hgshort/hgd-local.sh 2>/dev/null # just to get HGSHORT_DIR in env
|
||||||
alias hgd='source /google/src/head/depot/google3/experimental/fig_contrib/hgshort/hgd-local.sh'
|
alias hgd='source /google/src/head/depot/google3/experimental/fig_contrib/hgshort/hgd-local.sh'
|
||||||
alias builddoctor=/google/bin/releases/build-doctor/builddoctor
|
alias builddoctor=/google/bin/releases/build-doctor/builddoctor
|
||||||
|
alias rudi=/google/data/ro/teams/lsc/bin/rudi-cli
|
||||||
|
alias rudi-cli=/google/data/ro/teams/lsc/bin/rudi-cli
|
||||||
|
|
||||||
export ACID_STARTUP_SCRIPT_PATH=~/acid_startup.sh
|
export ACID_STARTUP_SCRIPT_PATH=~/acid_startup.sh
|
||||||
export PATH=$PATH:/usr/local/google/home/cnieves/.local/binexport PATH=$PATH:/usr/local/google/home/cnieves/.local/bin
|
export PATH=$PATH:/usr/local/google/home/cnieves/.local/binexport PATH=$PATH:/usr/local/google/home/cnieves/.local/bin
|
||||||
|
|
||||||
source ~/fzf-at-google.zsh
|
source ~/fzf-at-google.zsh
|
||||||
|
|
||||||
|
sl() {
|
||||||
|
blaze build --config gmscore_arm64 //java/com/google/android/gmscore/$1:$2
|
||||||
|
|
||||||
|
# some targets end in ".apk", this prevents adding the suffix to targets that
|
||||||
|
# already have it
|
||||||
|
if [[ "$2" == *".apk"* ]]; then
|
||||||
|
adb install -d -r blaze-bin/java/com/google/android/gmscore/$1/$2
|
||||||
|
else
|
||||||
|
adb install -d -r blaze-bin/java/com/google/android/gmscore/$1/$2.apk
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
sl_gms() {
|
||||||
|
sl integ GmsCore_prodnext_xxhdpi_debug
|
||||||
|
}
|
||||||
|
|
||||||
|
build_gms() {
|
||||||
|
blaze build --config gmscore_arm64 //java/com/google/android/gmscore/integ:GmsCore_prodnext_xxhdpi_debug
|
||||||
|
}
|
||||||
|
|
||||||
|
cdm() {
|
||||||
|
adb shell am start -n com.google.android.gms/.chimera.debug.ChimeraDebugActivity
|
||||||
|
}
|
||||||
|
|
||||||
|
cdp() {
|
||||||
|
adb shell am start -n com.google.android.gms/.chimera.multipackage.debug.MultiPackageDebugActivity
|
||||||
|
}
|
||||||
|
|
||||||
|
icdm() {
|
||||||
|
adb shell am start -n com.google.android.gms.isolated/com.google.android.gms.chimera.debug.ChimeraDebugActivity
|
||||||
|
}
|
||||||
|
|
||||||
|
hgr() {
|
||||||
|
source /google/src/head/depot/google3/experimental/users/cnieves/util/hgr.sh || return
|
||||||
|
hgr "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
jt() {
|
||||||
|
if [[ $PWD =~ '(.*)/javatests(.*)' ]]; then
|
||||||
|
cd "${match[1]}/java${match[2]}"
|
||||||
|
else
|
||||||
|
cd "${PWD/\/google3\/java//google3/javatests}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
get_current_activity() {
|
||||||
|
adb shell dumpsys window | grep -E 'mCurrentFocus'
|
||||||
|
}
|
||||||
|
|
||||||
|
cl_search() {
|
||||||
|
# hg status -n --change . --template= | xargs -i sh -c "echo {} && grep '$1' {}"
|
||||||
|
rg --ignore-case $1 $(hg pstatus -ma -n --template= -- 2>/dev/null)
|
||||||
|
}
|
||||||
|
|
||||||
|
todos() {
|
||||||
|
cl_search "TODO"
|
||||||
|
}
|
||||||
|
|
||||||
|
cl_replace() {
|
||||||
|
hg status -n --change . --template= | xargs -i sh -c "sed -i '$1' {}"
|
||||||
|
}
|
||||||
|
|
||||||
|
restart_gms() {
|
||||||
|
adb shell am force-stop com.google.android.gms
|
||||||
|
adb shell am broadcast -a com.google.android.gms.INITIALIZE
|
||||||
|
}
|
||||||
|
|
||||||
|
objfs_cp() {
|
||||||
|
tmp=$(mktemp) && \
|
||||||
|
fileutil cp -f $1 $tmp && unzip $tmp $2 && unlink $tmp
|
||||||
|
}
|
||||||
|
|
||||||
|
from_cloud(){
|
||||||
|
scp baggins.c.googlers.com:$1 ~/Downloads/
|
||||||
|
echo "Saved $1 to downloads"
|
||||||
|
}
|
||||||
|
|
||||||
|
to_cloud(){
|
||||||
|
scp $1 baggins.c.googlers.com:~/Downloads
|
||||||
|
echo "Saved $1 to downloads"
|
||||||
|
}
|
||||||
|
|
||||||
|
from_mac(){
|
||||||
|
scp cnieves-macbookpro.roam.internal:$1 ~/Downloads/
|
||||||
|
echo "Saved $1 to downloads"
|
||||||
|
}
|
||||||
|
|
||||||
|
to_mac(){
|
||||||
|
scp $1 cnieves-macbookpro.roam.internal:~/Downloads
|
||||||
|
echo "Saved $1 to downloads"
|
||||||
|
}
|
||||||
|
|
||||||
|
bdoctor() {
|
||||||
|
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)
|
||||||
|
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)
|
||||||
|
echo "DEFAULT(ANALYSIS): $default"
|
||||||
|
echo "HOURLY(EXECUTION): $hourly"
|
||||||
|
}
|
||||||
|
|
||||||
|
bdoctor_modules() {
|
||||||
|
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.large.chimera.modules | grep http)
|
||||||
|
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.large.chimera.modules | grep http)
|
||||||
|
echo "DEFAULT(ANALYSIS): $default"
|
||||||
|
echo "HOURLY(EXECUTION): $hourly"
|
||||||
|
}
|
||||||
|
@ -35,6 +35,7 @@ else
|
|||||||
zle clear-screen -w
|
zle clear-screen -w
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
export EDITOR='nvim'
|
||||||
zle -N fancy-ctrl-z
|
zle -N fancy-ctrl-z
|
||||||
bindkey '^Z' fancy-ctrl-z
|
bindkey '^Z' fancy-ctrl-z
|
||||||
bindkey "^A" beginning-of-line
|
bindkey "^A" beginning-of-line
|
||||||
|
Reference in New Issue
Block a user