Compare commits
32 Commits
a079ad36cc
...
main
Author | SHA1 | Date | |
---|---|---|---|
036a55effc | |||
8345f91cc8 | |||
b5e0e2ebf5 | |||
1f30ce43c7 | |||
edf9ae6ada | |||
28ac8a99b9 | |||
8b3bd23fa6 | |||
e4efa6b209 | |||
e588888143 | |||
d261f8b3bd | |||
5f814e7560 | |||
f9a40408aa | |||
a6eee81db6 | |||
a9a196baf1 | |||
2907bda8d3 | |||
348b966c1a | |||
736ba50a7a | |||
758afadb6f | |||
4c5bd3505f | |||
76686a0e87 | |||
f595b1fcfa | |||
8dc9131c46 | |||
27f00e77e6 | |||
d56eb258cd | |||
a1880dcdad | |||
e242d6eb56 | |||
3554761a0c | |||
3b3f3c05bd | |||
8643bd99f3 | |||
9d5f671e4f | |||
52dbbb30fd | |||
ee8d429c66 |
@ -13,35 +13,37 @@ decorations = "None"
|
|||||||
[colors]
|
[colors]
|
||||||
draw_bold_text_with_bright_colors = true
|
draw_bold_text_with_bright_colors = true
|
||||||
|
|
||||||
|
# Default colors
|
||||||
|
[colors.primary]
|
||||||
|
background = '#1e2024'
|
||||||
|
foreground = '#a1a3a8'
|
||||||
|
|
||||||
|
# Normal colors
|
||||||
|
[colors.normal]
|
||||||
|
black = '#27272a'
|
||||||
|
blue = '#5e7fdd'
|
||||||
|
cyan = '#97c3fa'
|
||||||
|
green = '#90b99f'
|
||||||
|
magenta = '#e29eca'
|
||||||
|
red = '#d45d9e'
|
||||||
|
white = '#c9c7cd'
|
||||||
|
yellow = '#f0ea2d'
|
||||||
|
|
||||||
|
# Bright colors
|
||||||
[colors.bright]
|
[colors.bright]
|
||||||
black = "#949494"
|
black = '#353539'
|
||||||
blue = "#74b2ff"
|
blue = '#a7b3dd'
|
||||||
cyan = "#85dc85"
|
cyan = '#6de6fc'
|
||||||
green = "#36c692"
|
green = '#a8fc8d'
|
||||||
magenta = "#ae81ff"
|
magenta = '#eb4cce'
|
||||||
red = "#ff5189"
|
red = '#ca72de'
|
||||||
white = "#e4e4e4"
|
white = '#c9c7cd'
|
||||||
yellow = "#c6c684"
|
yellow = '#f7f48d'
|
||||||
|
|
||||||
[colors.cursor]
|
[colors.cursor]
|
||||||
cursor = "#8e8e8e"
|
cursor = "#8e8e8e"
|
||||||
text = "#080808"
|
text = "#080808"
|
||||||
|
|
||||||
[colors.normal]
|
|
||||||
black = "#323437"
|
|
||||||
blue = "#80a0ff"
|
|
||||||
cyan = "#79dac8"
|
|
||||||
green = "#8cc85f"
|
|
||||||
magenta = "#cf87e8"
|
|
||||||
red = "#ff5454"
|
|
||||||
white = "#c6c6c6"
|
|
||||||
yellow = "#e3c78a"
|
|
||||||
|
|
||||||
[colors.primary]
|
|
||||||
background = "#080808"
|
|
||||||
bright_foreground = "#eeeeee"
|
|
||||||
foreground = "#bdbdbd"
|
|
||||||
|
|
||||||
[colors.selection]
|
[colors.selection]
|
||||||
background = "#b2ceee"
|
background = "#b2ceee"
|
||||||
text = "#080808"
|
text = "#080808"
|
||||||
|
@ -3,4 +3,4 @@ set nowrap
|
|||||||
set tabstop=4
|
set tabstop=4
|
||||||
set softtabstop=4
|
set softtabstop=4
|
||||||
set shiftwidth=4
|
set shiftwidth=4
|
||||||
set noexpandtab
|
set expandtab
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
set tabstop=2
|
set tabstop=2
|
||||||
set softtabstop=2
|
|
||||||
set shiftwidth=2
|
set shiftwidth=2
|
||||||
|
set softtabstop=2
|
||||||
|
set expandtab
|
||||||
|
|
||||||
|
set textwidth=80
|
||||||
|
set colorcolumn=80
|
||||||
|
@ -13,25 +13,18 @@ if not vim.loop.fs_stat(lazypath) then
|
|||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
vim.opt.rtp:prepend(vim.env.HOME .. "/.vim")
|
vim.opt.rtp:prepend(vim.env.HOME .. "/.vim")
|
||||||
vim.opt.rtp:prepend(vim.env.HOME .. "/.vim/lua")
|
local luahome = vim.env.HOME .. "/.vim/lua"
|
||||||
|
vim.opt.rtp:prepend(luahome)
|
||||||
|
|
||||||
package.path = package.path .. ";" .. vim.env.HOME .. "/.vim/lua/?.lua"
|
package.path = package.path .. ";" .. vim.env.HOME .. "/.vim/lua/?.lua"
|
||||||
|
|
||||||
require("config.clipboard")
|
for _, file in ipairs(vim.fn.readdir(luahome .. "/config", [[v:val =~ '\.lua$']])) do
|
||||||
require("config.tmpl")
|
require("config" .. "." .. file:gsub("%.lua$", ""))
|
||||||
require("config.zip")
|
end
|
||||||
|
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
-- this entry tells lazy.nvim to load the list of of *.lua files from plugins/
|
-- this entry tells lazy.nvim to load the list of of *.lua files from plugins/
|
||||||
import = "plugins",
|
import = "plugins",
|
||||||
-- Dev configuration
|
|
||||||
dev = {
|
|
||||||
-- Directory where you store your local plugin projects
|
|
||||||
path = "~/neovim-plugins/squk/",
|
|
||||||
-- @type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub
|
|
||||||
patterns = { "squk" },
|
|
||||||
fallback = false, -- Fallback to git when local plugin doesn't exist
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.opt.undodir = vim.fn.expand("$HOME") .. "/.undo/"
|
vim.opt.undodir = vim.fn.expand("$HOME") .. "/.undo/"
|
||||||
|
@ -1,79 +1,3 @@
|
|||||||
{
|
{
|
||||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }
|
||||||
"actions-preview.nvim": { "branch": "master", "commit": "9f52a01c374318e91337697ebed51c6fae57f8a4" },
|
|
||||||
"ai.nvim": { "branch": "main", "commit": "f042afc07d2815aa7aef9d1d8bd7e6f4f4957296" },
|
|
||||||
"asyncrun.vim": { "branch": "master", "commit": "78dc9277f2b989553861ee7c35b640112d95e1b5" },
|
|
||||||
"bevy_inspector.nvim": { "branch": "master", "commit": "627d172ce0ef65c52e10cdb0c38bd5b301d90b3c" },
|
|
||||||
"bigfile.nvim": { "branch": "main", "commit": "33eb067e3d7029ac77e081cfe7c45361887a311a" },
|
|
||||||
"blink-emoji.nvim": { "branch": "master", "commit": "81e6c080d1e64c9ef548534c51147fd8063481c8" },
|
|
||||||
"blink-ripgrep.nvim": { "branch": "main", "commit": "a17697bba1bd351f6686b9f9285cf2fd1b03cf4a" },
|
|
||||||
"blink.cmp": { "branch": "main", "commit": "b6f11a0aa33e601c469a126e3ed6e35208fe3ea3" },
|
|
||||||
"blink.compat": { "branch": "main", "commit": "5ca8848c8cc32abdc980e5db4f0eb7bb8fbf84dc" },
|
|
||||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
|
||||||
"catppuccin": { "branch": "main", "commit": "f67b886d65a029f12ffa298701fb8f1efd89295d" },
|
|
||||||
"ciderlsp-nvim": { "branch": "main", "commit": "9cd409f51cbb25a9813a15dfa84753fe7f26caac" },
|
|
||||||
"cmp-nerdfont": { "branch": "main", "commit": "e97482344ebed29093015a18c155057adf5c842b" },
|
|
||||||
"cmp-nvim-ciderlsp": { "branch": "main", "commit": "58faf9323bcbb5358d820d3fa7f5d0b4c0608b62" },
|
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
|
|
||||||
"conflict-marker.vim": { "branch": "master", "commit": "62742b2ffe7a433988759c67b5c5a22eff74a14b" },
|
|
||||||
"conform.nvim": { "branch": "master", "commit": "363243c03102a531a8203311d4f2ae704c620d9b" },
|
|
||||||
"crates.nvim": { "branch": "main", "commit": "bd35b13e94a292ee6e32c351e05ca2202dc9f070" },
|
|
||||||
"dashboard-nvim": { "branch": "master", "commit": "000448d837f6e7a47f8f342f29526c4d7e49e9ce" },
|
|
||||||
"firenvim": { "branch": "master", "commit": "f8a5fa6f1ed42536490acf0840497c40331c184f" },
|
|
||||||
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
|
|
||||||
"fzf.vim": { "branch": "master", "commit": "556f45e79ae5e3970054fee4c4373472604a1b4e" },
|
|
||||||
"git-conflict.nvim": { "branch": "main", "commit": "4bbfdd92d547d2862a75b4e80afaf30e73f7bbb4" },
|
|
||||||
"googlepaths.nvim": { "branch": "main", "commit": "53439c17178049096809b4fb963e75440b86ad78" },
|
|
||||||
"hg": { "branch": "main", "commit": "12ee0a788309734f1f312060b9f984a97157acf3" },
|
|
||||||
"lazy.nvim": { "branch": "main", "commit": "d8f26efd456190241afd1b0f5235fe6fdba13d4a" },
|
|
||||||
"lazydev.nvim": { "branch": "main", "commit": "a1b78b2ac6f978c72e76ea90ae92a94edf380cfc" },
|
|
||||||
"libp.nvim": { "branch": "main", "commit": "636b1748e92f66022c1763f32b2ded6b8606eda5" },
|
|
||||||
"lsp_lines.nvim": { "branch": "main", "commit": "3b57922d2d79762e6baedaf9d66d8ba71f822816" },
|
|
||||||
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
|
|
||||||
"luasnip-google.nvim": { "branch": "main", "commit": "86df31e12350c15e207fcbc255d951144bb6d0b5" },
|
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "e942edf5c85b6a2ab74059ea566cac5b3e1514a4" },
|
|
||||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
|
||||||
"mini.icons": { "branch": "main", "commit": "910db5df9724d65371182948f921fce23c2c881e" },
|
|
||||||
"mini.notify": { "branch": "main", "commit": "05e598d5b349bd66404d576e6a4d4340aea5f194" },
|
|
||||||
"neo-tree.nvim": { "branch": "main", "commit": "521bb4253b1adc2a1ff6c584bc839eba9bc99c0b" },
|
|
||||||
"neovim-throttle-debounce": { "branch": "main", "commit": "f6bf97fa0dc704affc8149aeaef5ef0cafa4d10c" },
|
|
||||||
"nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" },
|
|
||||||
"nvim-dap": { "branch": "master", "commit": "ead0de6eac91a555b714bfd7d28959eeecfb96f9" },
|
|
||||||
"nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" },
|
|
||||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "df66808cd78b5a97576bbaeee95ed5ca385a9750" },
|
|
||||||
"nvim-jdtls": { "branch": "master", "commit": "3efcd0700a293efea9dada58f79c32a64850eb24" },
|
|
||||||
"nvim-lint": { "branch": "master", "commit": "789b7ada1b4f00e08d026dffde410dcfa6a0ba87" },
|
|
||||||
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
|
||||||
"nvim-notify": { "branch": "master", "commit": "22f29093eae7785773ee9d543f8750348b1a195c" },
|
|
||||||
"nvim-scrollbar": { "branch": "main", "commit": "6994eb9f73d5fdc36ee2c8717940e8c853e51a49" },
|
|
||||||
"nvim-surround": { "branch": "main", "commit": "ae298105122c87bbe0a36b1ad20b06d417c0433e" },
|
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "2206739829518c9ea59dbdb9003e0147fdaf2d1c" },
|
|
||||||
"omnisharp-extended-lsp.nvim": { "branch": "main", "commit": "ec1a2431f8872f650a85ed71c24f0715df2e49c2" },
|
|
||||||
"onedark.nvim": { "branch": "main", "commit": "b5161f0c631571640485be5d1c059cab82c86872" },
|
|
||||||
"paint.nvim": { "branch": "main", "commit": "ef6f717a8669619ebbd098fb72f85115d64c6c92" },
|
|
||||||
"plenary.nvim": { "branch": "master", "commit": "3707cdb1e43f5cea73afb6037e6494e7ce847a66" },
|
|
||||||
"refactoring.nvim": { "branch": "master", "commit": "2db6d378e873de31d18ade549c2edba64ff1c2e3" },
|
|
||||||
"rustaceanvim": { "branch": "master", "commit": "aed4dabd7a7ef5b976c2ff5693997563afa9f082" },
|
|
||||||
"telescope-dap.nvim": { "branch": "master", "commit": "783366bd6c1e7fa0a5c59c07db37f49c805a28df" },
|
|
||||||
"telescope-import.nvim": { "branch": "main", "commit": "6fd69447679a99b463025e7f2f787e8b185dd740" },
|
|
||||||
"telescope-recent-files": { "branch": "main", "commit": "3a7a1b9c6b52b6ff7938c59f64c87a05e013dff8" },
|
|
||||||
"telescope.nvim": { "branch": "master", "commit": "415af52339215926d705cccc08145f3782c4d132" },
|
|
||||||
"telescope_citc": { "branch": "main", "commit": "61df86dc218198a730e27bafd33535dac8539dcf" },
|
|
||||||
"telescope_codesearch": { "branch": "main", "commit": "4c6ad26b1b0a7db6f5de8f0a619a105f93bf63f3" },
|
|
||||||
"telescope_fig": { "branch": "main", "commit": "6ce47b13e7d38584934df5b20f80cbfa825df20a" },
|
|
||||||
"time-ago.vim": { "branch": "master", "commit": "be978d5c790cfcc41f524205f28783b9937fd0ee" },
|
|
||||||
"tree-sitter-gdscript": { "branch": "master", "commit": "48b49330888a4669b48619b211cc8da573827725" },
|
|
||||||
"trouble.nvim": { "branch": "main", "commit": "50481f414bd3c1a40122c1d759d7e424d5fafe84" },
|
|
||||||
"vim-bazel": { "branch": "master", "commit": "31b0d5e4f51da1aeb56d65bf505a744e6de405de" },
|
|
||||||
"vim-floaterm": { "branch": "master", "commit": "4e28c8dd0271e10a5f55142fb6fe9b1599ee6160" },
|
|
||||||
"vim-imp": { "branch": "main", "commit": "87d5725e065a76d89aa52889ee8804e723d16e14" },
|
|
||||||
"vim-maktaba": { "branch": "master", "commit": "fe95bb10f6bb250943a44632107f6a3d76ce5f28" },
|
|
||||||
"vim-signify": { "branch": "master", "commit": "8670143f9e12ed1cd3c9b2c54f345cdd9a4baac3" },
|
|
||||||
"vim-tmux": { "branch": "master", "commit": "cfe76281efc29890548cf9eedd42ad51c7a1faf0" },
|
|
||||||
"vim-tmux-focus-events": { "branch": "master", "commit": "b1330e04ffb95ede8e02b2f7df1f238190c67056" },
|
|
||||||
"vim-tmux-navigator": { "branch": "master", "commit": "d847ea942a5bb4d4fab6efebc9f30d787fd96e65" },
|
|
||||||
"vim-tmux-syntax": { "branch": "master", "commit": "1b6a6a5beb96fa232c8d35d305f77496b12678a9" },
|
|
||||||
"vimux": { "branch": "master", "commit": "7db6b2f79d432ee3820668b1d4625311dbe1d0ad" },
|
|
||||||
"which-key.nvim": { "branch": "main", "commit": "6cebd86917df559a88de0f806b2989799c6e6423" },
|
|
||||||
"zen-mode.nvim": { "branch": "main", "commit": "863f150ca321b3dd8aa1a2b69b5f411a220e144f" }
|
|
||||||
}
|
}
|
||||||
|
@ -4,5 +4,6 @@ abbr "bq"="blaze query"
|
|||||||
abbr "br"="blaze run"
|
abbr "br"="blaze run"
|
||||||
abbr "bt"="blaze test"
|
abbr "bt"="blaze test"
|
||||||
abbr "ds_clean"="find ./ -name \".DS_Store\" -depth -exec rm {} \;"
|
abbr "ds_clean"="find ./ -name \".DS_Store\" -depth -exec rm {} \;"
|
||||||
|
abbr "gdvim"="nvim --listen /tmp/godot.pipe"
|
||||||
abbr "mux"="tmuxinator"
|
abbr "mux"="tmuxinator"
|
||||||
abbr "replace_string"="replace_string --disable_p4 \"%\" \"%\""
|
abbr "replace_string"="replace_string --disable_p4 \"%\" \"%\""
|
||||||
|
9
config/.ripgreprc
Normal file
9
config/.ripgreprc
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# add gdscript type
|
||||||
|
--type-add
|
||||||
|
gd:*.{gd,gdscript}*
|
||||||
|
|
||||||
|
# Search hidden files / directories (e.g. dotfiles) by default
|
||||||
|
--hidden
|
||||||
|
|
||||||
|
# Because who cares about case!?
|
||||||
|
--smart-case
|
@ -1,12 +1,12 @@
|
|||||||
[user]
|
[user]
|
||||||
name = Christian Nieves
|
name = Christian Nieves
|
||||||
email = cnieves@google.com
|
email = cnieves@google.com
|
||||||
[color]
|
[color]
|
||||||
ui = auto
|
ui = auto
|
||||||
[url "ssh://git@github.com/"]
|
[url "ssh://git@github.com/"]
|
||||||
insteadOf = https://github.com/
|
insteadOf = https://github.com/
|
||||||
[alias]
|
[alias]
|
||||||
gr = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
|
gr = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
|
||||||
# one-line log
|
# one-line log
|
||||||
l = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short
|
l = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short
|
||||||
|
|
||||||
@ -34,18 +34,69 @@
|
|||||||
la = "!git config -l | grep alias | cut -c 7-"
|
la = "!git config -l | grep alias | cut -c 7-"
|
||||||
po = push origin
|
po = push origin
|
||||||
[core]
|
[core]
|
||||||
autocrlf = false
|
autocrlf = false
|
||||||
excludesfile = /Users/christian/.gitignore_global
|
excludesfile = /Users/christian/.gitignore_global
|
||||||
[icdiff]
|
[icdiff]
|
||||||
options = --highlight --line-numbers
|
options = --highlight --line-numbers
|
||||||
[merge]
|
[merge]
|
||||||
tool = "nvim"
|
tool = "nvim"
|
||||||
[mergetool "nvim"]
|
[mergetool "nvim"]
|
||||||
cmd = nvim -d -c \"wincmd l\" \"$LOCAL\" \"$MERGED\" \"$REMOTE\"
|
cmd = nvim -d -c \"wincmd l\" \"$LOCAL\" \"$MERGED\" \"$REMOTE\"
|
||||||
[diff]
|
|
||||||
tool = icdiff
|
|
||||||
[filter "lfs"]
|
[filter "lfs"]
|
||||||
clean = git-lfs clean -- %f
|
clean = git-lfs clean -- %f
|
||||||
smudge = git-lfs smudge -- %f
|
smudge = git-lfs smudge -- %f
|
||||||
process = git-lfs filter-process
|
process = git-lfs filter-process
|
||||||
required = true
|
required = true
|
||||||
|
|
||||||
|
|
||||||
|
# clearly makes git better
|
||||||
|
|
||||||
|
[column]
|
||||||
|
ui = auto
|
||||||
|
[branch]
|
||||||
|
sort = -committerdate
|
||||||
|
[tag]
|
||||||
|
sort = version:refname
|
||||||
|
[init]
|
||||||
|
defaultBranch = main
|
||||||
|
[diff]
|
||||||
|
algorithm = histogram
|
||||||
|
colorMoved = plain
|
||||||
|
mnemonicPrefix = true
|
||||||
|
renames = true
|
||||||
|
tool = icdiff
|
||||||
|
[push]
|
||||||
|
default = simple
|
||||||
|
autoSetupRemote = true
|
||||||
|
followTags = true
|
||||||
|
[fetch]
|
||||||
|
prune = true
|
||||||
|
pruneTags = true
|
||||||
|
all = true
|
||||||
|
|
||||||
|
# why the hell not?
|
||||||
|
|
||||||
|
[help]
|
||||||
|
autocorrect = prompt
|
||||||
|
[commit]
|
||||||
|
verbose = true
|
||||||
|
[rerere]
|
||||||
|
enabled = true
|
||||||
|
autoupdate = true
|
||||||
|
[core]
|
||||||
|
excludesfile = ~/.gitignore
|
||||||
|
[rebase]
|
||||||
|
autoSquash = true
|
||||||
|
autoStash = true
|
||||||
|
updateRefs = true
|
||||||
|
|
||||||
|
# a matter of taste (uncomment if you dare)
|
||||||
|
|
||||||
|
[core]
|
||||||
|
# fsmonitor = true
|
||||||
|
# untrackedCache = true
|
||||||
|
[merge]
|
||||||
|
# (just 'diff3' if git version < 2.3)
|
||||||
|
# conflictstyle = zdiff3
|
||||||
|
[pull]
|
||||||
|
# rebase = true
|
||||||
|
13
google/.hgrc
13
google/.hgrc
@ -16,15 +16,15 @@ opts.vimdiff = -d
|
|||||||
# opts.vimdiff = -c ':call ShowMercurialDiff(argv(0), argv(1))'
|
# opts.vimdiff = -c ':call ShowMercurialDiff(argv(0), argv(1))'
|
||||||
|
|
||||||
[extensions]
|
[extensions]
|
||||||
unsupported.tree =
|
# unsupported.tree =
|
||||||
unsupported.alices =
|
# unsupported.alices =
|
||||||
extdiff =
|
extdiff =
|
||||||
color =
|
# color =
|
||||||
beautifygraph =
|
beautifygraph =
|
||||||
|
|
||||||
[alices]
|
# [alices]
|
||||||
findings.extra_args = --proxy
|
# findings.extra_args = --proxy
|
||||||
summarize.extra_args = --proxy
|
# summarize.extra_args = --proxy
|
||||||
|
|
||||||
[merge-tools]
|
[merge-tools]
|
||||||
vimdiff.executable = nvim
|
vimdiff.executable = nvim
|
||||||
@ -51,6 +51,7 @@ dt = icdiff --pager=on
|
|||||||
dtex = dt -r exported(.)
|
dtex = dt -r exported(.)
|
||||||
dtp4 = dt -r p4base
|
dtp4 = dt -r p4base
|
||||||
dtup = dt -r .^
|
dtup = dt -r .^
|
||||||
|
ra = revert --all
|
||||||
|
|
||||||
whatsout = status -n --change . --template=hgshort_status
|
whatsout = status -n --change . --template=hgshort_status
|
||||||
what = status -n --change . --template=hgshort_status
|
what = status -n --change . --template=hgshort_status
|
||||||
|
@ -124,7 +124,7 @@ bind-key C-a set-option -g prefix C-a
|
|||||||
# No delay for escape key press
|
# No delay for escape key press
|
||||||
set -sg escape-time 0
|
set -sg escape-time 0
|
||||||
|
|
||||||
set -g status-right '#{prefix_highlight} | %a %Y-%m-%d %H:%M'
|
run ~/.tmux/plugins/tmux/catppuccin.tmux
|
||||||
|
|
||||||
# text for the window when inactive
|
# text for the window when inactive
|
||||||
set -g @catppuccin_window_default_fill "number"
|
set -g @catppuccin_window_default_fill "number"
|
||||||
@ -133,30 +133,27 @@ set -g @catppuccin_window_default_text '#{?#{m/r:^(/google/src)?/cloud/,#{pane_c
|
|||||||
set -g @catppuccin_window_current_fill "number"
|
set -g @catppuccin_window_current_fill "number"
|
||||||
set -g @catppuccin_window_current_text '#{?#{m/r:^(/google/src)?/cloud/,#{pane_current_path}},#{s|^(/google/src)?/cloud/[^/]+/([^/]+).+$|\2|:pane_current_path},#{b:pane_current_path}}'
|
set -g @catppuccin_window_current_text '#{?#{m/r:^(/google/src)?/cloud/,#{pane_current_path}},#{s|^(/google/src)?/cloud/[^/]+/([^/]+).+$|\2|:pane_current_path},#{b:pane_current_path}}'
|
||||||
|
|
||||||
set -g @catppuccin_pane_status_enabled "yes"
|
|
||||||
set -g @catppuccin_pane_border_status "top"
|
|
||||||
set -g @catppuccin_pane_left_separator ""
|
|
||||||
set -g @catppuccin_pane_right_separator ""
|
|
||||||
set -g @catppuccin_pane_middle_separator "█ "
|
|
||||||
set -g @catppuccin_pane_number_position "left"
|
|
||||||
set -g @catppuccin_pane_default_fill "number"
|
|
||||||
|
|
||||||
set -g @catppuccin_status_modules_right "host cpu weather date_time"
|
|
||||||
set -g @catppuccin_status_left_separator ""
|
|
||||||
set -g @catppuccin_status_right_separator " "
|
|
||||||
set -g @catppuccin_status_right_separator_inverse "yes"
|
|
||||||
set -g @catppuccin_status_fill "all"
|
|
||||||
set -g @catppuccin_status_connect_separator "no"
|
|
||||||
set -g @catppuccin_window_status_icon_enable "yes"
|
|
||||||
|
|
||||||
set -g @catppuccin_icon_window_last ""
|
|
||||||
set -g @catppuccin_icon_window_current ""
|
|
||||||
set -g @catppuccin_icon_window_zoom ""
|
|
||||||
set -g @catppuccin_icon_window_mark ""
|
|
||||||
set -g @catppuccin_icon_window_silent ""
|
|
||||||
set -g @catppuccin_icon_window_activity ""
|
|
||||||
set -g @catppuccin_icon_window_bell ""
|
set -g @catppuccin_icon_window_bell ""
|
||||||
|
|
||||||
|
# Make the status line pretty and add some modules
|
||||||
|
|
||||||
|
set -g status-right-length 100
|
||||||
|
|
||||||
|
set -g status-left-length 100
|
||||||
|
|
||||||
|
set -g status-left ""
|
||||||
|
|
||||||
|
set -g status-right "#{E:@catppuccin_status_application}"
|
||||||
|
|
||||||
|
set -agF status-right "#{E:@catppuccin_status_cpu}"
|
||||||
|
|
||||||
|
set -ag status-right "#{E:@catppuccin_status_session}"
|
||||||
|
|
||||||
|
set -ag status-right "#{E:@catppuccin_status_uptime}"
|
||||||
|
|
||||||
|
set -agF status-right "#{E:@catppuccin_status_battery}"
|
||||||
|
|
||||||
|
|
||||||
# List of plugins
|
# List of plugins
|
||||||
set -g @plugin 'tmux-plugins/tpm'
|
set -g @plugin 'tmux-plugins/tpm'
|
||||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||||
@ -170,6 +167,7 @@ set -g @plugin 'catppuccin/tmux'
|
|||||||
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||||
set -g @plugin 'tmux-plugins/tmux-continuum'
|
set -g @plugin 'tmux-plugins/tmux-continuum'
|
||||||
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
|
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
|
||||||
|
set -g @plugin 'catppuccin/tmux#v2.1.2'
|
||||||
|
|
||||||
set -g @continuum-restore 'on'
|
set -g @continuum-restore 'on'
|
||||||
set -g @resurrect-dir '$HOME/.tmux/resurrect'
|
set -g @resurrect-dir '$HOME/.tmux/resurrect'
|
||||||
|
@ -1,18 +1,33 @@
|
|||||||
local map = require("utils").map
|
local map = require("utils").map
|
||||||
|
|
||||||
if vim.env.SSH_TTY or vim.env.SSH_CLIENT or vim.env.SSH_CONNECTION then
|
if vim.fn.hostname() == "goblin" then
|
||||||
vim.g.clipboard = {
|
vim.g.clipboard = {
|
||||||
name = "lemonade",
|
name = "wayland",
|
||||||
copy = {
|
copy = {
|
||||||
["+"] = { "lemonade", "copy" },
|
["+"] = { "wl-copy" },
|
||||||
["*"] = { "lemonade", "copy" },
|
["*"] = { "wl-copy" },
|
||||||
},
|
},
|
||||||
paste = {
|
paste = {
|
||||||
["+"] = { "lemonade", "paste" },
|
["+"] = { "wl-paste" },
|
||||||
["*"] = { "lemonade", "paste" },
|
["*"] = { "wl-paste" },
|
||||||
},
|
},
|
||||||
cache_enabled = false,
|
cache_enabled = false,
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
if vim.env.SSH_TTY or vim.env.SSH_CLIENT or vim.env.SSH_CONNECTION then
|
||||||
|
vim.g.clipboard = {
|
||||||
|
name = "lemonade",
|
||||||
|
copy = {
|
||||||
|
["+"] = { "lemonade", "copy" },
|
||||||
|
["*"] = { "lemonade", "copy" },
|
||||||
|
},
|
||||||
|
paste = {
|
||||||
|
["+"] = { "lemonade", "paste" },
|
||||||
|
["*"] = { "lemonade", "paste" },
|
||||||
|
},
|
||||||
|
cache_enabled = false,
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
map("v", "<leader>y", '"+y')
|
map("v", "<leader>y", '"+y')
|
||||||
|
9
vim/.vim/lua/config/wgsl.lua
Normal file
9
vim/.vim/lua/config/wgsl.lua
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, {
|
||||||
|
pattern = "*.wgsl",
|
||||||
|
callback = function()
|
||||||
|
local lspconfig = require("lspconfig")
|
||||||
|
lspconfig.wgsl_analyzer.setup({})
|
||||||
|
|
||||||
|
vim.bo.filetype = "wgsl"
|
||||||
|
end,
|
||||||
|
})
|
35
vim/.vim/lua/plugins/avante.lua
Normal file
35
vim/.vim/lua/plugins/avante.lua
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
local use_google = require("utils").use_google
|
||||||
|
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"yetone/avante.nvim",
|
||||||
|
build = "make",
|
||||||
|
enable = true,
|
||||||
|
branch = "working",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
"stevearc/dressing.nvim",
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
-- Add vintharas/avante-goose.nvim as a dependecy to avante.nvim
|
||||||
|
-- That'll ensure that you'll load avante-goose when you load avante.
|
||||||
|
{
|
||||||
|
"vintharas/avante-goose.nvim",
|
||||||
|
url = "sso://user/vintharas/avante-goose.nvim",
|
||||||
|
cond = use_google(),
|
||||||
|
opts = {
|
||||||
|
model = "gemini-for-google-2.5-pro", -- Select model from go/goose-models.
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
provider = "goose", -- Select goose as provider
|
||||||
|
vendors = {}, -- Makes sure there's a vendors table
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
-- Load provider from the plugin
|
||||||
|
opts.vendors["goose"] = require("avante-goose").getProvider()
|
||||||
|
require("avante").setup(opts)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
@ -1,8 +1,24 @@
|
|||||||
local use_google = require("utils").use_google
|
local use_google = require("utils").use_google
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
{
|
||||||
|
"folke/flash.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
---@type Flash.Config
|
||||||
|
opts = {},
|
||||||
|
-- stylua: ignore
|
||||||
|
keys = {
|
||||||
|
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
||||||
|
{ "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
||||||
|
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
||||||
|
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
||||||
|
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"tikhomirov/vim-glsl",
|
||||||
"sindrets/diffview.nvim",
|
"sindrets/diffview.nvim",
|
||||||
{ "folke/todo-comments.nvim", dependencies = { "nvim-lua/plenary.nvim" } },
|
{ "folke/todo-comments.nvim", dependencies = { "nvim-lua/plenary.nvim" } },
|
||||||
|
{
|
||||||
"MagicDuck/grug-far.nvim",
|
"MagicDuck/grug-far.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("grug-far").setup({
|
require("grug-far").setup({
|
||||||
@ -18,127 +34,123 @@ return {
|
|||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"shellRaining/hlchunk.nvim",
|
"shellRaining/hlchunk.nvim",
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
opts = {
|
opts = {
|
||||||
line_num = { enable = true },
|
line_num = { enable = true },
|
||||||
chunk = {
|
chunk = {
|
||||||
enable = true,
|
enable = true,
|
||||||
priority = 15,
|
priority = 15,
|
||||||
style = {
|
style = {
|
||||||
{ fg = "#393d4c" },
|
{ fg = "#393d4c" },
|
||||||
},
|
},
|
||||||
chars = {
|
chars = {
|
||||||
horizontal_line = "─",
|
horizontal_line = "─",
|
||||||
-- vertical_line = "│",
|
-- vertical_line = "│",
|
||||||
vertical_line = "┊",
|
vertical_line = "┊",
|
||||||
left_top = "╭",
|
left_top = "╭",
|
||||||
left_bottom = "╰",
|
left_bottom = "╰",
|
||||||
right_arrow = ">",
|
right_arrow = ">",
|
||||||
},
|
},
|
||||||
use_treesitter = true,
|
use_treesitter = true,
|
||||||
textobject = "",
|
textobject = "",
|
||||||
max_file_size = 1024 * 1024,
|
max_file_size = 1024 * 1024,
|
||||||
error_sign = true,
|
error_sign = true,
|
||||||
-- animation related
|
-- animation related
|
||||||
duration = 0,
|
duration = 0,
|
||||||
delay = 0,
|
delay = 0,
|
||||||
},
|
},
|
||||||
},
|
|
||||||
},
|
|
||||||
"RRethy/vim-illuminate",
|
|
||||||
"kdheepak/lazygit.nvim",
|
|
||||||
"flwyd/vim-conjoin",
|
|
||||||
"rafcamlet/nvim-luapad",
|
|
||||||
"vim-scripts/vcscommand.vim",
|
|
||||||
"AndrewRadev/tagalong.vim",
|
|
||||||
"AndrewRadev/yankwin.vim",
|
|
||||||
{ "squk/gdrama-syntax.vim", ft = "gdrama" },
|
|
||||||
{ "nvim-lua/plenary.nvim", lazy = false },
|
|
||||||
{ "squk/java-syntax.vim", ft = "java" },
|
|
||||||
{ "udalov/kotlin-vim", event = "VeryLazy", ft = "kotlin" },
|
|
||||||
{ "andymass/vim-matchup", event = "VimEnter" },
|
|
||||||
{ "jghauser/mkdir.nvim", event = "BufWritePre" },
|
|
||||||
{
|
|
||||||
"rmagatti/auto-session",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-telescope/telescope.nvim", -- Only needed if you want to use session lens
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("auto-session").setup({
|
|
||||||
auto_session_suppress_dirs = { "~/", "~/Projects", "~/Downloads", "/" },
|
|
||||||
args_allow_single_directory = false,
|
|
||||||
bypass_save_filetypes = { "netrw" },
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
"tpope/vim-abolish",
|
|
||||||
{
|
|
||||||
"johmsalas/text-case.nvim",
|
|
||||||
dependencies = { "nvim-telescope/telescope.nvim" },
|
|
||||||
config = function()
|
|
||||||
require("textcase").setup({})
|
|
||||||
require("telescope").load_extension("textcase")
|
|
||||||
end,
|
|
||||||
cmd = {
|
|
||||||
"Subs",
|
|
||||||
},
|
|
||||||
-- stylua: ignore
|
|
||||||
keys = {
|
|
||||||
{ "<leader>tc", "<cmd>TextCaseOpenTelescope<CR>", mode = { "n", "v" }, desc = "Telescope" },
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
"RRethy/vim-illuminate",
|
||||||
"NvChad/nvim-colorizer.lua",
|
"kdheepak/lazygit.nvim",
|
||||||
ft = "lua",
|
"flwyd/vim-conjoin",
|
||||||
config = function()
|
"rafcamlet/nvim-luapad",
|
||||||
require("colorizer").setup()
|
"vim-scripts/vcscommand.vim",
|
||||||
end,
|
"AndrewRadev/tagalong.vim",
|
||||||
},
|
"AndrewRadev/yankwin.vim",
|
||||||
{
|
{ "squk/gdrama-syntax.vim", ft = "gdrama" },
|
||||||
|
{ "nvim-lua/plenary.nvim", lazy = false },
|
||||||
|
{ "squk/java-syntax.vim", ft = "java" },
|
||||||
|
{ "udalov/kotlin-vim", event = "VeryLazy", ft = "kotlin" },
|
||||||
|
{ "andymass/vim-matchup", event = "VimEnter" },
|
||||||
|
{ "jghauser/mkdir.nvim", event = "BufWritePre" },
|
||||||
|
{
|
||||||
|
"rmagatti/auto-session",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-telescope/telescope.nvim", -- Only needed if you want to use session lens
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("auto-session").setup({
|
||||||
|
auto_session_suppress_dirs = { "~/", "~/Projects", "~/Downloads", "/" },
|
||||||
|
args_allow_single_directory = false,
|
||||||
|
bypass_save_filetypes = { "netrw" },
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
"tpope/vim-abolish",
|
||||||
|
{
|
||||||
|
"johmsalas/text-case.nvim",
|
||||||
|
dependencies = { "nvim-telescope/telescope.nvim" },
|
||||||
|
config = function()
|
||||||
|
require("textcase").setup({})
|
||||||
|
require("telescope").load_extension("textcase")
|
||||||
|
end,
|
||||||
|
cmd = {
|
||||||
|
"Subs",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"NvChad/nvim-colorizer.lua",
|
||||||
|
ft = "lua",
|
||||||
|
config = function()
|
||||||
|
require("colorizer").setup()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
|
||||||
"andweeb/presence.nvim",
|
"andweeb/presence.nvim",
|
||||||
cond = not use_google(),
|
cond = not use_google(),
|
||||||
config = function()
|
config = function()
|
||||||
require("presence").setup({
|
require("presence").setup({
|
||||||
main_image = "file",
|
main_image = "file",
|
||||||
show_time = false,
|
show_time = false,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ntpeters/vim-better-whitespace",
|
"ntpeters/vim-better-whitespace",
|
||||||
config = function()
|
config = function()
|
||||||
vim.g.better_whitespace_filetypes_blacklist = { "dashboard" }
|
vim.g.better_whitespace_filetypes_blacklist = { "dashboard" }
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"mbbill/undotree",
|
"mbbill/undotree",
|
||||||
cmd = "UndotreeToggle",
|
cmd = "UndotreeToggle",
|
||||||
config = function()
|
config = function()
|
||||||
vim.g.undotree_SetFocusWhenToggle = 1
|
vim.g.undotree_SetFocusWhenToggle = 1
|
||||||
end,
|
end,
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = { { "<leader>ut", ":UndotreeToggle<CR>" } },
|
keys = { { "<leader>ut", ":UndotreeToggle<CR>" } },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"stevearc/aerial.nvim",
|
"stevearc/aerial.nvim",
|
||||||
opts = {},
|
opts = {},
|
||||||
cmd = { "AerialToggle", "AerialOn" },
|
cmd = { "AerialToggle", "AerialOn" },
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = { { "<leader>so", ":AerialToggle<CR>", desc = "[S]symbols [O]utline" } },
|
keys = { { "<leader>so", ":AerialToggle<CR>", desc = "[S]symbols [O]utline" } },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"andrewferrier/debugprint.nvim",
|
"andrewferrier/debugprint.nvim",
|
||||||
opts = {},
|
opts = {},
|
||||||
-- Dependency only needed for NeoVim 0.8
|
-- Dependency only needed for NeoVim 0.8
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
},
|
},
|
||||||
-- Remove the following line to use development versions,
|
-- Remove the following line to use development versions,
|
||||||
-- not just the formal releases
|
-- not just the formal releases
|
||||||
version = "*",
|
version = "*",
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>dp", ":lua require('debugprint').debugprint()<cr>", desc = "Debug print" },
|
{ "<leader>dp", ":lua require('debugprint').debugprint()<cr>", desc = "Debug print" },
|
||||||
@ -146,5 +158,5 @@ return {
|
|||||||
{ "<leader>dq", ":lua require('debugprint').debugprint({variable = true})<cr>", desc = "Debug print" },
|
{ "<leader>dq", ":lua require('debugprint').debugprint({variable = true})<cr>", desc = "Debug print" },
|
||||||
{ "<leader>dQ", ":lua require('debugprint').debugprint({variable = true, above = true})<cr>", desc = "Debug print", },
|
{ "<leader>dQ", ":lua require('debugprint').debugprint({variable = true, above = true})<cr>", desc = "Debug print", },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,30 @@
|
|||||||
return {
|
return {
|
||||||
"LunarVim/bigfile.nvim",
|
"LunarVim/bigfile.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
filesize = 2, -- size of the file in MiB, the plugin round file sizes to the closest MiB
|
filesize = 2, -- size of the file in MiB, the plugin round file sizes to the closest MiB
|
||||||
pattern = { "*" }, -- autocmd pattern or function see <### Overriding the detection of big files>
|
pattern = function(bufnr, filesize_mib)
|
||||||
features = { -- features to disable
|
-- you can't use `nvim_buf_line_count` because this runs on BufReadPre
|
||||||
|
local file_contents = vim.fn.readfile(vim.api.nvim_buf_get_name(bufnr))
|
||||||
|
local file_lines = #file_contents
|
||||||
|
local filetype = vim.filetype.match({ buf = bufnr })
|
||||||
|
if filetype == "c" or filetype == "cpp" then
|
||||||
|
if file_lines > 1000 then
|
||||||
|
vim.b.codefmt_formatt = "" -- disable codefmt
|
||||||
|
vim.cmd(":FormatDisable") -- disable conform
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return filesize_mib > 1
|
||||||
|
end,
|
||||||
|
features = { -- features to disable
|
||||||
"indent_blankline",
|
"indent_blankline",
|
||||||
"illuminate",
|
"illuminate",
|
||||||
"lsp",
|
"lsp",
|
||||||
"treesitter",
|
"treesitter",
|
||||||
"syntax",
|
-- "syntax",
|
||||||
"matchparen",
|
"matchparen",
|
||||||
"vimopts",
|
-- "vimopts",
|
||||||
"filetype",
|
-- "filetype",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,39 +1,51 @@
|
|||||||
local use_google = require("utils").use_google
|
local use_google = require("utils").use_google
|
||||||
local flags = require("utils").flags
|
local flags = require("utils").flags
|
||||||
|
local kind_icons = {
|
||||||
|
-- LLM Provider icons
|
||||||
|
claude = "",
|
||||||
|
openai = "",
|
||||||
|
codestral = "",
|
||||||
|
gemini = "",
|
||||||
|
nvim_ciderlsp = "",
|
||||||
|
Groq = "",
|
||||||
|
Openrouter = "",
|
||||||
|
Ollama = "",
|
||||||
|
["Llama.cpp"] = "",
|
||||||
|
Deepseek = "",
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"saghen/blink.compat",
|
"saghen/blink.compat",
|
||||||
-- use the latest release, via version = '*', if you also use the latest release for blink.cmp
|
-- use the latest release, via version = '*', if you also use the latest release for blink.cmp
|
||||||
version = "*",
|
version = "*",
|
||||||
-- lazy.nvim will automatically load the plugin when it's required by blink.cmp
|
-- lazy.nvim will automatically load the plugin when it's required by blink.cmp
|
||||||
lazy = true,
|
lazy = true,
|
||||||
cond = flags.blink,
|
cond = flags.blink,
|
||||||
-- make sure to set opts so that lazy.nvim calls blink.compat's setup
|
-- make sure to set opts so that lazy.nvim calls blink.compat's setup
|
||||||
opts = {
|
opts = {
|
||||||
impersonate_nvim_cmp = true,
|
impersonate_nvim_cmp = true,
|
||||||
debug = true,
|
debug = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"saghen/blink.cmp",
|
"saghen/blink.cmp",
|
||||||
lazy = false, -- lazy loading handled internally
|
lazy = false, -- lazy loading handled internally
|
||||||
cond = flags.blink,
|
cond = flags.blink,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"Exafunction/codeium.nvim",
|
"chrisgrieser/cmp-nerdfont",
|
||||||
"chrisgrieser/cmp-nerdfont",
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
"mikavilpas/blink-ripgrep.nvim",
|
||||||
"mikavilpas/blink-ripgrep.nvim",
|
"moyiz/blink-emoji.nvim",
|
||||||
"moyiz/blink-emoji.nvim",
|
"rafamadriz/friendly-snippets", -- optional: provides snippets for the snippet source
|
||||||
"rafamadriz/friendly-snippets", -- optional: provides snippets for the snippet source
|
"saghen/blink.compat",
|
||||||
"saghen/blink.compat",
|
},
|
||||||
},
|
version = "v0.*", -- use a release tag to download pre-built binaries
|
||||||
version = "v0.*", -- use a release tag to download pre-built binaries
|
-- build = 'cargo build --release',
|
||||||
-- build = 'cargo build --release',
|
|
||||||
|
|
||||||
---@module 'blink.cmp'
|
---@module 'blink.cmp'
|
||||||
---@type blink.cmp.Config
|
---@type blink.cmp.Config
|
||||||
opts = {
|
opts = {
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keymap = {
|
keymap = {
|
||||||
preset = "none",
|
preset = "none",
|
||||||
@ -50,104 +62,122 @@ return {
|
|||||||
["<S-Up>"] = { "scroll_documentation_up", "fallback" },
|
["<S-Up>"] = { "scroll_documentation_up", "fallback" },
|
||||||
["<S-Down>"] = { "scroll_documentation_down", "fallback" },
|
["<S-Down>"] = { "scroll_documentation_down", "fallback" },
|
||||||
},
|
},
|
||||||
sources = {
|
appearance = {
|
||||||
default = function(ctx)
|
use_nvim_cmp_as_default = true,
|
||||||
local providerToEnable = {
|
nerd_font_variant = "normal",
|
||||||
"lsp",
|
kind_icons = kind_icons,
|
||||||
"path",
|
},
|
||||||
"snippets",
|
sources = {
|
||||||
"ripgrep",
|
default = function(ctx)
|
||||||
"emoji",
|
local providerToEnable = {
|
||||||
"nerdfont",
|
"lsp",
|
||||||
"buffer",
|
"path",
|
||||||
}
|
"snippets",
|
||||||
if use_google() then
|
"ripgrep",
|
||||||
table.insert(providerToEnable, "nvim_ciderlsp")
|
"emoji",
|
||||||
table.insert(providerToEnable, "buganizer")
|
"nerdfont",
|
||||||
else
|
"buffer",
|
||||||
table.insert(providerToEnable, "codeium")
|
"avante",
|
||||||
end
|
}
|
||||||
return providerToEnable
|
if use_google() then
|
||||||
end,
|
table.insert(providerToEnable, "nvim_ciderlsp")
|
||||||
-- default = { "lsp" },
|
table.insert(providerToEnable, "buganizer")
|
||||||
providers = {
|
-- table.insert(providerToEnable, "avante")
|
||||||
lsp = { name = "LSP", module = "blink.cmp.sources.lsp", score_offset = 90 },
|
else
|
||||||
-- dont show LuaLS require statements when lazydev has items
|
-- table.insert(providerToEnable, "avante")
|
||||||
lazydev = { name = "LazyDev", module = "lazydev.integrations.blink", fallbacks = { "lsp" } },
|
table.insert(providerToEnable, "minuet")
|
||||||
ripgrep = {
|
end
|
||||||
module = "blink-ripgrep",
|
return providerToEnable
|
||||||
name = "Ripgrep",
|
end,
|
||||||
-- the options below are optional, some default values are shown
|
providers = {
|
||||||
---@module "blink-ripgrep"
|
lsp = { name = "LSP", module = "blink.cmp.sources.lsp", score_offset = 90 },
|
||||||
---@type blink-ripgrep.Options
|
-- dont show LuaLS require statements when lazydev has items
|
||||||
opts = {
|
lazydev = { name = "LazyDev", module = "lazydev.integrations.blink", fallbacks = { "lsp" } },
|
||||||
prefix_min_len = 3,
|
ripgrep = {
|
||||||
context_size = 5,
|
module = "blink-ripgrep",
|
||||||
max_filesize = "1M",
|
name = "Ripgrep",
|
||||||
additional_rg_options = {},
|
-- the options below are optional, some default values are shown
|
||||||
},
|
---@module "blink-ripgrep"
|
||||||
},
|
---@type blink-ripgrep.Options
|
||||||
-- https://github.com/moyiz/blink-emoji.nvim
|
opts = {
|
||||||
emoji = {
|
prefix_min_len = 3,
|
||||||
module = "blink-emoji",
|
context_size = 5,
|
||||||
name = "Emoji",
|
max_filesize = "1M",
|
||||||
score_offset = 15, -- the higher the number, the higher the priority
|
additional_rg_options = {},
|
||||||
opts = { insert = true }, -- Insert emoji (default) or complete its name
|
},
|
||||||
},
|
score_offset = 20, -- the higher the number, the higher the priority
|
||||||
buffer = {
|
},
|
||||||
name = "Buffer",
|
-- https://github.com/moyiz/blink-emoji.nvim
|
||||||
enabled = true,
|
emoji = {
|
||||||
max_items = 3,
|
module = "blink-emoji",
|
||||||
module = "blink.cmp.sources.buffer",
|
name = "Emoji",
|
||||||
min_keyword_length = 4,
|
score_offset = 1, -- the higher the number, the higher the priority
|
||||||
score_offset = 15, -- the higher the number, the higher the priority
|
opts = { insert = true }, -- Insert emoji (default) or complete its name
|
||||||
},
|
},
|
||||||
-- compat sources
|
buffer = {
|
||||||
nerdfont = {
|
name = "Buffer",
|
||||||
name = "nerdfont",
|
enabled = true,
|
||||||
module = "blink.compat.source",
|
max_items = 3,
|
||||||
},
|
module = "blink.cmp.sources.buffer",
|
||||||
codeium = {
|
min_keyword_length = 4,
|
||||||
name = "codeium",
|
score_offset = 15, -- the higher the number, the higher the priority
|
||||||
module = "blink.compat.source",
|
},
|
||||||
score_offset = 100,
|
-- compat sources
|
||||||
},
|
nerdfont = {
|
||||||
nvim_ciderlsp = {
|
name = "nerdfont",
|
||||||
name = "nvim_ciderlsp",
|
module = "blink.compat.source",
|
||||||
module = "blink.compat.source",
|
score_offset = 1, -- the higher the number, the higher the priority
|
||||||
score_offset = 100,
|
},
|
||||||
},
|
minuet = {
|
||||||
buganizer = {
|
name = "minuet",
|
||||||
name = "nvim_buganizer",
|
module = "minuet.blink",
|
||||||
module = "blink.compat.source",
|
score_offset = 100, -- Gives minuet higher priority among suggestions
|
||||||
},
|
},
|
||||||
},
|
-- avante = {
|
||||||
},
|
-- module = "blink-cmp-avante",
|
||||||
-- experimental signature help support
|
-- name = "Avante",
|
||||||
signature = { enabled = true },
|
-- opts = {
|
||||||
completion = {
|
-- -- options for blink-cmp-avante
|
||||||
list = {
|
-- },
|
||||||
|
-- },
|
||||||
|
nvim_ciderlsp = {
|
||||||
|
name = "nvim_ciderlsp",
|
||||||
|
module = "blink.compat.source",
|
||||||
|
score_offset = 100,
|
||||||
|
},
|
||||||
|
buganizer = {
|
||||||
|
name = "nvim_buganizer",
|
||||||
|
module = "blink.compat.source",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- experimental signature help support
|
||||||
|
signature = { enabled = true },
|
||||||
|
completion = {
|
||||||
|
-- Recommended to avoid unnecessary request
|
||||||
|
trigger = { prefetch_on_insert = false },
|
||||||
|
list = {
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
selection = {
|
selection = {
|
||||||
preselect = function(ctx) return ctx.mode ~= 'cmdline' end,
|
preselect = function(ctx) return ctx.mode ~= 'cmdline' end,
|
||||||
auto_insert = function(ctx) return ctx.mode ~= 'cmdline' end,
|
auto_insert = function(ctx) return ctx.mode ~= 'cmdline' end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
documentation = {
|
documentation = {
|
||||||
auto_show = true,
|
auto_show = true,
|
||||||
},
|
},
|
||||||
-- Displays a preview of the selected item on the current line
|
-- Displays a preview of the selected item on the current line
|
||||||
ghost_text = {
|
ghost_text = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
},
|
},
|
||||||
trigger = {
|
trigger = {
|
||||||
show_on_x_blocked_trigger_characters = { "'", '"', "(", "{" },
|
show_on_x_blocked_trigger_characters = { "'", '"', "(", "{" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- allows extending the providers array elsewhere in your config
|
-- allows extending the providers array elsewhere in your config
|
||||||
-- without having to redefine it
|
-- without having to redefine it
|
||||||
opts_extend = { "sources.default" },
|
opts_extend = { "sources.default" },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,6 @@ return {
|
|||||||
event = { "InsertEnter", "CmdlineEnter" },
|
event = { "InsertEnter", "CmdlineEnter" },
|
||||||
cond = not flags.blink,
|
cond = not flags.blink,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"Exafunction/codeium.nvim",
|
|
||||||
"FelipeLema/cmp-async-path",
|
"FelipeLema/cmp-async-path",
|
||||||
"amarakon/nvim-cmp-buffer-lines",
|
"amarakon/nvim-cmp-buffer-lines",
|
||||||
"chrisgrieser/cmp-nerdfont",
|
"chrisgrieser/cmp-nerdfont",
|
||||||
@ -39,8 +38,6 @@ return {
|
|||||||
if use_google() then
|
if use_google() then
|
||||||
table.insert(conditionalSources, { name = "nvim_ciderlsp", priority = 8 })
|
table.insert(conditionalSources, { name = "nvim_ciderlsp", priority = 8 })
|
||||||
table.insert(conditionalSources, { name = "buganizer", option = { notifications_enabled = true } })
|
table.insert(conditionalSources, { name = "buganizer", option = { notifications_enabled = true } })
|
||||||
else
|
|
||||||
table.insert(conditionalSources, { name = "codeium", priority = 8 })
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local lspkind = require("lspkind")
|
local lspkind = require("lspkind")
|
||||||
@ -117,7 +114,6 @@ return {
|
|||||||
async_path = " path",
|
async_path = " path",
|
||||||
buffer = " Buf",
|
buffer = " Buf",
|
||||||
cmdline = " cmd",
|
cmdline = " cmd",
|
||||||
codeium = " Codeium",
|
|
||||||
crates = " rust",
|
crates = " rust",
|
||||||
luasnip = " snip",
|
luasnip = " snip",
|
||||||
buganizer = " Buganizer",
|
buganizer = " Buganizer",
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
local use_google = require("utils").use_google
|
|
||||||
return {
|
|
||||||
{
|
|
||||||
"Exafunction/codeium.nvim",
|
|
||||||
-- commit = "b1ff0d6c993e3d87a4362d2ccd6c660f7444599f",
|
|
||||||
event = "VeryLazy",
|
|
||||||
-- event = "InsertEnter",
|
|
||||||
cond = not use_google(),
|
|
||||||
dependencies = {
|
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("codeium").setup({})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,90 +1,89 @@
|
|||||||
local use_google = require("utils").use_google
|
local use_google = require("utils").use_google
|
||||||
|
|
||||||
vim.g.disable_autoformat = false
|
|
||||||
vim.api.nvim_create_user_command("FormatDisable", function(args)
|
|
||||||
if args.bang then
|
|
||||||
-- FormatDisable! will disable formatting just for this buffer
|
|
||||||
vim.b.disable_autoformat = true
|
|
||||||
else
|
|
||||||
vim.g.disable_autoformat = true
|
|
||||||
end
|
|
||||||
end, {
|
|
||||||
desc = "Disable autoformat-on-save",
|
|
||||||
bang = true,
|
|
||||||
})
|
|
||||||
vim.api.nvim_create_user_command("FormatEnable", function()
|
|
||||||
vim.b.disable_autoformat = false
|
|
||||||
vim.g.disable_autoformat = false
|
|
||||||
end, {
|
|
||||||
desc = "Re-enable autoformat-on-save",
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
|
||||||
pattern = "*",
|
|
||||||
callback = function(args)
|
|
||||||
if vim.g.disable_autoformat or vim.b[args.buf].disable_autoformat then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
require("conform").format({ bufnr = args.buf })
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_user_command("Format", function(args)
|
|
||||||
local range = nil
|
|
||||||
if args.count ~= -1 then
|
|
||||||
local end_line = vim.api.nvim_buf_get_lines(0, args.line2 - 1, args.line2, true)[1]
|
|
||||||
range = {
|
|
||||||
start = { args.line1, 0 },
|
|
||||||
["end"] = { args.line2, end_line:len() },
|
|
||||||
}
|
|
||||||
end
|
|
||||||
require("conform").format({ async = true, lsp_format = "fallback", range = range })
|
|
||||||
end, { range = true })
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"stevearc/conform.nvim",
|
"stevearc/conform.nvim",
|
||||||
event = { "BufWritePre" },
|
event = { "BufWritePre" },
|
||||||
cmd = { "ConformInfo", "FormatDisable", "FormatEnable" },
|
cmd = { "ConformInfo", "FormatDisable", "FormatEnable" },
|
||||||
keys = {
|
keys = {
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
{ "<leader>fmt", function() require("conform").format({ async = true, lsp_fallback = true }) end, mode = "", desc = "Format buffer", },
|
{ "<leader>fmt", function() require("conform").format({ async = true, lsp_fallback = true }) end, mode = "", desc = "Format buffer", },
|
||||||
{ "<leader>fj", ":%!python -m json.tool" },
|
{ "<leader>fj", ":%!python -m json.tool" },
|
||||||
},
|
},
|
||||||
-- This will provide type hinting with LuaLS
|
config = function()
|
||||||
---@module "conform"
|
vim.g.disable_autoformat = false
|
||||||
---@type conform.setupOpts
|
vim.api.nvim_create_user_command("FormatDisable", function(args)
|
||||||
opts = {
|
if args.bang then
|
||||||
log_level = vim.log.levels.DEBUG,
|
-- FormatDisable! will disable formatting just for this buffer
|
||||||
formatters_by_ft = {
|
vim.b.disable_autoformat = true
|
||||||
rust = { "rustfmt", lsp_format = "fallback" },
|
else
|
||||||
-- Conform will run multiple formatters sequentially
|
vim.g.disable_autoformat = true
|
||||||
-- go = { "goimports", "gofmt" },
|
end
|
||||||
-- Use a sub-list to run only the first available formatter
|
end, {
|
||||||
-- javascript = { { "prettierd", "prettier" } },
|
desc = "Disable autoformat-on-save",
|
||||||
lua = { "stylua" },
|
bang = true,
|
||||||
-- Conform will run multiple formatters sequentially
|
})
|
||||||
python = { "isort", "black" },
|
vim.api.nvim_create_user_command("FormatEnable", function()
|
||||||
-- Use a sub-list to run only the first available formatter
|
vim.b.disable_autoformat = false
|
||||||
javascript = { { "prettierd", "prettier" } },
|
vim.g.disable_autoformat = false
|
||||||
gdscript = { "gdformat" },
|
end, {
|
||||||
ron = { "ronfmt" },
|
desc = "Re-enable autoformat-on-save",
|
||||||
dashboard = {},
|
})
|
||||||
-- Use the "*" filetype to run formatters on all filetypes.
|
|
||||||
-- ["*"] = { "codespell" },
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
-- Use the "_" filetype to run formatters on filetypes that don't
|
pattern = "*",
|
||||||
-- have other formatters configured.
|
callback = function(args)
|
||||||
["_"] = { "trim_whitespace" },
|
if vim.g.disable_autoformat or vim.b[args.buf].disable_autoformat then
|
||||||
},
|
return
|
||||||
formatters = {
|
end
|
||||||
-- ronfmt = {
|
require("conform").format({ bufnr = args.buf })
|
||||||
-- command = "ronfmt",
|
end,
|
||||||
-- args = { "-d", "$FILENAME" },
|
})
|
||||||
-- },
|
|
||||||
gdformat = {
|
vim.api.nvim_create_user_command("Format", function(args)
|
||||||
prepend_args = { "-l", "100" },
|
local range = nil
|
||||||
},
|
if args.count ~= -1 then
|
||||||
},
|
local end_line = vim.api.nvim_buf_get_lines(0, args.line2 - 1, args.line2, true)[1]
|
||||||
},
|
range = {
|
||||||
},
|
start = { args.line1, 0 },
|
||||||
|
["end"] = { args.line2, end_line:len() },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
require("conform").format({ async = true })
|
||||||
|
end, { range = true })
|
||||||
|
|
||||||
|
require("conform").setup(
|
||||||
|
{
|
||||||
|
log_level = vim.log.levels.DEBUG,
|
||||||
|
formatters_by_ft = {
|
||||||
|
rust = { "rustfmt" },
|
||||||
|
-- Conform will run multiple formatters sequentially
|
||||||
|
-- go = { "goimports", "gofmt" },
|
||||||
|
-- Use a sub-list to run only the first available formatter
|
||||||
|
lua = { "stylua" },
|
||||||
|
-- Conform will run multiple formatters sequentially
|
||||||
|
python = { "isort" },
|
||||||
|
-- Use a sub-list to run only the first available formatter
|
||||||
|
javascript = { "prettier" },
|
||||||
|
gdscript = { "gdformat" },
|
||||||
|
ron = { "ronfmt" },
|
||||||
|
dashboard = {},
|
||||||
|
-- Use the "*" filetype to run formatters on all filetypes.
|
||||||
|
-- ["*"] = { "codespell" },
|
||||||
|
-- Use the "_" filetype to run formatters on filetypes that don't
|
||||||
|
-- have other formatters configured.
|
||||||
|
["_"] = { "trim_whitespace" },
|
||||||
|
},
|
||||||
|
formatters = {
|
||||||
|
-- ronfmt = {
|
||||||
|
-- command = "ronfmt",
|
||||||
|
-- args = { "-d", "$FILENAME" },
|
||||||
|
-- },
|
||||||
|
gdformat = {
|
||||||
|
prepend_args = { "-l", "100" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
local use_google = require("utils").use_google
|
local use_google = require("utils").use_google
|
||||||
|
|
||||||
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/")
|
vim.opt.rtp:append("/google/src/head/depot/google3/experimental/users/fentanes/nvgoog/")
|
||||||
@ -11,69 +11,69 @@ local glugOpts = require("glug").glugOpts
|
|||||||
local superlazy = require("nvgoog.util.superlazy")
|
local superlazy = require("nvgoog.util.superlazy")
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{ import = "nvgoog.google.format" },
|
{ import = "nvgoog.google.format" },
|
||||||
-- maktaba is required by all google plugins
|
-- maktaba is required by all google plugins
|
||||||
glug("maktaba", {
|
glug("maktaba", {
|
||||||
lazy = true,
|
lazy = true,
|
||||||
dependencies = {},
|
dependencies = {},
|
||||||
config = function() -- init?
|
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("googler", {
|
glug("googler", {
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
}),
|
}),
|
||||||
glug("glaive"),
|
glug("glaive"),
|
||||||
glug("alert"),
|
glug("alert"),
|
||||||
glug("googlespell"),
|
glug("googlespell"),
|
||||||
-- Add support for google filetypes
|
-- Add support for google filetypes
|
||||||
glug("google-filetypes", { event = { "BufReadPre", "BufNewFile" }, dependencies = {} }),
|
glug("google-filetypes", { event = { "BufReadPre", "BufNewFile" }, dependencies = {} }),
|
||||||
|
|
||||||
glug("add_usings"),
|
glug("add_usings"),
|
||||||
-- Autogens boilerplate when creating new files
|
-- Autogens boilerplate when creating new files
|
||||||
glug("autogen", {
|
glug("autogen", {
|
||||||
event = "BufNewFile",
|
event = "BufNewFile",
|
||||||
}),
|
}),
|
||||||
-- Adds G4 support to the vcscommand plugin
|
-- Adds G4 support to the vcscommand plugin
|
||||||
glug("googlepaths"),
|
glug("googlepaths"),
|
||||||
-- Set up syntax, indent, and core settings for various filetypes
|
-- Set up syntax, indent, and core settings for various filetypes
|
||||||
superlazy(glug("ft-cpp", { event = "BufRead,BufNewFile *.[ch],*.cc,*.cpp" })),
|
superlazy(glug("ft-cpp", { event = "BufRead,BufNewFile *.[ch],*.cc,*.cpp" })),
|
||||||
-- superlazy(glug("ft-go", { event = "BufRead,BufNewFile *.go" })),
|
superlazy(glug("ft-go", { event = "BufRead,BufNewFile *.go" })),
|
||||||
superlazy(glug("ft-java", { event = "BufRead,BufNewFile *.java" })),
|
superlazy(glug("ft-java", { event = "BufRead,BufNewFile *.java" })),
|
||||||
superlazy(glug("ft-javascript", { event = "BufRead,BufNewFile *.js,*.jsx" })),
|
superlazy(glug("ft-javascript", { event = "BufRead,BufNewFile *.js,*.jsx" })),
|
||||||
superlazy(glug("ft-kotlin", { event = "BufRead,BufNewFile *.kt,*.kts" })),
|
superlazy(glug("ft-kotlin", { event = "BufRead,BufNewFile *.kt,*.kts" })),
|
||||||
superlazy(glug("ft-python", { event = "BufRead,BufNewFile *.py" })),
|
superlazy(glug("ft-python", { event = "BufRead,BufNewFile *.py" })),
|
||||||
|
|
||||||
-- Configures nvim to respect Google's coding style
|
-- Configures nvim to respect Google's coding style
|
||||||
superlazy(glug("googlestyle", { event = { "BufRead", "BufNewFile" } })),
|
superlazy(glug("googlestyle", { event = { "BufRead", "BufNewFile" } })),
|
||||||
|
|
||||||
glug("ft-soy"),
|
glug("ft-soy"),
|
||||||
glug("ft-gss"),
|
glug("ft-gss"),
|
||||||
glug("ft-proto"),
|
glug("ft-proto"),
|
||||||
glug("g4"),
|
glug("g4"),
|
||||||
glug("outline-window"),
|
glug("outline-window"),
|
||||||
glug("fzf-query"),
|
glug("fzf-query"),
|
||||||
-- Open current file in chrome
|
-- Open current file in chrome
|
||||||
glug("corpweb", {
|
glug("corpweb", {
|
||||||
dependencies = {
|
dependencies = {
|
||||||
glug("launchbrowser"),
|
glug("launchbrowser"),
|
||||||
},
|
},
|
||||||
cmd = {
|
cmd = {
|
||||||
-- Launches {query} under codesearch in a web browser
|
-- Launches {query} under codesearch in a web browser
|
||||||
"CorpWebCs",
|
"CorpWebCs",
|
||||||
-- Launches the current file under codesearch in a web browser
|
-- Launches the current file under codesearch in a web browser
|
||||||
"CorpWebCsFile",
|
"CorpWebCsFile",
|
||||||
-- Launches the current file doc view (i.e., Cantata, G3Docs, or godoc)
|
-- Launches the current file doc view (i.e., Cantata, G3Docs, or godoc)
|
||||||
"CorpWebDocFindFile",
|
"CorpWebDocFindFile",
|
||||||
-- Launches the current CL in Critique
|
-- Launches the current CL in Critique
|
||||||
"CorpWebCritiqueCl",
|
"CorpWebCritiqueCl",
|
||||||
-- Launches the current CL in Cider
|
-- Launches the current CL in Cider
|
||||||
"CorpWebCider",
|
"CorpWebCider",
|
||||||
-- Launches {query} under cs.chromium.org in a web browser
|
-- Launches {query} under cs.chromium.org in a web browser
|
||||||
"CorpWebChromeCs",
|
"CorpWebChromeCs",
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
glug("relatedfiles", {
|
glug("relatedfiles", {
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>rb", ":exec relatedfiles#selector#JumpToBuild()<CR>" },
|
{ "<leader>rb", ":exec relatedfiles#selector#JumpToBuild()<CR>" },
|
||||||
@ -81,232 +81,242 @@ return {
|
|||||||
{ "<leader>rh", ":exec relatedfiles#selector#JumpToHeader()<CR>" },
|
{ "<leader>rh", ":exec relatedfiles#selector#JumpToHeader()<CR>" },
|
||||||
{ "<leader>rc", ":exec relatedfiles#selector#JumpToCodeFile()<CR>" },
|
{ "<leader>rc", ":exec relatedfiles#selector#JumpToCodeFile()<CR>" },
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
{ "junegunn/fzf", dir = "~/.fzf", build = "./install --all" },
|
{ "junegunn/fzf", dir = "~/.fzf", build = "./install --all" },
|
||||||
{ "junegunn/fzf.vim", dependencies = { "junegunn/fzf" } },
|
{ "junegunn/fzf.vim", dependencies = { "junegunn/fzf" } },
|
||||||
-- Format google code
|
-- Format google code
|
||||||
glug("codefmt-google", {
|
glug("codefmt-google", {
|
||||||
dependencies = {
|
dependencies = {
|
||||||
glug("codefmt", {
|
glug("codefmt", {
|
||||||
opts = {
|
opts = {
|
||||||
clang_format_executable = "/usr/bin/clang-format",
|
clang_format_executable = "/usr/bin/clang-format",
|
||||||
clang_format_style = "function('codefmtgoogle#GetClangFormatStyle')",
|
clang_format_style = "function('codefmtgoogle#GetClangFormatStyle')",
|
||||||
gofmt_executable = "/usr/lib/google-golang/bin/gofmt",
|
gofmt_executable = "/usr/lib/google-golang/bin/gofmt",
|
||||||
prettier_executable = "/google/data/ro/teams/prettier/prettier",
|
prettier_executable = "/google/data/ro/teams/prettier/prettier",
|
||||||
ktfmt_executable = { "/google/bin/releases/kotlin-google-eng/ktfmt/ktfmt", "--google-style" },
|
ktfmt_executable = { "/google/bin/releases/kotlin-google-eng/ktfmt/ktfmt", "--google-style" },
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
auto_format = {
|
auto_format = {
|
||||||
["borg"] = "gclfmt",
|
["borg"] = "gclfmt",
|
||||||
["gcl"] = "gclfmt",
|
["gcl"] = "gclfmt",
|
||||||
["patchpanel"] = "gclfmt",
|
["patchpanel"] = "gclfmt",
|
||||||
["bzl"] = "buildifier",
|
["bzl"] = "buildifier",
|
||||||
["c"] = "clang-format",
|
["c"] = "clang-format",
|
||||||
["cpp"] = "clang-format",
|
["cpp"] = "clang-format",
|
||||||
["javascript"] = "clang-format",
|
["javascript"] = "clang-format",
|
||||||
["typescript"] = "clang-format",
|
["typescript"] = "clang-format",
|
||||||
["dart"] = "dartfmt",
|
["dart"] = "dartfmt",
|
||||||
["go"] = "gofmt",
|
["go"] = "gofmt",
|
||||||
["java"] = "google-java-format",
|
["java"] = "google-java-format",
|
||||||
["kotlin"] = "ktfmt",
|
["kotlin"] = "ktfmt",
|
||||||
["jslayout"] = "jslfmt",
|
["jslayout"] = "jslfmt",
|
||||||
["markdown"] = "mdformat",
|
["markdown"] = "mdformat",
|
||||||
["ncl"] = "nclfmt",
|
["ncl"] = "nclfmt",
|
||||||
["python,piccolo"] = "pyformat",
|
["python,piccolo"] = "pyformat",
|
||||||
["soy"] = "soyfmt",
|
["soy"] = "soyfmt",
|
||||||
["textpb"] = "text-proto-format",
|
["textpb"] = "text-proto-format",
|
||||||
["proto"] = "protofmt",
|
["proto"] = "protofmt",
|
||||||
["sql"] = "format_sql",
|
["sql"] = "format_sql",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
cmd = { "FormatLines", "FormatCode", "AutoFormatBuffer" },
|
cmd = { "FormatLines", "FormatCode", "AutoFormatBuffer" },
|
||||||
event = "VimEnter",
|
event = "VimEnter",
|
||||||
|
|
||||||
-- Setting up autocmds in init allows deferring loading the plugin until
|
-- Setting up autocmds in init allows deferring loading the plugin until
|
||||||
-- the `BufWritePre` event. One caveat is we must call `codefmt#FormatBuffer()`
|
-- the `BufWritePre` event. One caveat is we must call `codefmt#FormatBuffer()`
|
||||||
-- manually the first time since the plugin relies on the `BufWritePre` command to call it,
|
-- manually the first time since the plugin relies on the `BufWritePre` command to call it,
|
||||||
-- but by the time it's first loaded it has already happened.
|
-- but by the time it's first loaded it has already happened.
|
||||||
-- TODO: check if that is fixed when the following issue is fixed
|
-- TODO: check if that is fixed when the following issue is fixed
|
||||||
-- https://github.com/folke/lazy.nvim/issues/858
|
-- https://github.com/folke/lazy.nvim/issues/858
|
||||||
-- if so, remove the call to `FormatBuffer`
|
-- if so, remove the call to `FormatBuffer`
|
||||||
init = function(plugin)
|
init = function(plugin)
|
||||||
local group = vim.api.nvim_create_augroup("autoformat_settings", {})
|
local group = vim.api.nvim_create_augroup("autoformat_settings", {})
|
||||||
local function autocmd(filetypes, formatter)
|
local function autocmd(filetypes, formatter)
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
pattern = filetypes,
|
pattern = filetypes,
|
||||||
group = group,
|
group = group,
|
||||||
callback = function(event)
|
callback = function(event)
|
||||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
buffer = event.buf,
|
buffer = event.buf,
|
||||||
group = group,
|
group = group,
|
||||||
once = true,
|
once = true,
|
||||||
command = "call codefmt#FormatBuffer() | AutoFormatBuffer " .. formatter,
|
command = "call codefmt#FormatBuffer() | AutoFormatBuffer " .. formatter,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
-- Build opts from possible parent specs since lazy.nvim doesn't provide it in `init`
|
-- Build opts from possible parent specs since lazy.nvim doesn't provide it in `init`
|
||||||
local plugin_opts = require("lazy.core.plugin").values(plugin, "opts", false)
|
local plugin_opts = require("lazy.core.plugin").values(plugin, "opts", false)
|
||||||
for filetypes, formatter in pairs(plugin_opts.auto_format or {}) do
|
for filetypes, formatter in pairs(plugin_opts.auto_format or {}) do
|
||||||
autocmd(filetypes, formatter)
|
autocmd(filetypes, formatter)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
-- Run blaze commands
|
-- Run blaze commands
|
||||||
glug("blaze", {
|
glug("blaze", {
|
||||||
dependencies = {
|
dependencies = {
|
||||||
glug("blazedeps"),
|
glug("blazedeps"),
|
||||||
},
|
},
|
||||||
cmd = {
|
cmd = {
|
||||||
"Blaze",
|
"Blaze",
|
||||||
"BlazeGoToSponge",
|
"BlazeGoToSponge",
|
||||||
"BlazeViewCommandLog",
|
"BlazeViewCommandLog",
|
||||||
"BlazeLoadErrors",
|
"BlazeLoadErrors",
|
||||||
"BlazeDebugCurrentFileTest",
|
"BlazeDebugCurrentFileTest",
|
||||||
"BlazeDebugCurrentTestMethod",
|
"BlazeDebugCurrentTestMethod",
|
||||||
"BlazeDebugAddBreakpoint",
|
"BlazeDebugAddBreakpoint",
|
||||||
"BlazeDebugClearBreakpoint",
|
"BlazeDebugClearBreakpoint",
|
||||||
"BlazeDebugFinish",
|
"BlazeDebugFinish",
|
||||||
"BlazeDepsUpdate",
|
"BlazeDepsUpdate",
|
||||||
},
|
},
|
||||||
keys = function()
|
keys = function()
|
||||||
local function runCommandWithTarget(cmd)
|
local function runCommandWithTarget(cmd)
|
||||||
return function()
|
return function()
|
||||||
local targets = table.concat(vim.fn["blaze#GetTargets"](), " ")
|
local targets = table.concat(vim.fn["blaze#GetTargets"](), " ")
|
||||||
local command = "VimuxRunCommand('" .. cmd .. " " .. targets .. "')"
|
local command = "VimuxRunCommand('" .. cmd .. " " .. targets .. "')"
|
||||||
print(vim.inspect(command))
|
print(vim.inspect(command))
|
||||||
vim.cmd(command)
|
vim.cmd(command)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return {
|
return {
|
||||||
{ "<leader>b", desc = "Blaze" },
|
{ "<leader>b", desc = "Blaze" },
|
||||||
{ "<leader>bb", runCommandWithTarget("blaze build"), desc = "Blaze Build" },
|
{ "<leader>bb", runCommandWithTarget("blaze build"), desc = "Blaze Build" },
|
||||||
{ "<leader>br", runCommandWithTarget("blaze run"), desc = "Blaze Run" },
|
{ "<leader>br", runCommandWithTarget("blaze run"), desc = "Blaze Run" },
|
||||||
{ "<leader>bt", runCommandWithTarget("blaze test"), desc = "Blaze Test" },
|
{ "<leader>bt", runCommandWithTarget("blaze test"), desc = "Blaze Test" },
|
||||||
{ "<leader>bc", runCommandWithTarget("build_cleaner"), desc = "Blaze Run" },
|
{ "<leader>bc", runCommandWithTarget("build_cleaner"), desc = "Blaze Run" },
|
||||||
{
|
{
|
||||||
"<leader>yb",
|
"<leader>yb",
|
||||||
":let t = join(blaze#GetTargets(), ' ') | echo t | let @+ = t | let @\" = t<CR>",
|
":let t = join(blaze#GetTargets(), ' ') | echo t | let @+ = t | let @\" = t<CR>",
|
||||||
desc = "Yank Blaze Target",
|
desc = "Yank Blaze Target",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<leader>bq",
|
"<leader>bq",
|
||||||
function()
|
function()
|
||||||
local targets = vim.fn["blaze#GetTargets"]()
|
local targets = vim.fn["blaze#GetTargets"]()
|
||||||
for _, t in ipairs(targets) do
|
for _, t in ipairs(targets) do
|
||||||
print(vim.inspect(t))
|
print(vim.inspect(t))
|
||||||
vim.cmd("VimuxRunCommand('blaze query " .. t:gsub(":.+", "") .. ":\\*" .. "')")
|
vim.cmd("VimuxRunCommand('blaze query " .. t:gsub(":.+", "") .. ":\\*" .. "')")
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
desc = "Blaze query the current package",
|
desc = "Blaze query the current package",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
}),
|
}),
|
||||||
-- Imports
|
-- Imports
|
||||||
glug("imp-google", {
|
glug("imp-google", {
|
||||||
dependencies = {
|
dependencies = {
|
||||||
glugOpts("vim-imp", {
|
glugOpts("vim-imp", {
|
||||||
"flwyd/vim-imp",
|
"flwyd/vim-imp",
|
||||||
opts = {
|
opts = {
|
||||||
["Suggest[default]"] = { "buffer", "csearch", "ripgrep", "prompt" },
|
["Suggest[default]"] = { "buffer", "csearch", "ripgrep", "prompt" },
|
||||||
["Report[default]"] = "popupnotify",
|
["Report[default]"] = "popupnotify",
|
||||||
["Location[default]"] = "packageroot",
|
["Location[default]"] = "packageroot",
|
||||||
-- ["Location[gcl]"] = "parent",
|
-- ["Location[gcl]"] = "parent",
|
||||||
["Pick[default]"] = "fzf",
|
["Pick[default]"] = "fzf",
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
cmd = { "ImpSuggest", "ImpFirst" },
|
cmd = { "ImpSuggest", "ImpFirst" },
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>i", ":ImpSuggest <C-r><C-w><cr>" },
|
{ "<leader>I", ":ImpSuggest <C-r><C-w><cr>" },
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
url = "sso://user/fentanes/googlepaths.nvim",
|
url = "sso://user/fentanes/googlepaths.nvim",
|
||||||
event = { "VeryLazy", "BufReadCmd //*", "BufReadCmd google3/*" },
|
event = { "VeryLazy", "BufReadCmd //*", "BufReadCmd google3/*" },
|
||||||
opts = {},
|
opts = {},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "ai.nvim",
|
name = "ai.nvim",
|
||||||
url = "sso://googler@user/vvvv/ai.nvim",
|
url = "sso://googler@user/vvvv/ai.nvim",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "cmp-nvim-ciderlsp",
|
name = "cmp-nvim-ciderlsp",
|
||||||
url = "sso://googler@user/piloto/cmp-nvim-ciderlsp",
|
url = "sso://googler@user/piloto/cmp-nvim-ciderlsp",
|
||||||
event = "VimEnter",
|
event = "VimEnter",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "ciderlsp-nvim",
|
name = "ciderlsp-nvim",
|
||||||
url = "sso://googler@user/kdark/ciderlsp-nvim",
|
url = "sso://googler@user/kdark/ciderlsp-nvim",
|
||||||
event = "VimEnter",
|
event = "VimEnter",
|
||||||
},
|
},
|
||||||
-- {
|
{
|
||||||
-- name = "nvim_figtree",
|
url = "sso://user/jackcogdill/nvim-figtree",
|
||||||
-- url = "sso://googler@user/jackcogdill/nvim-figtree",
|
keys = {
|
||||||
-- },
|
{
|
||||||
{
|
"<Leader>ft",
|
||||||
name = "telescope_codesearch",
|
function()
|
||||||
url = "sso://googler@user/vintharas/telescope-codesearch.nvim",
|
require("figtree").toggle()
|
||||||
dependencies = { "nvim-telescope/telescope.nvim" },
|
end,
|
||||||
config = function() end,
|
},
|
||||||
},
|
},
|
||||||
{
|
opts = {
|
||||||
name = "telescope_citc",
|
-- see |figtree-configuration| for all possible options
|
||||||
url = "sso://googler@user/aktau/telescope-citc.nvim",
|
},
|
||||||
dependencies = { "nvim-telescope/telescope.nvim" },
|
},
|
||||||
},
|
{
|
||||||
{
|
name = "telescope_codesearch",
|
||||||
name = "telescope_fig",
|
url = "sso://googler@user/vintharas/telescope-codesearch.nvim",
|
||||||
url = "sso://googler@user/tylersaunders/telescope-fig.nvim",
|
dependencies = { "nvim-telescope/telescope.nvim" },
|
||||||
dependencies = { "nvim-telescope/telescope.nvim" },
|
config = function() end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "critique-nvim",
|
name = "telescope_citc",
|
||||||
dir = "~/critique-nvim/",
|
url = "sso://googler@user/aktau/telescope-citc.nvim",
|
||||||
lazy = false,
|
dependencies = { "nvim-telescope/telescope.nvim" },
|
||||||
dependencies = {
|
},
|
||||||
"rktjmp/time-ago.vim",
|
{
|
||||||
"nvim-lua/plenary.nvim",
|
name = "telescope_fig",
|
||||||
"nvim-telescope/telescope.nvim",
|
url = "sso://googler@user/tylersaunders/telescope-fig.nvim",
|
||||||
"runiq/neovim-throttle-debounce",
|
dependencies = { "nvim-telescope/telescope.nvim" },
|
||||||
},
|
},
|
||||||
-- here are some mappings you might want:
|
{
|
||||||
keys = {
|
name = "critique-nvim",
|
||||||
{ "<Leader>lc", ":CritiqueToggleLineComment<CR>" },
|
dir = "~/critique-nvim/",
|
||||||
{ "<Leader>ac", ":CritiqueToggleAllComments<CR>" },
|
lazy = false,
|
||||||
{ "<Leader>uc", ":CritiqueToggleUnresolvedComments<CR>" },
|
dependencies = {
|
||||||
{ "<Leader>fc", ":CritiqueFetchComments<CR>" },
|
"rktjmp/time-ago.vim",
|
||||||
{ "<Leader>tc", ":CritiqueCommentsTelescope<CR>" },
|
"nvim-lua/plenary.nvim",
|
||||||
},
|
"nvim-telescope/telescope.nvim",
|
||||||
config = function()
|
"runiq/neovim-throttle-debounce",
|
||||||
-- Here are all the options and their default values:
|
},
|
||||||
require("critique.comments").setup({
|
-- here are some mappings you might want:
|
||||||
-- debug = 1, -- default = 0
|
keys = {
|
||||||
-- Fetch the comments after calling `setup`.
|
{ "<Leader>lc", ":CritiqueToggleLineComment<CR>" },
|
||||||
auto_fetch = true, -- default = true
|
{ "<Leader>ac", ":CritiqueToggleAllComments<CR>" },
|
||||||
auto_render = true, -- default = true
|
{ "<Leader>uc", ":CritiqueToggleUnresolvedComments<CR>" },
|
||||||
-- Allow checking for comments on BufEnter events. This is throttled to once every 10 seconds.
|
{ "<Leader>fc", ":CritiqueFetchComments<CR>" },
|
||||||
frequent_fetch = true, -- default = false
|
{ "<Leader>tc", ":CritiqueCommentsTelescope<CR>" },
|
||||||
verbose_notifications = true,
|
},
|
||||||
})
|
config = function()
|
||||||
end,
|
-- Here are all the options and their default values:
|
||||||
},
|
require("critique.comments").setup({
|
||||||
{
|
-- debug = 1, -- default = 0
|
||||||
url = "sso://googler@user/mccloskeybr/luasnip-google.nvim",
|
-- Fetch the comments after calling `setup`.
|
||||||
config = function()
|
auto_fetch = true, -- default = true
|
||||||
require("luasnip-google").load_snippets()
|
auto_render = true, -- default = true
|
||||||
end,
|
-- Allow checking for comments on BufEnter events. This is throttled to once every 10 seconds.
|
||||||
},
|
frequent_fetch = true, -- default = false
|
||||||
{
|
verbose_notifications = true,
|
||||||
name = "hg",
|
})
|
||||||
url = "sso://googler@user/smwang/hg.nvim",
|
end,
|
||||||
dependencies = { "ipod825/libp.nvim" },
|
},
|
||||||
config = function()
|
{
|
||||||
require("hg").setup()
|
url = "sso://googler@user/mccloskeybr/luasnip-google.nvim",
|
||||||
end,
|
config = function()
|
||||||
},
|
require("luasnip-google").load_snippets()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "hg",
|
||||||
|
url = "sso://googler@user/smwang/hg.nvim",
|
||||||
|
dependencies = { "ipod825/libp.nvim" },
|
||||||
|
config = function()
|
||||||
|
require("hg").setup()
|
||||||
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
@ -1,61 +1,60 @@
|
|||||||
local use_google = require("utils").use_google
|
local use_google = require("utils").use_google
|
||||||
local flags = require("utils").flags
|
local flags = require("utils").flags
|
||||||
|
|
||||||
|
local function add_import()
|
||||||
|
vim.lsp.buf.code_action({
|
||||||
|
apply = true,
|
||||||
|
context = {
|
||||||
|
only = { "quickfix.addImports" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
-- {
|
{
|
||||||
-- "ray-x/lsp_signature.nvim",
|
"kosayoda/nvim-lightbulb",
|
||||||
-- event = "VeryLazy",
|
commit = "1cae7b7153ae98dcf1b11173a443ac1b6d8e3d49",
|
||||||
-- opts = {
|
event = { "LspAttach" },
|
||||||
-- floating_window = true,
|
opts = {
|
||||||
-- hint_prefix = " ",
|
autocmd = { enabled = true },
|
||||||
-- },
|
virtual_text = {
|
||||||
-- config = function(_, opts)
|
enabled = true,
|
||||||
-- require("lsp_signature").setup(opts)
|
text = " ",
|
||||||
-- end,
|
hl = "DiagnosticWarn",
|
||||||
-- },
|
},
|
||||||
{
|
sign = { enabled = false },
|
||||||
"kosayoda/nvim-lightbulb",
|
},
|
||||||
commit = "1cae7b7153ae98dcf1b11173a443ac1b6d8e3d49",
|
},
|
||||||
event = { "LspAttach" },
|
{
|
||||||
opts = {
|
"L3MON4D3/LuaSnip",
|
||||||
autocmd = { enabled = true },
|
build = "make install_jsregexp",
|
||||||
virtual_text = {
|
config = function()
|
||||||
enabled = true,
|
require("luasnip.loaders.from_vscode").lazy_load()
|
||||||
text = " ",
|
end,
|
||||||
hl = "DiagnosticWarn",
|
dependencies = { "rafamadriz/friendly-snippets" },
|
||||||
},
|
},
|
||||||
sign = { enabled = false },
|
{
|
||||||
},
|
"ray-x/go.nvim",
|
||||||
},
|
dependencies = { -- optional packages
|
||||||
{
|
"ray-x/guihua.lua",
|
||||||
"L3MON4D3/LuaSnip",
|
"neovim/nvim-lspconfig",
|
||||||
build = "make install_jsregexp",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
config = function()
|
},
|
||||||
require("luasnip.loaders.from_vscode").lazy_load()
|
-- cond = not use_google(),
|
||||||
end,
|
config = function()
|
||||||
dependencies = { "rafamadriz/friendly-snippets" },
|
local capabilities = flags.blink
|
||||||
},
|
and require("blink.cmp").get_lsp_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||||
{
|
or require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||||
"ray-x/go.nvim",
|
capabilities.offsetEncoding = { "utf-16" }
|
||||||
dependencies = { -- optional packages
|
require("go").setup({
|
||||||
"ray-x/guihua.lua",
|
lsp_cfg = { capabilities = capabilities },
|
||||||
"neovim/nvim-lspconfig",
|
lsp_keymaps = false,
|
||||||
"nvim-treesitter/nvim-treesitter",
|
lsp_inlay_hints = {
|
||||||
},
|
enable = not use_google(), -- doesn't work with ciderlsp
|
||||||
-- cond = not use_google(),
|
},
|
||||||
config = function()
|
})
|
||||||
local capabilities = flags.blink
|
-- Run gofmt + goimports on save
|
||||||
and require("blink.cmp").get_lsp_capabilities(vim.lsp.protocol.make_client_capabilities())
|
|
||||||
or require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
|
||||||
capabilities.offsetEncoding = { "utf-16" }
|
|
||||||
require("go").setup({
|
|
||||||
lsp_cfg = { capabilities = capabilities },
|
|
||||||
lsp_keymaps = false,
|
|
||||||
lsp_inlay_hints = {
|
|
||||||
enable = not use_google(), -- doesn't work with ciderlsp
|
|
||||||
},
|
|
||||||
})
|
|
||||||
-- Run gofmt + goimports on save
|
|
||||||
|
|
||||||
local format_sync_grp = vim.api.nvim_create_augroup("goimports", {})
|
local format_sync_grp = vim.api.nvim_create_augroup("goimports", {})
|
||||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
@ -80,6 +79,7 @@ return {
|
|||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>F", ":lua vim.lsp.buf.format()<CR>" },
|
{ "<leader>F", ":lua vim.lsp.buf.format()<CR>" },
|
||||||
|
{ "<leader>i", add_import },
|
||||||
{ "<leader>rn", ":lua vim.lsp.buf.rename()<CR>" },
|
{ "<leader>rn", ":lua vim.lsp.buf.rename()<CR>" },
|
||||||
{ "L", ":lua vim.lsp.buf.hover()<CR>" },
|
{ "L", ":lua vim.lsp.buf.hover()<CR>" },
|
||||||
{ "gr", ":Telescope lsp_references<CR>" },
|
{ "gr", ":Telescope lsp_references<CR>" },
|
||||||
@ -94,92 +94,47 @@ return {
|
|||||||
{ "<C-g>", ":lua vim.lsp.buf.signature_help()<CR>", mode = "i" },
|
{ "<C-g>", ":lua vim.lsp.buf.signature_help()<CR>", mode = "i" },
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local lsp_status = require("lsp-status")
|
|
||||||
lsp_status.register_progress()
|
|
||||||
|
|
||||||
local capabilities = flags.blink
|
|
||||||
and require("blink.cmp").get_lsp_capabilities(vim.lsp.protocol.make_client_capabilities())
|
|
||||||
or require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
|
||||||
capabilities = vim.tbl_extend("keep", capabilities or {}, lsp_status.capabilities)
|
|
||||||
capabilities.offsetEncoding = { "utf-16" }
|
|
||||||
|
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
local configs = require("lspconfig.configs")
|
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
local nvim_lspconfig = require("lspconfig")
|
|
||||||
local lsp_configs = require("lspconfig.configs")
|
local lsp_configs = require("lspconfig.configs")
|
||||||
|
|
||||||
lsp_configs.ciderlsp = {
|
lsp_configs.ciderlsp = {
|
||||||
default_config = {
|
default_config = {
|
||||||
cmd = {
|
cmd = {
|
||||||
"/google/bin/releases/cider/ciderlsp/ciderlsp",
|
"/google/bin/releases/cider/ciderlsp/ciderlsp",
|
||||||
"--tooltag=nvim-lsp",
|
"--tooltag=nvim-lsp",
|
||||||
"--noforward_sync_responses",
|
"--noforward_sync_responses",
|
||||||
},
|
},
|
||||||
filetypes = {
|
filetypes = {
|
||||||
"c",
|
"c",
|
||||||
"cpp",
|
"cpp",
|
||||||
"java",
|
"java",
|
||||||
"kotlin",
|
"kotlin",
|
||||||
"objc",
|
"objc",
|
||||||
"proto",
|
"proto",
|
||||||
"textproto",
|
"textproto",
|
||||||
"go",
|
"go",
|
||||||
"python",
|
"python",
|
||||||
"bzl",
|
"bzl",
|
||||||
"typescript",
|
"typescript",
|
||||||
},
|
},
|
||||||
offset_encoding = "utf-8",
|
offset_encoding = "utf-8",
|
||||||
root_dir = nvim_lspconfig.util.root_pattern(".citc"),
|
root_dir = lspconfig.util.root_pattern(".citc"),
|
||||||
settings = {},
|
settings = {},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
nvim_lspconfig.ciderlsp.setup({})
|
|
||||||
-- Godot
|
|
||||||
lspconfig.gdscript.setup({
|
|
||||||
-- flags = {
|
|
||||||
-- debounce_text_changes = 2000, -- Wait 5 seconds before sending didChange
|
|
||||||
-- },
|
|
||||||
})
|
|
||||||
vim.cmd([[autocmd FileType gdscript setlocal commentstring=#\ %s]])
|
|
||||||
vim.cmd([[autocmd FileType gdscript setlocal autoindent noexpandtab tabstop=4 shiftwidth=4]])
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
=======
|
|
||||||
if use_google() then
|
if use_google() then
|
||||||
local on_attach = function(client, bufnr)
|
lspconfig.ciderlsp.setup({})
|
||||||
-- local ft = vim.bo[bufnr].filetype
|
|
||||||
-- if ft == "cpp" or ft == "c" then
|
|
||||||
-- if client.server_capabilities.semanticTokensProvider ~= nil then
|
|
||||||
-- client.server_capabilities.semanticTokensProvider = nil
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
end
|
|
||||||
|
|
||||||
configs.ciderlsp = {
|
|
||||||
default_config = {
|
|
||||||
cmd = { '/google/bin/releases/cider/ciderlsp/ciderlsp', '--tooltag=nvim-lsp', '--noforward_sync_responses' },
|
|
||||||
filetypes = { "c", "cpp", "java", "kotlin", "objc", "proto", "textproto", "go", "python", "bzl", "typescript" },
|
|
||||||
offset_encoding = 'utf-8',
|
|
||||||
root_dir = lspconfig.util.root_pattern('.citc'),
|
|
||||||
settings = {},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
lspconfig.ciderlsp.setup { on_attach = on_attach }
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Godot
|
lspconfig.gdscript.setup({})
|
||||||
lspconfig.gdscript.setup({
|
-- require('lspconfig').gdscript.setup { cmd = { "ncat", "localhost", "6005" }, root_dir = function()
|
||||||
-- flags = {
|
-- return vim.fs.dirname(vim.fs.find('project.godot', { upward = true })[1])
|
||||||
-- debounce_text_changes = 2000, -- Wait 5 seconds before sending didChange
|
-- end
|
||||||
-- },
|
-- }
|
||||||
})
|
|
||||||
vim.cmd([[autocmd FileType gdscript setlocal commentstring=#\ %s]])
|
vim.cmd([[autocmd FileType gdscript setlocal commentstring=#\ %s]])
|
||||||
vim.cmd([[autocmd FileType gdscript setlocal autoindent noexpandtab tabstop=4 shiftwidth=4]])
|
vim.cmd([[autocmd FileType gdscript setlocal autoindent noexpandtab tabstop=4 shiftwidth=4 wrap]])
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
>>>>>>> 0c7bebc (stuff)
|
|
||||||
}
|
}
|
||||||
|
44
vim/.vim/lua/plugins/minuet.lua
Normal file
44
vim/.vim/lua/plugins/minuet.lua
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
return {
|
||||||
|
'milanglacier/minuet-ai.nvim',
|
||||||
|
config = function()
|
||||||
|
require('minuet').setup {
|
||||||
|
provider = 'gemini',
|
||||||
|
provider_options = {
|
||||||
|
gemini = {
|
||||||
|
optional = {
|
||||||
|
generationConfig = {
|
||||||
|
maxOutputTokens = 256,
|
||||||
|
},
|
||||||
|
safetySettings = {
|
||||||
|
{
|
||||||
|
-- HARM_CATEGORY_HATE_SPEECH,
|
||||||
|
-- HARM_CATEGORY_HARASSMENT
|
||||||
|
-- HARM_CATEGORY_SEXUALLY_EXPLICIT
|
||||||
|
category = 'HARM_CATEGORY_DANGEROUS_CONTENT',
|
||||||
|
-- BLOCK_NONE
|
||||||
|
threshold = 'BLOCK_ONLY_HIGH',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
virtualtext = {
|
||||||
|
auto_trigger_ft = {},
|
||||||
|
keymap = {
|
||||||
|
-- accept whole completion
|
||||||
|
accept = '<A-A>',
|
||||||
|
-- accept one line
|
||||||
|
accept_line = '<A-a>',
|
||||||
|
-- accept n lines (prompts for number)
|
||||||
|
-- e.g. "A-z 2 CR" will accept 2 lines
|
||||||
|
accept_n_lines = '<A-z>',
|
||||||
|
-- Cycle to prev completion item, or manually invoke completion
|
||||||
|
prev = '<A-[>',
|
||||||
|
-- Cycle to next completion item, or manually invoke completion
|
||||||
|
next = '<A-]>',
|
||||||
|
dismiss = '<A-e>',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
@ -1,52 +1,57 @@
|
|||||||
local use_google = require("utils").use_google
|
local use_google = require("utils").use_google
|
||||||
|
|
||||||
return {
|
return {
|
||||||
-- {
|
-- {
|
||||||
-- "cmdtree",
|
-- "cmdtree",
|
||||||
-- dir = "~/cmdtree",
|
-- dir = "~/cmdtree",
|
||||||
-- },
|
-- },
|
||||||
{
|
{
|
||||||
"nvim-neo-tree/neo-tree.nvim",
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
dependencies = {
|
branch = "v3.x",
|
||||||
"nvim-lua/plenary.nvim",
|
lazy = false, -- neo-tree will lazily load itself
|
||||||
"MunifTanjim/nui.nvim",
|
dependencies = {
|
||||||
-- "~/cmdtree",
|
"nvim-lua/plenary.nvim",
|
||||||
},
|
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
||||||
cmd = {
|
"MunifTanjim/nui.nvim",
|
||||||
"Neotree",
|
-- {"3rd/image.nvim", opts = {}}, -- Optional image support in preview window: See `# Preview Mode` for more information
|
||||||
},
|
},
|
||||||
config = function()
|
-----@module "neo-tree"
|
||||||
require("neo-tree").setup({
|
-----@type neotree.Config
|
||||||
hijack_netrw_behavior = "open_default",
|
opts = {
|
||||||
filesystem = {
|
filesystem = {
|
||||||
filtered_items = {
|
hijack_netrw_behavior = "open_default",
|
||||||
hide_dotfiles = false,
|
filtered_items = {
|
||||||
},
|
hide_dotfiles = false,
|
||||||
bind_to_cwd = false,
|
},
|
||||||
},
|
-- follow_current_file = {
|
||||||
sources = {
|
-- enabled = true,
|
||||||
"filesystem",
|
-- leave_dirs_open = false,
|
||||||
"buffers",
|
-- },
|
||||||
"git_status",
|
group_empty_dirs = true,
|
||||||
--"cmdtree",
|
},
|
||||||
-- ...and any additional source
|
sources = {
|
||||||
},
|
"filesystem",
|
||||||
window = {
|
"buffers",
|
||||||
mappings = {
|
"git_status",
|
||||||
["O"] = "expand_all_nodes",
|
--"cmdtree",
|
||||||
},
|
-- ...and any additional source
|
||||||
},
|
},
|
||||||
})
|
window = {
|
||||||
end,
|
mappings = {
|
||||||
|
["O"] = "expand_all_nodes",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
(function()
|
(function()
|
||||||
if use_google() then
|
-- if use_google() then
|
||||||
return { "<C-n>m", ":Neotree float cmdtree<CR>", desc = "Open NeoTree CWD float" }
|
-- return { "<C-n>m", ":Neotree float cmdtree<CR>", desc = "Open NeoTree CWD float" }
|
||||||
end
|
-- end
|
||||||
return { "<C-n>m", ":Neotree float git_status<CR>", desc = "Open NeoTree CWD float" }
|
return { "<C-n>m", ":Neotree float git_status<CR>", desc = "Open NeoTree CWD float" }
|
||||||
end)(),
|
end)(),
|
||||||
{ "<C-n>", ":Neotree toggle left dir=%:p:h<cr>" },
|
{ "<C-n>", ":Neotree reveal left<cr>" },
|
||||||
|
{ "<C-n>.", ":Neotree reveal left dir=%:p:h<cr>" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -5,9 +5,6 @@ return {
|
|||||||
{ "nvim-lua/plenary.nvim" },
|
{ "nvim-lua/plenary.nvim" },
|
||||||
{ "nvim-treesitter/nvim-treesitter" },
|
{ "nvim-treesitter/nvim-treesitter" },
|
||||||
},
|
},
|
||||||
config = function()
|
|
||||||
require("config.refactoring")
|
|
||||||
end,
|
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
-- remap to open the Telescope refactoring menu in visual mode
|
-- remap to open the Telescope refactoring menu in visual mode
|
||||||
|
@ -6,6 +6,16 @@ return {
|
|||||||
ft = { "rust" },
|
ft = { "rust" },
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
vim.g.rustaceanvim = vim.tbl_deep_extend("keep", vim.g.rustaceanvim or {}, opts or {})
|
vim.g.rustaceanvim = vim.tbl_deep_extend("keep", vim.g.rustaceanvim or {}, opts or {})
|
||||||
|
|
||||||
|
for _, method in ipairs({ "textDocument/diagnostic", "workspace/diagnostic" }) do
|
||||||
|
local default_diagnostic_handler = vim.lsp.handlers[method]
|
||||||
|
vim.lsp.handlers[method] = function(err, result, context, config)
|
||||||
|
if err ~= nil and err.code == -32802 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
return default_diagnostic_handler(err, result, context, config)
|
||||||
|
end
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
opts = {
|
opts = {
|
||||||
server = {
|
server = {
|
||||||
|
@ -1,52 +1,55 @@
|
|||||||
local use_google = require("utils").use_google
|
local use_google = require("utils").use_google
|
||||||
|
|
||||||
local function setup_mercurial(hg_revision)
|
local function change_diffbase(hg_revision, git_revision)
|
||||||
local git_cmd = "git diff --no-color --no-ext-diff -U0 -- %f"
|
vim.g.signify_vcs_cmds = {
|
||||||
local rcs_cmd = "rcsdiff -U0 %f 2>%n"
|
git = "git diff --no-color --diff-algorithm=histogram --no-ext-diff -U0 " .. git_revision .. " -- %f",
|
||||||
local svn_cmd = "svn diff --diff-cmd %d -x -U0 -- %f"
|
yadm = 'yadm diff --no-color --no-ext-diff -U0 -- %f',
|
||||||
local hg_diff = hg_revision .. " --color=never config aliases.diff= --nodates -U0 -- %f"
|
hg = 'chg --config alias.diff=diff diff '.. hg_revision .. ' --color=never --nodates -U0 -- %f',
|
||||||
local hg_cat = hg_revision .. " -- %f"
|
svn = 'svn diff --diff-cmd %d -x -U0 -- %f',
|
||||||
|
bzr = 'bzr diff --using %d --diff-options=-U0 -- %f',
|
||||||
vim.cmd(string.format(
|
darcs = 'darcs diff --no-pause-for-gui --no-unified --diff-opts=-U0 -- %f',
|
||||||
[[
|
fossil = 'fossil diff --unified -c 0 -- %f',
|
||||||
let g:signify_vcs_cmds = {
|
cvs = 'cvs diff -U0 -- %f',
|
||||||
\ 'git': '%s',
|
rcs = 'rcsdiff -U0 %f 2>%n',
|
||||||
\ 'rcs': '%s',
|
accurev = 'accurev diff %f -- -U0',
|
||||||
\ 'svn': '%s',
|
tfs = 'tf diff -version=W -noprompt -format=Unified %f'
|
||||||
\ 'hg': 'chg diff %s',
|
}
|
||||||
\ }
|
vim.g.signify_vcs_cmds_diffmode = {
|
||||||
let g:signify_vcs_cmds_diffmode = {
|
git = "git show " .. git_revision .. ":./%f",
|
||||||
\ 'hg': 'chg cat %s',
|
hg = "chg cat " .. hg_revision .. " -- %f",
|
||||||
\ }
|
yadm = 'yadm show HEAD:./%f',
|
||||||
]],
|
svn = 'svn cat %f',
|
||||||
git_cmd,
|
bzr = 'bzr cat %f',
|
||||||
rcs_cmd,
|
darcs = 'darcs show contents -- %f',
|
||||||
svn_cmd,
|
fossil = 'fossil cat %f',
|
||||||
hg_diff,
|
cvs = 'cvs up -p -- %f 2>%n',
|
||||||
hg_cat
|
rcs = 'co -q -p %f',
|
||||||
))
|
accurev = 'accurev cat %f',
|
||||||
|
perforce = 'p4 print %f',
|
||||||
|
tfs = 'tf view -version:W -noprompt %f',
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
_G.signify_dtup = function()
|
_G.signify_dtup = function()
|
||||||
setup_mercurial('-r ".^"')
|
change_diffbase('-r ".^"', 'HEAD^')
|
||||||
vim.cmd([[:SignifyEnable]])
|
vim.cmd([[:SignifyEnable]])
|
||||||
vim.cmd([[:SignifyRefresh]])
|
vim.cmd([[:SignifyRefresh]])
|
||||||
end
|
end
|
||||||
|
|
||||||
_G.signify_normal = function()
|
_G.signify_normal = function()
|
||||||
setup_mercurial("-r .")
|
change_diffbase("-r .", "")
|
||||||
vim.cmd([[:SignifyEnable]])
|
vim.cmd([[:SignifyEnable]])
|
||||||
vim.cmd([[:SignifyRefresh]])
|
vim.cmd([[:SignifyRefresh]])
|
||||||
end
|
end
|
||||||
|
|
||||||
_G.signify_dtp4 = function()
|
_G.signify_dtp4 = function()
|
||||||
setup_mercurial("-r p4head")
|
change_diffbase("-r p4head", "main")
|
||||||
vim.cmd([[:SignifyEnable]])
|
vim.cmd([[:SignifyEnable]])
|
||||||
vim.cmd([[:SignifyRefresh]])
|
vim.cmd([[:SignifyRefresh]])
|
||||||
end
|
end
|
||||||
|
|
||||||
_G.signify_dtex = function()
|
_G.signify_dtex = function()
|
||||||
setup_mercurial("-r exported(.)")
|
change_diffbase("-r exported(.)", "origin/main")
|
||||||
vim.cmd([[:SignifyEnable]])
|
vim.cmd([[:SignifyEnable]])
|
||||||
vim.cmd([[:SignifyRefresh]])
|
vim.cmd([[:SignifyRefresh]])
|
||||||
end
|
end
|
||||||
@ -62,11 +65,13 @@ return {
|
|||||||
{ "<leader>sup", ":lua signify_dtup()<CR>" },
|
{ "<leader>sup", ":lua signify_dtup()<CR>" },
|
||||||
{ "<leader>sex", ":lua signify_dtex()<CR>" },
|
{ "<leader>sex", ":lua signify_dtex()<CR>" },
|
||||||
{ "<leader>sp4", ":lua signify_dtp4()<CR>" },
|
{ "<leader>sp4", ":lua signify_dtp4()<CR>" },
|
||||||
|
{ "<leader>sb", ":lua signify_dtp4()<CR>" },
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
vim.g.signify_vcs_list = { "hg", "git" }
|
vim.g.signify_vcs_list = { "hg", "git" }
|
||||||
vim.g.signify_disable_by_default = 0
|
vim.g.signify_disable_by_default = 0
|
||||||
-- vim.g.signify_number_highlight = 1
|
-- vim.g.signify_number_highlight = 1
|
||||||
|
vim.g.signify_sign_show_count = 0
|
||||||
local s = "▕"
|
local s = "▕"
|
||||||
vim.g.signify_sign_add = s
|
vim.g.signify_sign_add = s
|
||||||
vim.g.signify_sign_delete = s
|
vim.g.signify_sign_delete = s
|
||||||
@ -74,9 +79,10 @@ return {
|
|||||||
vim.api.nvim_set_hl(0, "SignifySignAdd", { fg = "#9cd9b8" })
|
vim.api.nvim_set_hl(0, "SignifySignAdd", { fg = "#9cd9b8" })
|
||||||
vim.api.nvim_set_hl(0, "SignifySignChange", { fg = "#849ee3" })
|
vim.api.nvim_set_hl(0, "SignifySignChange", { fg = "#849ee3" })
|
||||||
|
|
||||||
local red = "#f896a0"
|
local myred = "#f296a0"
|
||||||
vim.api.nvim_set_hl(0, "SignifySignChangeDelete", { fg = red })
|
vim.api.nvim_set_hl(0, "SignifySignChangeDelete", { fg = myred })
|
||||||
vim.api.nvim_set_hl(0, "SignifySignDelete", { fg = red })
|
vim.api.nvim_set_hl(0, "SignifySignDelete", { fg = myred })
|
||||||
vim.api.nvim_set_hl(0, "SignifySignDeleteDeleteFirstLine", { fg = red })
|
vim.api.nvim_set_hl(0, "SignifyLineDelete", { fg = myred })
|
||||||
|
vim.api.nvim_set_hl(0, "SignifySignDeleteDeleteFirstLine", { fg = myred })
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
@ -3,45 +3,35 @@ local exec = require("utils").exec
|
|||||||
local TableConcat = require("utils").TableConcat
|
local TableConcat = require("utils").TableConcat
|
||||||
|
|
||||||
_G.find_files = function(search_dirs)
|
_G.find_files = function(search_dirs)
|
||||||
require("telescope.builtin").find_files({ search_dirs = search_dirs })
|
require("telescope.builtin").find_files({ search_dirs = search_dirs })
|
||||||
end
|
end
|
||||||
-- Helper functions to fetch the current scope and set `search_dirs`
|
-- Helper functions to fetch the current scope and set `search_dirs`
|
||||||
_G.find_dotfiles = function() end
|
_G.find_dotfiles = function() end
|
||||||
|
|
||||||
_G.search_cwd = function()
|
_G.search_cwd = function()
|
||||||
local builtin = require("telescope.builtin")
|
local builtin = require("telescope.builtin")
|
||||||
local utils = require("telescope.utils")
|
local utils = require("telescope.utils")
|
||||||
builtin.find_files({ cwd = utils.buffer_dir() })
|
builtin.find_files({ cwd = utils.buffer_dir() })
|
||||||
end
|
|
||||||
|
|
||||||
_G.live_grep = function(search_dirs)
|
|
||||||
require("telescope.builtin").live_grep({
|
|
||||||
search_dirs = search_dirs,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
_G.live_grep_cword = function(search_dirs)
|
|
||||||
require("telescope.builtin").live_grep({ search_dirs = search_dirs })
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function exe(cmd)
|
local function exe(cmd)
|
||||||
return vim.split(vim.fn.system(cmd), "\n")
|
return vim.split(vim.fn.system(cmd), "\n")
|
||||||
end
|
end
|
||||||
|
|
||||||
local function fig_modified()
|
local function fig_modified()
|
||||||
return exe("chg pstatus -ma -n --no-status --template= | sort")
|
return exe("chg pstatus -ma -n --no-status --template= | sort")
|
||||||
end
|
end
|
||||||
|
|
||||||
local function fig_all_modified()
|
local function fig_all_modified()
|
||||||
return exe("chg status -ma -n --rev p4base --no-status --template= | sort")
|
return exe("chg status -ma -n --rev p4base --no-status --template= | sort")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
local keys = {
|
local keys = {
|
||||||
{ "<leader>e", ":lua search_cwd()<CR>", desc = "Find Files in Buffer Directory" },
|
{ "<leader>e", ":lua search_cwd()<CR>", desc = "Find Files in Buffer Directory" },
|
||||||
{ "<leader>ts", require('telescope.builtin').live_grep },
|
|
||||||
{ "<leader>tb", ":Telescope buffers<CR>" },
|
{ "<leader>tb", ":Telescope buffers<CR>" },
|
||||||
{ "<leader>TS", function() require('telescope.builtin').live_grep { default_text = vim.fn.expand("<cword>") } end, },
|
-- { "<leader>ts", require('telescope.builtin').live_grep },
|
||||||
|
-- { "<leader>TS", function() require('telescope.builtin').live_grep { default_text = vim.fn.expand("<cword>") } end, },
|
||||||
{
|
{
|
||||||
"<leader>t.",
|
"<leader>t.",
|
||||||
function()
|
function()
|
||||||
@ -61,8 +51,8 @@ local keys = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if use_google() then
|
if use_google() then
|
||||||
local find_files = require("telescope.builtin").find_files
|
local find_files = require("telescope.builtin").find_files
|
||||||
local cs_query = require("telescope").extensions.codesearch.find_query
|
local cs_query = require("telescope").extensions.codesearch.find_query
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
TableConcat(keys, {
|
TableConcat(keys, {
|
||||||
{ "<leader>tm", function() find_files({ search_dirs = fig_modified() }) end, desc = "list modified Fig files." },
|
{ "<leader>tm", function() find_files({ search_dirs = fig_modified() }) end, desc = "list modified Fig files." },
|
||||||
@ -77,144 +67,179 @@ if use_google() then
|
|||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"aznhe21/actions-preview.nvim",
|
"aznhe21/actions-preview.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("actions-preview").setup({
|
require("actions-preview").setup({
|
||||||
telescope = {
|
telescope = {
|
||||||
sorting_strategy = "ascending",
|
sorting_strategy = "ascending",
|
||||||
layout_strategy = "vertical",
|
layout_strategy = "vertical",
|
||||||
layout_config = {
|
layout_config = {
|
||||||
width = 0.8,
|
width = 0.8,
|
||||||
height = 0.9,
|
height = 0.9,
|
||||||
prompt_position = "top",
|
prompt_position = "top",
|
||||||
preview_cutoff = 20,
|
preview_cutoff = 20,
|
||||||
preview_height = function(_, _, max_lines)
|
preview_height = function(_, _, max_lines)
|
||||||
return max_lines - 15
|
return max_lines - 15
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
keys = {
|
keys = {
|
||||||
{ "?", "<cmd>lua require('actions-preview').code_actions()<cr>" },
|
{ "?", "<cmd>lua require('actions-preview').code_actions()<cr>" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"smartpde/telescope-recent-files",
|
"smartpde/telescope-recent-files",
|
||||||
config = function()
|
config = function()
|
||||||
require("telescope").load_extension("recent_files")
|
require("telescope").load_extension("recent_files")
|
||||||
end,
|
end,
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>to", [[<cmd>lua require('telescope').extensions.recent_files.pick()<CR>]] },
|
{ "<leader>to", [[<cmd>lua require('telescope').extensions.recent_files.pick()<CR>]] },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"piersolenski/telescope-import.nvim",
|
"piersolenski/telescope-import.nvim",
|
||||||
dependencies = "nvim-telescope/telescope.nvim",
|
dependencies = "nvim-telescope/telescope.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("telescope").load_extension("import")
|
require("telescope").load_extension("import")
|
||||||
end,
|
end,
|
||||||
keys = function()
|
keys = function()
|
||||||
if not use_google() then
|
if not use_google() then
|
||||||
return {
|
return {
|
||||||
{ "<leader>i", ":Telescope import<CR>" },
|
{ "<leader>i", ":Telescope import<CR>" },
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope-live-grep-args.nvim",
|
||||||
dependencies = {
|
keys = {
|
||||||
"mfussenegger/nvim-dap",
|
{
|
||||||
"smartpde/telescope-recent-files",
|
"<leader>ts",
|
||||||
"rcarriga/nvim-dap-ui",
|
function()
|
||||||
},
|
require("telescope").extensions.live_grep_args.live_grep_args()
|
||||||
config = function()
|
end,
|
||||||
require("telescope").setup({
|
},
|
||||||
defaults = {
|
{
|
||||||
-- The vertical layout strategy is good to handle long paths like those in
|
"<leader>TS",
|
||||||
-- google3 repos because you have nearly the full screen to display a file path.
|
function()
|
||||||
-- The caveat is that the preview area is smaller.
|
require("telescope").extensions.live_grep_args.live_grep_args({
|
||||||
layout_strategy = "vertical",
|
default_text = vim.fn.expand("<cword>"),
|
||||||
-- Common paths in google3 repos are collapsed following the example of Cider
|
})
|
||||||
-- It is nice to keep this as a user config rather than part of
|
end,
|
||||||
-- telescope-codesearch because it can be reused by other telescope pickers.
|
},
|
||||||
path_display = function(opts, path)
|
},
|
||||||
-- Do common substitutions
|
config = function()
|
||||||
path = path:gsub("^/google/src/cloud/[^/]+/[^/]+/google3/", "google3/", 1)
|
require("telescope").load_extension("live_grep_args")
|
||||||
path = path:gsub("^google3/java/com/google/", "//j/c/g/", 1)
|
end,
|
||||||
path = path:gsub("^google3/javatests/com/google/", "//jt/c/g/", 1)
|
},
|
||||||
path = path:gsub("^google3/third_party/", "//3p/", 1)
|
{
|
||||||
path = path:gsub("^google3/", "//", 1)
|
"nvim-telescope/telescope.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-telescope/telescope-live-grep-args.nvim",
|
||||||
|
"mfussenegger/nvim-dap",
|
||||||
|
"smartpde/telescope-recent-files",
|
||||||
|
"rcarriga/nvim-dap-ui",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("telescope").setup({
|
||||||
|
defaults = {
|
||||||
|
-- The vertical layout strategy is good to handle long paths like those in
|
||||||
|
-- google3 repos because you have nearly the full screen to display a file path.
|
||||||
|
-- The caveat is that the preview area is smaller.
|
||||||
|
layout_strategy = "vertical",
|
||||||
|
-- Common paths in google3 repos are collapsed following the example of Cider
|
||||||
|
-- It is nice to keep this as a user config rather than part of
|
||||||
|
-- telescope-codesearch because it can be reused by other telescope pickers.
|
||||||
|
path_display = function(opts, path)
|
||||||
|
-- Do common substitutions
|
||||||
|
path = path:gsub("^/google/src/cloud/[^/]+/[^/]+/google3/", "google3/", 1)
|
||||||
|
path = path:gsub("^google3/java/com/google/", "//j/c/g/", 1)
|
||||||
|
path = path:gsub("^google3/javatests/com/google/", "//jt/c/g/", 1)
|
||||||
|
path = path:gsub("^google3/third_party/", "//3p/", 1)
|
||||||
|
path = path:gsub("^google3/", "//", 1)
|
||||||
|
|
||||||
-- Do truncation. This allows us to combine our custom display formatter
|
-- Do truncation. This allows us to combine our custom display formatter
|
||||||
-- with the built-in truncation.
|
-- with the built-in truncation.
|
||||||
-- `truncate` handler in transform_path memoizes computed truncation length in opts.__length.
|
-- `truncate` handler in transform_path memoizes computed truncation length in opts.__length.
|
||||||
-- Here we are manually propagating this value between new_opts and opts.
|
-- Here we are manually propagating this value between new_opts and opts.
|
||||||
-- We can make this cleaner and more complicated using metatables :)
|
-- We can make this cleaner and more complicated using metatables :)
|
||||||
local new_opts = {
|
local new_opts = {
|
||||||
path_display = {
|
path_display = {
|
||||||
truncate = true,
|
truncate = true,
|
||||||
|
},
|
||||||
|
__length = opts.__length,
|
||||||
|
}
|
||||||
|
path = require("telescope.utils").transform_path(new_opts, path)
|
||||||
|
opts.__length = new_opts.__length
|
||||||
|
return path
|
||||||
|
end,
|
||||||
|
mappings = {
|
||||||
|
n = {
|
||||||
|
["<C-c>"] = "close",
|
||||||
|
["<Esc>"] = "close",
|
||||||
|
},
|
||||||
|
i = {
|
||||||
|
-- ["<cr>"] = function(bufnr)
|
||||||
|
-- require("telescope.actions.set").edit(bufnr, "tab drop")
|
||||||
|
-- end,
|
||||||
|
["<C-c>"] = "close",
|
||||||
|
["<Esc>"] = "close",
|
||||||
|
["<S-Down>"] = "cycle_history_next",
|
||||||
|
["<S-Up>"] = "cycle_history_prev",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
extensions = {
|
||||||
|
codesearch = {
|
||||||
|
experimental = true, -- enable results from google3/experimental
|
||||||
|
},
|
||||||
|
live_grep_args = {
|
||||||
|
auto_quoting = true, -- enable/disable auto-quoting
|
||||||
|
-- define mappings, e.g.
|
||||||
|
mappings = { -- extend mappings
|
||||||
|
i = {
|
||||||
|
["<C-k>"] = require("telescope-live-grep-args.actions").quote_prompt(),
|
||||||
|
["<C-i>"] = require("telescope-live-grep-args.actions").quote_prompt({ postfix = " --iglob " }),
|
||||||
|
-- freeze the current list and start a fuzzy search in the frozen list
|
||||||
|
["<C-.>"] = require("telescope-live-grep-args.actions").to_fuzzy_refine,
|
||||||
},
|
},
|
||||||
__length = opts.__length,
|
|
||||||
}
|
|
||||||
path = require("telescope.utils").transform_path(new_opts, path)
|
|
||||||
opts.__length = new_opts.__length
|
|
||||||
return path
|
|
||||||
end,
|
|
||||||
mappings = {
|
|
||||||
n = {
|
|
||||||
["<C-c>"] = "close",
|
|
||||||
["<Esc>"] = "close",
|
|
||||||
},
|
|
||||||
i = {
|
|
||||||
-- ["<cr>"] = function(bufnr)
|
|
||||||
-- require("telescope.actions.set").edit(bufnr, "tab drop")
|
|
||||||
-- end,
|
|
||||||
["<C-c>"] = "close",
|
|
||||||
["<Esc>"] = "close",
|
|
||||||
["<S-Down>"] = "cycle_history_next",
|
|
||||||
["<S-Up>"] = "cycle_history_prev",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
recent_files = {
|
||||||
extensions = {
|
-- This function rewrites all file paths to the current workspace.
|
||||||
codesearch = {
|
-- For example, if w2 is the current workspace, then
|
||||||
experimental = true, -- enable results from google3/experimental
|
-- /google/.../w1/google3/my_file.cc becomes /google/.../w2/google3/my_file.cc,
|
||||||
},
|
transform_file_path = function(path)
|
||||||
recent_files = {
|
local neocitc = require("neocitc")
|
||||||
-- This function rewrites all file paths to the current workspace.
|
local path_func = neocitc.path_in_current_workspace_or_head
|
||||||
-- For example, if w2 is the current workspace, then
|
or neocitc.path_in_current_workspace
|
||||||
-- /google/.../w1/google3/my_file.cc becomes /google/.../w2/google3/my_file.cc,
|
return path_func(path)
|
||||||
transform_file_path = function(path)
|
end,
|
||||||
local neocitc = require("neocitc")
|
-- This is a useful option to speed up Telescope by avoiding the check
|
||||||
local path_func = neocitc.path_in_current_workspace_or_head
|
-- for file existence.
|
||||||
or neocitc.path_in_current_workspace
|
stat_files = false,
|
||||||
return path_func(path)
|
-- Ignore common patterns that can show up from other google plugins
|
||||||
end,
|
ignore_patterns = {
|
||||||
-- This is a useful option to speed up Telescope by avoiding the check
|
"/%.git/COMMIT_EDITING$",
|
||||||
-- for file existence.
|
"/%.git/COMMIT_EDITMSG$",
|
||||||
stat_files = false,
|
"/%.git/MERGE_MSG$",
|
||||||
-- Ignore common patterns that can show up from other google plugins
|
"^/tmp/%.pipertmp-",
|
||||||
ignore_patterns = {
|
"/Related_Files$",
|
||||||
"/%.git/COMMIT_EDITING$",
|
"^term:",
|
||||||
"/%.git/COMMIT_EDITMSG$",
|
";#toggleterm#",
|
||||||
"/%.git/MERGE_MSG$",
|
},
|
||||||
"^/tmp/%.pipertmp-",
|
},
|
||||||
"/Related_Files$",
|
persisted = {},
|
||||||
"^term:",
|
import = {
|
||||||
";#toggleterm#",
|
-- Add imports to the top of the file keeping the cursor in place
|
||||||
},
|
insert_at_top = true,
|
||||||
},
|
},
|
||||||
persisted = {},
|
},
|
||||||
import = {
|
})
|
||||||
-- Add imports to the top of the file keeping the cursor in place
|
end,
|
||||||
insert_at_top = true,
|
keys = keys,
|
||||||
},
|
},
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
keys = keys,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,19 @@
|
|||||||
local use_google = require("utils").use_google
|
local use_google = require("utils").use_google
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
{
|
||||||
|
"squk/ableton.nvim",
|
||||||
|
lazy = false,
|
||||||
|
cond = not use_google(),
|
||||||
|
priority = 1000,
|
||||||
|
-- dir = "~/neovim-plugins/squk/ableton.nvim",
|
||||||
|
opts = {
|
||||||
|
variant = "cooler",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
vim.cmd("colorscheme ableton")
|
||||||
|
end,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"dgox16/oldworld.nvim",
|
"dgox16/oldworld.nvim",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
@ -10,7 +23,7 @@ return {
|
|||||||
variant = "cooler",
|
variant = "cooler",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
vim.cmd("colorscheme oldworld")
|
-- vim.cmd("colorscheme oldworld")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -1,97 +1,93 @@
|
|||||||
local use_google = require("utils").use_google
|
local use_google = require("utils").use_google
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"ful1e5/onedark.nvim",
|
"ful1e5/onedark.nvim",
|
||||||
priority = 1000, -- make sure to load this before all the other start plugins
|
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
|
lazy = not use_google(), -- make sure we load this during startup if it is your main colorscheme
|
||||||
cond = use_google(),
|
cond = use_google(),
|
||||||
config = function()
|
config = function()
|
||||||
-- require("onedark").setup()
|
-- require("onedark").setup()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"catppuccin/nvim",
|
"catppuccin/nvim",
|
||||||
name = "catppuccin",
|
name = "catppuccin",
|
||||||
priority = 1000, -- make sure to load this before all the other start plugins
|
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
|
lazy = not use_google(), -- make sure we load this during startup if it is your main colorscheme
|
||||||
cond = use_google(),
|
cond = use_google(),
|
||||||
config = function()
|
config = function()
|
||||||
vim.g.catppuccin_flavour = "macchiato" -- latte, frappe, macchiato, mocha
|
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 = "mocha",
|
flavour = "mocha",
|
||||||
integrations = {
|
integrations = {
|
||||||
cmp = true,
|
cmp = true,
|
||||||
-- coc_nvim = false,
|
-- coc_nvim = false,
|
||||||
dashboard = true,
|
dashboard = true,
|
||||||
-- fern = false,
|
-- fern = false,
|
||||||
fidget = true,
|
fidget = true,
|
||||||
gitgutter = true,
|
gitgutter = true,
|
||||||
gitsigns = true,
|
gitsigns = true,
|
||||||
-- hop = false,
|
-- hop = false,
|
||||||
illuminate = true,
|
illuminate = true,
|
||||||
-- leap = false,
|
leap = false,
|
||||||
-- lightspeed = false,
|
-- lightspeed = false,
|
||||||
-- lsp_saga = false,
|
-- lsp_saga = false,
|
||||||
lsp_trouble = true,
|
lsp_trouble = true,
|
||||||
illuminate = {
|
mason = true,
|
||||||
enabled = true,
|
markdown = true,
|
||||||
-- lsp = false
|
-- neogit = false,
|
||||||
},
|
-- neotest = false,
|
||||||
mason = true,
|
neotree = true,
|
||||||
markdown = true,
|
notify = true,
|
||||||
-- neogit = false,
|
nvimtree = true,
|
||||||
-- neotest = false,
|
-- overseer = false,
|
||||||
neotree = true,
|
-- pounce = false,
|
||||||
notify = true,
|
symbols_outline = true,
|
||||||
nvimtree = true,
|
telescope = true,
|
||||||
-- overseer = false,
|
treesitter = true,
|
||||||
-- pounce = false,
|
treesitter_context = true,
|
||||||
symbols_outline = true,
|
-- ts_rainbow = false,
|
||||||
telescope = true,
|
-- vim_sneak = false,
|
||||||
treesitter = true,
|
-- vimwiki = false,
|
||||||
treesitter_context = true,
|
which_key = true,
|
||||||
-- ts_rainbow = false,
|
-- Special integrations, see https://github.com/catppuccin/nvim#special-integrations
|
||||||
-- vim_sneak = false,
|
dap = true,
|
||||||
-- vimwiki = false,
|
dap_ui = true,
|
||||||
which_key = true,
|
indent_blankline = {
|
||||||
-- Special integrations, see https://github.com/catppuccin/nvim#special-integrations
|
enabled = true,
|
||||||
dap = true,
|
colored_indent_levels = false,
|
||||||
dap_ui = true,
|
},
|
||||||
indent_blankline = {
|
},
|
||||||
enabled = true,
|
native_lsp = {
|
||||||
colored_indent_levels = false,
|
enabled = true,
|
||||||
},
|
virtual_text = {
|
||||||
},
|
errors = { "italic" },
|
||||||
native_lsp = {
|
hints = { "italic" },
|
||||||
enabled = true,
|
warnings = { "italic" },
|
||||||
virtual_text = {
|
information = { "italic" },
|
||||||
errors = { "italic" },
|
},
|
||||||
hints = { "italic" },
|
underlines = {
|
||||||
warnings = { "italic" },
|
errors = { "underline" },
|
||||||
information = { "italic" },
|
hints = { "underline" },
|
||||||
},
|
warnings = { "underline" },
|
||||||
underlines = {
|
information = { "underline" },
|
||||||
errors = { "underline" },
|
},
|
||||||
hints = { "underline" },
|
inlay_hints = {
|
||||||
warnings = { "underline" },
|
background = true,
|
||||||
information = { "underline" },
|
},
|
||||||
},
|
},
|
||||||
inlay_hints = {
|
custom_highlights = {
|
||||||
background = true,
|
-- Identifier = { fg = colors.lavender },
|
||||||
},
|
-- Statement = { fg = colors.rosewater },
|
||||||
},
|
-- Identifier = { fg = colors.sapphire },
|
||||||
custom_highlights = {
|
-- Function = { fg = colors.mauve },
|
||||||
-- Identifier = { fg = colors.lavender },
|
},
|
||||||
-- Statement = { fg = colors.rosewater },
|
})
|
||||||
-- Identifier = { fg = colors.sapphire },
|
|
||||||
-- Function = { fg = colors.mauve },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_command("colorscheme catppuccin")
|
vim.api.nvim_command("colorscheme catppuccin")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ end
|
|||||||
|
|
||||||
function M.use_google()
|
function M.use_google()
|
||||||
if M.use_google_cache == nil then
|
if M.use_google_cache == nil then
|
||||||
M.use_google_cache = M.file_exists(os.getenv("HOME") .. "/use_google")
|
M.use_google_cache = M.file_exists(vim.env.HOME .. "/use_google")
|
||||||
end
|
end
|
||||||
return M.use_google_cache
|
return M.use_google_cache
|
||||||
end
|
end
|
||||||
@ -40,48 +40,6 @@ function M.file_exists(name)
|
|||||||
end
|
end
|
||||||
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 .. "] = " .. M.dump(v) .. ","
|
|
||||||
end
|
|
||||||
return s .. "} "
|
|
||||||
else
|
|
||||||
return tostring(o)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function M.tprint(tbl, indent)
|
|
||||||
if not indent then
|
|
||||||
indent = 0
|
|
||||||
end
|
|
||||||
local toprint = string.rep(" ", indent) .. "{\r\n"
|
|
||||||
indent = indent + 2
|
|
||||||
for k, v in pairs(tbl) do
|
|
||||||
toprint = toprint .. string.rep(" ", indent)
|
|
||||||
if type(k) == "number" then
|
|
||||||
toprint = toprint .. "[" .. k .. "] = "
|
|
||||||
elseif type(k) == "string" then
|
|
||||||
toprint = toprint .. k .. "= "
|
|
||||||
end
|
|
||||||
if type(v) == "number" then
|
|
||||||
toprint = toprint .. v .. ",\r\n"
|
|
||||||
elseif type(v) == "string" then
|
|
||||||
toprint = toprint .. '"' .. v .. '",\r\n'
|
|
||||||
elseif type(v) == "table" then
|
|
||||||
toprint = toprint .. M.tprint(v, indent + 2) .. ",\r\n"
|
|
||||||
else
|
|
||||||
toprint = toprint .. '"' .. tostring(v) .. '",\r\n'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
toprint = toprint .. string.rep(" ", indent - 2) .. "}"
|
|
||||||
return toprint
|
|
||||||
end
|
|
||||||
|
|
||||||
function M.log(message)
|
function M.log(message)
|
||||||
local log_file_path = vim.fn.expand("$HOME/nvim.log")
|
local log_file_path = vim.fn.expand("$HOME/nvim.log")
|
||||||
local log_file = io.open(log_file_path, "a")
|
local log_file = io.open(log_file_path, "a")
|
||||||
@ -97,4 +55,6 @@ function M.TableConcat(t1, t2)
|
|||||||
return t1
|
return t1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
M.flags.blink = not M.use_google()
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
BIN
zsh/..zshrc.un~
Normal file
BIN
zsh/..zshrc.un~
Normal file
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
export ABBR_QUIET=1
|
export ABBR_QUIET=1
|
||||||
alias grep='grep --colour'
|
alias grep='grep --colour'
|
||||||
# abbr cat='bat'
|
# abbr cat='bat'
|
||||||
alias ls='exa'
|
# alias ls='exa'
|
||||||
alias tmux='tmux -2'
|
alias tmux='tmux -2'
|
||||||
|
|
||||||
alias ..="cd .."
|
alias ..="cd .."
|
||||||
|
@ -26,3 +26,5 @@ fi
|
|||||||
|
|
||||||
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
|
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
|
||||||
. "$HOME/.cargo/env"
|
. "$HOME/.cargo/env"
|
||||||
|
|
||||||
|
ulimit -n 10240
|
||||||
|
@ -5,8 +5,11 @@ export ABBR_QUIET=1
|
|||||||
# ---------------
|
# ---------------
|
||||||
export PATH=$PATH:/google/src/head/depot/google3/experimental/users/cnieves/util
|
export PATH=$PATH:/google/src/head/depot/google3/experimental/users/cnieves/util
|
||||||
export PATH="${HOME}/.config/lsp/lua-language-server/bin:${PATH}"
|
export PATH="${HOME}/.config/lsp/lua-language-server/bin:${PATH}"
|
||||||
export GOROOT=/usr/lib/google-golang
|
export PATH=$PATH:/${HOME}/nvim-linux-x86_64/bin/
|
||||||
export PATH=$GOROOT/bin:$PATH
|
export PATH=$GOROOT/bin:$PATH
|
||||||
|
|
||||||
|
export DUMMY_API_KEY="DUMMY_API_KEY"
|
||||||
|
export GOROOT=/usr/lib/google-golang
|
||||||
export JAVA_HOME=$(readlink -ne /usr/local/buildtools/java/jdk)
|
export JAVA_HOME=$(readlink -ne /usr/local/buildtools/java/jdk)
|
||||||
export CARGO_NET_GIT_FETCH_WITH_CLI=true
|
export CARGO_NET_GIT_FETCH_WITH_CLI=true
|
||||||
source ~/g3path.zsh
|
source ~/g3path.zsh
|
||||||
@ -147,6 +150,7 @@ alias bisect=/google/data/ro/teams/tetralight/bin/bisect
|
|||||||
alias copybara='/google/bin/releases/copybara/public/copybara/copybara'
|
alias copybara='/google/bin/releases/copybara/public/copybara/copybara'
|
||||||
alias allow_ptrace='/google/bin/releases/cider/dbg/allow_ptrace'
|
alias allow_ptrace='/google/bin/releases/cider/dbg/allow_ptrace'
|
||||||
alias bluze=/google/bin/releases/blueprint-bluze/public/bluze
|
alias bluze=/google/bin/releases/blueprint-bluze/public/bluze
|
||||||
|
alias cclean=/google/src/head/depot/google3/devtools/maintenance/cclean/cclean
|
||||||
source /google/bin/releases/gmscore-tools/cli/prod/setup_prod_gms.sh
|
source /google/bin/releases/gmscore-tools/cli/prod/setup_prod_gms.sh
|
||||||
|
|
||||||
abbr bq="blaze query"
|
abbr bq="blaze query"
|
||||||
|
@ -30,7 +30,6 @@
|
|||||||
|
|
||||||
zmodload zsh/langinfo
|
zmodload zsh/langinfo
|
||||||
if [[ ${langinfo[CODESET]:-} != (utf|UTF)(-|)8 ]]; then
|
if [[ ${langinfo[CODESET]:-} != (utf|UTF)(-|)8 ]]; then
|
||||||
local LC_ALL=${${(@M)$(locale -a):#*.(utf|UTF)(-|)8}[1]:-en_US.UTF-8}
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# The list of segments shown on the left. Fill it with the most important segments.
|
# The list of segments shown on the left. Fill it with the most important segments.
|
||||||
|
12
zsh/.zshrc
12
zsh/.zshrc
@ -37,6 +37,7 @@ zplug "zsh-users/zsh-syntax-highlighting", defer:2
|
|||||||
zplug "mafredri/zsh-async", from:"github", use:"async.zsh"
|
zplug "mafredri/zsh-async", from:"github", use:"async.zsh"
|
||||||
zplug "zsh-users/zsh-autosuggestions"
|
zplug "zsh-users/zsh-autosuggestions"
|
||||||
zplug "zsh-users/zsh-history-substring-search"
|
zplug "zsh-users/zsh-history-substring-search"
|
||||||
|
zplug 'joshskidmore/zsh-fzf-history-search'
|
||||||
zplug "modules/command-not-found", from:prezto
|
zplug "modules/command-not-found", from:prezto
|
||||||
zplug "romkatv/powerlevel10k", as:theme, depth:1
|
zplug "romkatv/powerlevel10k", as:theme, depth:1
|
||||||
|
|
||||||
@ -77,7 +78,7 @@ fi
|
|||||||
|
|
||||||
zle -N fancy-ctrl-z
|
zle -N fancy-ctrl-z
|
||||||
bindkey '^Z' fancy-ctrl-z
|
bindkey '^Z' fancy-ctrl-z
|
||||||
bindkey '^R' fzf-history-widget
|
# bindkey '^R' fzf-history-widget
|
||||||
bindkey "^A" beginning-of-line
|
bindkey "^A" beginning-of-line
|
||||||
bindkey "^E" end-of-line
|
bindkey "^E" end-of-line
|
||||||
bindkey '\eK' kill-line
|
bindkey '\eK' kill-line
|
||||||
@ -158,12 +159,13 @@ autoload -Uz add-zsh-hook
|
|||||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||||
|
|
||||||
export EDITOR='nvim'
|
export EDITOR='nvim'
|
||||||
|
export PATH="$PATH:/opt/nvim/"
|
||||||
export TERM=xterm-256color
|
export TERM=xterm-256color
|
||||||
export LANG="en_US.UTF-8"
|
|
||||||
export LC_ALL="en_US.UTF-8"
|
export CARGO_NET_GIT_FETCH_WITH_CLI=true
|
||||||
export LC_CTYPE="en_US.UTF-8"
|
|
||||||
export LANG_ALL="en_US.UTF-8"
|
|
||||||
|
|
||||||
source ~/.bash_profile
|
source ~/.bash_profile
|
||||||
|
export RIPGREP_CONFIG_PATH=$HOME/.ripgreprc
|
||||||
|
|
||||||
export PATH="$HOME/.local/bin:$PATH"
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
Reference in New Issue
Block a user