Compare commits
3 Commits
c19d01dc21
...
92ea9df483
Author | SHA1 | Date | |
---|---|---|---|
92ea9df483 | |||
a91b231e04 | |||
a37f9dab1c |
@ -1,26 +1,18 @@
|
|||||||
local use_google = require("utils").use_google
|
local use_google = require("utils").use_google
|
||||||
|
|
||||||
return {
|
return {
|
||||||
-- "sindrets/diffview.nvim",
|
"kdheepak/lazygit.nvim",
|
||||||
{ "johmsalas/text-case.nvim" },
|
"flwyd/vim-conjoin",
|
||||||
|
"vim-scripts/vcscommand.vim",
|
||||||
|
"jghauser/mkdir.nvim",
|
||||||
|
"AndrewRadev/tagalong.vim",
|
||||||
{ "nvim-lua/plenary.nvim", lazy = false },
|
{ "nvim-lua/plenary.nvim", lazy = false },
|
||||||
{ "squk/java-syntax.vim", ft = "java" },
|
{ "squk/java-syntax.vim", ft = "java" },
|
||||||
|
{ "udalov/kotlin-vim", ft = "kotlin" },
|
||||||
|
{ "ray-x/go.nvim", ft = "go" },
|
||||||
|
{ "ray-x/guihua.lua", ft = "go" },
|
||||||
|
{ "andymass/vim-matchup", event = "VimEnter" },
|
||||||
{ "squk/gdrama-syntax.vim", dir = vim.fn.expand("$HOME/dev/gdrama-syntax.vim") },
|
{ "squk/gdrama-syntax.vim", dir = vim.fn.expand("$HOME/dev/gdrama-syntax.vim") },
|
||||||
{
|
|
||||||
"folke/todo-comments.nvim",
|
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"mawkler/modicator.nvim",
|
|
||||||
init = function()
|
|
||||||
-- These are required for Modicator to work
|
|
||||||
vim.o.cursorline = true
|
|
||||||
vim.o.number = true
|
|
||||||
vim.o.termguicolors = true
|
|
||||||
end,
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"NvChad/nvim-colorizer.lua",
|
"NvChad/nvim-colorizer.lua",
|
||||||
ft = "lua",
|
ft = "lua",
|
||||||
@ -29,15 +21,16 @@ return {
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
||||||
"andweeb/presence.nvim",
|
"andweeb/presence.nvim",
|
||||||
cond = not use_google(),
|
cond = not use_google(),
|
||||||
config = function()
|
config = function()
|
||||||
require("presence").setup({ show_time = false })
|
require("presence").setup({
|
||||||
|
main_image = "file",
|
||||||
|
show_time = false,
|
||||||
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{ "udalov/kotlin-vim", ft = "kotlin" },
|
|
||||||
{ "ray-x/go.nvim", ft = "go" },
|
|
||||||
{ "ray-x/guihua.lua", ft = "go" },
|
|
||||||
{
|
{
|
||||||
"rafcamlet/nvim-luapad",
|
"rafcamlet/nvim-luapad",
|
||||||
config = function()
|
config = function()
|
||||||
@ -46,28 +39,24 @@ return {
|
|||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
"kdheepak/lazygit.nvim",
|
{
|
||||||
"flwyd/vim-conjoin",
|
"kosayoda/nvim-lightbulb",
|
||||||
"godlygeek/tabular",
|
opts = {
|
||||||
"wesQ3/vim-windowswap",
|
autocmd = { enabled = true },
|
||||||
"cakebaker/scss-syntax.vim",
|
virtual_text = {
|
||||||
"vim-scripts/vcscommand.vim",
|
enabled = true,
|
||||||
"jghauser/mkdir.nvim",
|
text = " ",
|
||||||
"google/vim-searchindex",
|
hl = "DiagnosticWarn",
|
||||||
"kosayoda/nvim-lightbulb",
|
},
|
||||||
|
sign = { enabled = false },
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"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,
|
||||||
},
|
},
|
||||||
"junegunn/fzf.vim",
|
|
||||||
"AndrewRadev/tagalong.vim",
|
|
||||||
"tversteeg/registers.nvim",
|
|
||||||
"jremmen/vim-ripgrep",
|
|
||||||
"viniciusgerevini/clyde.vim",
|
|
||||||
{ "andymass/vim-matchup", event = "VimEnter" },
|
|
||||||
-- Undo tree
|
|
||||||
{
|
{
|
||||||
"mbbill/undotree",
|
"mbbill/undotree",
|
||||||
cmd = "UndotreeToggle",
|
cmd = "UndotreeToggle",
|
||||||
@ -78,19 +67,14 @@ return {
|
|||||||
{
|
{
|
||||||
"stevearc/aerial.nvim",
|
"stevearc/aerial.nvim",
|
||||||
opts = {},
|
opts = {},
|
||||||
-- Optional dependencies
|
|
||||||
dependencies = {
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
},
|
|
||||||
cmd = { "AerialToggle", "AerialOn" },
|
cmd = { "AerialToggle", "AerialOn" },
|
||||||
keys = {
|
keys = { { "<leader>so", ":AerialToggle<CR>", desc = "[S]symbols [O]utline" } },
|
||||||
{ "<leader>so", ":AerialToggle<CR>", desc = "[S]symbols [O]utline" },
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"rmagatti/auto-session",
|
"olimorris/persisted.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("auto-session").setup({ log_level = "error" })
|
require("persisted").setup({})
|
||||||
|
require("telescope").load_extension("persisted")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -101,42 +85,4 @@ return {
|
|||||||
end,
|
end,
|
||||||
ft = { "markdown" },
|
ft = { "markdown" },
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"glacambre/firenvim",
|
|
||||||
|
|
||||||
-- Lazy load firenvim
|
|
||||||
-- Explanation: https://github.com/folke/lazy.nvim/discussions/463#discussioncomment-4819297
|
|
||||||
config = function()
|
|
||||||
vim.g.firenvim_config = {
|
|
||||||
localSettings = {
|
|
||||||
[ [[.*]] ] = {
|
|
||||||
cmdline = "firenvim",
|
|
||||||
priority = 0,
|
|
||||||
selector = 'textarea:not([readonly]):not([class="handsontableInput"]), div[role="textbox"]',
|
|
||||||
takeover = "always",
|
|
||||||
},
|
|
||||||
[ [[.*notion\.so.*]] ] = {
|
|
||||||
priority = 9,
|
|
||||||
takeover = "never",
|
|
||||||
},
|
|
||||||
[ [[.*docs\.google\.com.*]] ] = {
|
|
||||||
priority = 9,
|
|
||||||
takeover = "never",
|
|
||||||
},
|
|
||||||
[ [[google\.com.*]] ] = {
|
|
||||||
priority = 9,
|
|
||||||
takeover = "never",
|
|
||||||
},
|
|
||||||
[ [[twitch\.tv.*]] ] = {
|
|
||||||
priority = 9,
|
|
||||||
takeover = "never",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
lazy = not vim.g.started_by_firenvim,
|
|
||||||
build = function()
|
|
||||||
vim.fn["firenvim#install"](0)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,12 @@ return {
|
|||||||
},
|
},
|
||||||
shortcut = {
|
shortcut = {
|
||||||
{ desc = " Update", group = "@property", action = "Lazy update", key = "u" },
|
{ desc = " Update", group = "@property", action = "Lazy update", key = "u" },
|
||||||
|
{
|
||||||
|
desc = " cwd session",
|
||||||
|
group = "Number",
|
||||||
|
action = "SessionLoad",
|
||||||
|
key = ".",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
icon = " ",
|
icon = " ",
|
||||||
icon_hl = "@variable",
|
icon_hl = "@variable",
|
||||||
@ -19,17 +25,17 @@ return {
|
|||||||
key = "f",
|
key = "f",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
desc = " Apps",
|
desc = " dotfiles",
|
||||||
group = "DiagnosticHint",
|
|
||||||
action = "Telescope app",
|
|
||||||
key = "a",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = " dotfiles",
|
|
||||||
group = "Number",
|
group = "Number",
|
||||||
action = "lua find_dotfiles()",
|
action = "lua find_dotfiles()",
|
||||||
key = "d",
|
key = "d",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
desc = " sessions",
|
||||||
|
group = "Number",
|
||||||
|
action = "Telescope persisted",
|
||||||
|
key = "s",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
38
vim/.vim/lua/plugins/firenvim.lua
Normal file
38
vim/.vim/lua/plugins/firenvim.lua
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
return {
|
||||||
|
"glacambre/firenvim",
|
||||||
|
|
||||||
|
-- Lazy load firenvim
|
||||||
|
-- Explanation: https://github.com/folke/lazy.nvim/discussions/463#discussioncomment-4819297
|
||||||
|
config = function()
|
||||||
|
vim.g.firenvim_config = {
|
||||||
|
localSettings = {
|
||||||
|
[ [[.*]] ] = {
|
||||||
|
cmdline = "firenvim",
|
||||||
|
priority = 0,
|
||||||
|
selector = 'textarea:not([readonly]):not([class="handsontableInput"]), div[role="textbox"]',
|
||||||
|
takeover = "always",
|
||||||
|
},
|
||||||
|
[ [[.*notion\.so.*]] ] = {
|
||||||
|
priority = 9,
|
||||||
|
takeover = "never",
|
||||||
|
},
|
||||||
|
[ [[.*docs\.google\.com.*]] ] = {
|
||||||
|
priority = 9,
|
||||||
|
takeover = "never",
|
||||||
|
},
|
||||||
|
[ [[google\.com.*]] ] = {
|
||||||
|
priority = 9,
|
||||||
|
takeover = "never",
|
||||||
|
},
|
||||||
|
[ [[twitch\.tv.*]] ] = {
|
||||||
|
priority = 9,
|
||||||
|
takeover = "never",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
lazy = not vim.g.started_by_firenvim,
|
||||||
|
build = function()
|
||||||
|
vim.fn["firenvim#install"](0)
|
||||||
|
end,
|
||||||
|
}
|
@ -26,6 +26,7 @@ return {
|
|||||||
filetypes = {
|
filetypes = {
|
||||||
ignore = { -- filetypes to ignore; empty by default
|
ignore = { -- filetypes to ignore; empty by default
|
||||||
"gdscript",
|
"gdscript",
|
||||||
|
"rust",
|
||||||
}, -- for these filetypes
|
}, -- for these filetypes
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -36,7 +37,7 @@ return {
|
|||||||
dependencies = deps,
|
dependencies = deps,
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>rn", "<cmd>lua vim.lsp.buf.rename()<CR>" },
|
{ "<leader>rn", "<cmd>lua vim.lsp.buf.rename()<CR>" },
|
||||||
{ "?", "<cmd>lua vim.lsp.buf.code_action()<CR>" },
|
-- { "?", "<cmd>lua vim.lsp.buf.code_action()<CR>" },
|
||||||
{ "L", "<cmd>lua vim.lsp.buf.hover()<CR>" },
|
{ "L", "<cmd>lua vim.lsp.buf.hover()<CR>" },
|
||||||
{ "g0", "<cmd>lua vim.lsp.buf.document_symbol()<CR>" },
|
{ "g0", "<cmd>lua vim.lsp.buf.document_symbol()<CR>" },
|
||||||
{ "gr", "<Cmd>Telescope lsp_references<CR>" },
|
{ "gr", "<Cmd>Telescope lsp_references<CR>" },
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
return {
|
return {
|
||||||
|
{
|
||||||
|
"vxpm/ferris.nvim",
|
||||||
|
ft = "rust",
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"mrcjkb/rustaceanvim",
|
"mrcjkb/rustaceanvim",
|
||||||
version = "^3", -- Recommended
|
version = "^3", -- Recommended
|
||||||
|
@ -65,58 +65,109 @@ if use_google() then
|
|||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"nvim-telescope/telescope.nvim",
|
{
|
||||||
dependencies = {},
|
"aznhe21/actions-preview.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("telescope").setup({
|
require("actions-preview").setup({
|
||||||
defaults = {
|
telescope = {
|
||||||
-- The vertical layout strategy is good to handle long paths like those in
|
sorting_strategy = "ascending",
|
||||||
-- google3 repos because you have nearly the full screen to display a file path.
|
layout_strategy = "vertical",
|
||||||
-- The caveat is that the preview area is smaller.
|
layout_config = {
|
||||||
layout_strategy = "vertical",
|
width = 0.8,
|
||||||
-- Common paths in google3 repos are collapsed following the example of Cider
|
height = 0.9,
|
||||||
-- It is nice to keep this as a user config rather than part of
|
prompt_position = "top",
|
||||||
-- telescope-codesearch because it can be reused by other telescope pickers.
|
preview_cutoff = 20,
|
||||||
path_display = function(opts, path)
|
preview_height = function(_, _, max_lines)
|
||||||
-- Do common substitutions
|
return max_lines - 15
|
||||||
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
|
|
||||||
-- with the built-in truncation.
|
|
||||||
-- `truncate` handler in transform_path memoizes computed truncation length in opts.__length.
|
|
||||||
-- Here we are manually propagating this value between new_opts and opts.
|
|
||||||
-- We can make this cleaner and more complicated using metatables :)
|
|
||||||
local new_opts = {
|
|
||||||
path_display = {
|
|
||||||
truncate = true,
|
|
||||||
},
|
|
||||||
__length = opts.__length,
|
|
||||||
}
|
|
||||||
path = require("telescope.utils").transform_path(new_opts, path)
|
|
||||||
opts.__length = new_opts.__length
|
|
||||||
return path
|
|
||||||
end,
|
|
||||||
mappings = {
|
|
||||||
i = {
|
|
||||||
["<S-Down>"] = function()
|
|
||||||
require("telescope.actions").cycle_history_next()
|
|
||||||
end,
|
|
||||||
["<S-Up>"] = function()
|
|
||||||
require("telescope.actions").cycle_history_prev()
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
})
|
||||||
extensions = {
|
end,
|
||||||
codesearch = {
|
keys = {
|
||||||
experimental = true, -- enable results from google3/experimental
|
{ "?", "<cmd>lua require('actions-preview').code_actions()<cr>" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"johmsalas/text-case.nvim",
|
||||||
|
dependencies = { "nvim-telescope/telescope.nvim" },
|
||||||
|
config = function()
|
||||||
|
require("textcase").setup({})
|
||||||
|
require("telescope").load_extension("textcase")
|
||||||
|
end,
|
||||||
|
keys = {
|
||||||
|
{ "<leader>t", "<cmd>TextCaseOpenTelescope<CR>", mode = { "n", "v" }, desc = "Telescope" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"piersolenski/telescope-import.nvim",
|
||||||
|
dependencies = "nvim-telescope/telescope.nvim",
|
||||||
|
config = function()
|
||||||
|
require("telescope").load_extension("import")
|
||||||
|
end,
|
||||||
|
keys = {
|
||||||
|
{ "<leader>i", ":Telescope import<CR>" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
dependencies = {},
|
||||||
|
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
|
||||||
|
-- with the built-in truncation.
|
||||||
|
-- `truncate` handler in transform_path memoizes computed truncation length in opts.__length.
|
||||||
|
-- Here we are manually propagating this value between new_opts and opts.
|
||||||
|
-- We can make this cleaner and more complicated using metatables :)
|
||||||
|
local new_opts = {
|
||||||
|
path_display = {
|
||||||
|
truncate = true,
|
||||||
|
},
|
||||||
|
__length = opts.__length,
|
||||||
|
}
|
||||||
|
path = require("telescope.utils").transform_path(new_opts, path)
|
||||||
|
opts.__length = new_opts.__length
|
||||||
|
return path
|
||||||
|
end,
|
||||||
|
mappings = {
|
||||||
|
i = {
|
||||||
|
["<S-Down>"] = function()
|
||||||
|
require("telescope.actions").cycle_history_next()
|
||||||
|
end,
|
||||||
|
["<S-Up>"] = function()
|
||||||
|
require("telescope.actions").cycle_history_prev()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
extensions = {
|
||||||
})
|
codesearch = {
|
||||||
end,
|
experimental = true, -- enable results from google3/experimental
|
||||||
keys = keys,
|
},
|
||||||
|
persisted = {},
|
||||||
|
import = {
|
||||||
|
-- Add imports to the top of the file keeping the cursor in place
|
||||||
|
insert_at_top = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
keys = keys,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ return {
|
|||||||
"folke/zen-mode.nvim",
|
"folke/zen-mode.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
window = {
|
window = {
|
||||||
width = 0.4,
|
width = 140,
|
||||||
},
|
},
|
||||||
plugins = {
|
plugins = {
|
||||||
tmux = { enabled = false },
|
tmux = { enabled = false },
|
||||||
|
Reference in New Issue
Block a user