Compare commits
3 Commits
c19d01dc21
...
92ea9df483
Author | SHA1 | Date | |
---|---|---|---|
92ea9df483 | |||
a91b231e04 | |||
a37f9dab1c |
@ -1,26 +1,18 @@
|
||||
local use_google = require("utils").use_google
|
||||
|
||||
return {
|
||||
-- "sindrets/diffview.nvim",
|
||||
{ "johmsalas/text-case.nvim" },
|
||||
"kdheepak/lazygit.nvim",
|
||||
"flwyd/vim-conjoin",
|
||||
"vim-scripts/vcscommand.vim",
|
||||
"jghauser/mkdir.nvim",
|
||||
"AndrewRadev/tagalong.vim",
|
||||
{ "nvim-lua/plenary.nvim", lazy = false },
|
||||
{ "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") },
|
||||
{
|
||||
"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",
|
||||
ft = "lua",
|
||||
@ -29,15 +21,16 @@ return {
|
||||
end,
|
||||
},
|
||||
{
|
||||
|
||||
"andweeb/presence.nvim",
|
||||
cond = not use_google(),
|
||||
config = function()
|
||||
require("presence").setup({ show_time = false })
|
||||
require("presence").setup({
|
||||
main_image = "file",
|
||||
show_time = false,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{ "udalov/kotlin-vim", ft = "kotlin" },
|
||||
{ "ray-x/go.nvim", ft = "go" },
|
||||
{ "ray-x/guihua.lua", ft = "go" },
|
||||
{
|
||||
"rafcamlet/nvim-luapad",
|
||||
config = function()
|
||||
@ -46,28 +39,24 @@ return {
|
||||
})
|
||||
end,
|
||||
},
|
||||
"kdheepak/lazygit.nvim",
|
||||
"flwyd/vim-conjoin",
|
||||
"godlygeek/tabular",
|
||||
"wesQ3/vim-windowswap",
|
||||
"cakebaker/scss-syntax.vim",
|
||||
"vim-scripts/vcscommand.vim",
|
||||
"jghauser/mkdir.nvim",
|
||||
"google/vim-searchindex",
|
||||
"kosayoda/nvim-lightbulb",
|
||||
{
|
||||
"kosayoda/nvim-lightbulb",
|
||||
opts = {
|
||||
autocmd = { enabled = true },
|
||||
virtual_text = {
|
||||
enabled = true,
|
||||
text = " ",
|
||||
hl = "DiagnosticWarn",
|
||||
},
|
||||
sign = { enabled = false },
|
||||
},
|
||||
},
|
||||
{
|
||||
"ntpeters/vim-better-whitespace",
|
||||
config = function()
|
||||
vim.g.better_whitespace_filetypes_blacklist = { "dashboard" }
|
||||
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",
|
||||
cmd = "UndotreeToggle",
|
||||
@ -78,19 +67,14 @@ return {
|
||||
{
|
||||
"stevearc/aerial.nvim",
|
||||
opts = {},
|
||||
-- Optional dependencies
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
cmd = { "AerialToggle", "AerialOn" },
|
||||
keys = {
|
||||
{ "<leader>so", ":AerialToggle<CR>", desc = "[S]symbols [O]utline" },
|
||||
},
|
||||
keys = { { "<leader>so", ":AerialToggle<CR>", desc = "[S]symbols [O]utline" } },
|
||||
},
|
||||
{
|
||||
"rmagatti/auto-session",
|
||||
"olimorris/persisted.nvim",
|
||||
config = function()
|
||||
require("auto-session").setup({ log_level = "error" })
|
||||
require("persisted").setup({})
|
||||
require("telescope").load_extension("persisted")
|
||||
end,
|
||||
},
|
||||
{
|
||||
@ -101,42 +85,4 @@ return {
|
||||
end,
|
||||
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 = {
|
||||
{ desc = " Update", group = "@property", action = "Lazy update", key = "u" },
|
||||
{
|
||||
desc = " cwd session",
|
||||
group = "Number",
|
||||
action = "SessionLoad",
|
||||
key = ".",
|
||||
},
|
||||
{
|
||||
icon = " ",
|
||||
icon_hl = "@variable",
|
||||
@ -19,17 +25,17 @@ return {
|
||||
key = "f",
|
||||
},
|
||||
{
|
||||
desc = " Apps",
|
||||
group = "DiagnosticHint",
|
||||
action = "Telescope app",
|
||||
key = "a",
|
||||
},
|
||||
{
|
||||
desc = " dotfiles",
|
||||
desc = " dotfiles",
|
||||
group = "Number",
|
||||
action = "lua find_dotfiles()",
|
||||
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 = {
|
||||
ignore = { -- filetypes to ignore; empty by default
|
||||
"gdscript",
|
||||
"rust",
|
||||
}, -- for these filetypes
|
||||
},
|
||||
}
|
||||
@ -36,7 +37,7 @@ return {
|
||||
dependencies = deps,
|
||||
keys = {
|
||||
{ "<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>" },
|
||||
{ "g0", "<cmd>lua vim.lsp.buf.document_symbol()<CR>" },
|
||||
{ "gr", "<Cmd>Telescope lsp_references<CR>" },
|
||||
|
@ -1,4 +1,9 @@
|
||||
return {
|
||||
{
|
||||
"vxpm/ferris.nvim",
|
||||
ft = "rust",
|
||||
},
|
||||
|
||||
{
|
||||
"mrcjkb/rustaceanvim",
|
||||
version = "^3", -- Recommended
|
||||
|
@ -65,58 +65,109 @@ if use_google() then
|
||||
end
|
||||
|
||||
return {
|
||||
"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()
|
||||
{
|
||||
"aznhe21/actions-preview.nvim",
|
||||
config = function()
|
||||
require("actions-preview").setup({
|
||||
telescope = {
|
||||
sorting_strategy = "ascending",
|
||||
layout_strategy = "vertical",
|
||||
layout_config = {
|
||||
width = 0.8,
|
||||
height = 0.9,
|
||||
prompt_position = "top",
|
||||
preview_cutoff = 20,
|
||||
preview_height = function(_, _, max_lines)
|
||||
return max_lines - 15
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
extensions = {
|
||||
codesearch = {
|
||||
experimental = true, -- enable results from google3/experimental
|
||||
})
|
||||
end,
|
||||
keys = {
|
||||
{ "?", "<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,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
keys = keys,
|
||||
extensions = {
|
||||
codesearch = {
|
||||
experimental = true, -- enable results from google3/experimental
|
||||
},
|
||||
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",
|
||||
opts = {
|
||||
window = {
|
||||
width = 0.4,
|
||||
width = 140,
|
||||
},
|
||||
plugins = {
|
||||
tmux = { enabled = false },
|
||||
|
Reference in New Issue
Block a user