Fix relatedfiles

This commit is contained in:
Christian Nieves
2023-07-14 15:16:35 -05:00
parent ff24d719b1
commit fb83c79450
8 changed files with 161 additions and 137 deletions

View File

@ -1,34 +1,37 @@
{
"LuaSnip": { "branch": "master", "commit": "105b5f7f72c13e682a3aa5d29eac2408ae513b22" },
"LuaSnip": { "branch": "master", "commit": "c7984d1cca3d8615e4daefc196597872a0b8d590" },
"aerial.nvim": { "branch": "master", "commit": "fb1f08c9f90e8b0c04b2f2c5d95d06288a14c5b2" },
"ai.nvim": { "branch": "main", "commit": "d7391d4782b90ad3501f6f716f2b308092981787" },
"asyncrun.vim": { "branch": "master", "commit": "7191d0c30dd105e5d7f897b9a6ee19cabe734466" },
"auto-session": { "branch": "main", "commit": "21033c6815f249a7839c3a85fc8a6b44d74925c9" },
"auto-session": { "branch": "main", "commit": "7afbb149f87be279778689596c781882014f7eef" },
"calendar-vim": { "branch": "master", "commit": "a7e73e02c92566bf427b2a1d6a61a8f23542cc21" },
"catppuccin": { "branch": "main", "commit": "3ffd2f511f3dc6c01258923d7170ccaf1445634b" },
"ciderlsp-nvim": { "branch": "main", "commit": "45ee3634c6d4224c6981825da5bde39804addc71" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-calc": { "branch": "main", "commit": "50792f34a628ea6eb31d2c90e8df174671e4e7a0" },
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
"cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" },
"cmp-nvim-ciderlsp": { "branch": "main", "commit": "e1b0015a0c090e20d1cbb34e5639e6dd145d3f3e" },
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
"cmp-nvim-lsp-document-symbol": { "branch": "main", "commit": "f0f53f704c08ea501f9d222b23491b0d354644b0" },
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" },
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" },
"cmp-tabnine": { "branch": "main", "commit": "b93f82ef5150e578677fc2e2b4b328b19eed77e1" },
"cmp-treesitter": { "branch": "master", "commit": "389eadd48c27aa6dc0e6b992644704f026802a2e" },
"cmp-under-comparator": { "branch": "master", "commit": "6857f10272c3cfe930cece2afa2406e1385bfef8" },
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
"conflict-marker.vim": { "branch": "master", "commit": "11a4d42244755505b66b15cd4496a150432eb5e3" },
"crates.nvim": { "branch": "main", "commit": "1dffccc0a95f656ebe00cacb4de282473430c5a1" },
"formatter.nvim": { "branch": "master", "commit": "fa4f2729cc2909db599169f22d8e55632d4c8d59" },
"friendly-snippets": { "branch": "main", "commit": "6153166d5a3dcc7e2809ea4f17f9edb34d026026" },
"friendly-snippets": { "branch": "main", "commit": "ca668b7a4a2913ad1109b5e4aaf0013651956b13" },
"fzf": { "branch": "master", "commit": "547e101f1d6bf326d286bac0fb3272738a92a67f" },
"fzf.vim": { "branch": "master", "commit": "1dcdb21db618055134cd611f4f5918f6d00a5df0" },
"git-conflict.nvim": { "branch": "main", "commit": "8d962d83cae924a314965f738ed1e05a4000d682" },
"gitsigns.nvim": { "branch": "main", "commit": "48c3ae8ec74cb83f9570ceb0c5ab8217db7a2220" },
"go.nvim": { "branch": "master", "commit": "6550ddf5ce491d17af009c397aceb25310566eaa" },
"guihua.lua": { "branch": "master", "commit": "ab8b1f09603cc268770efd057115035dc6cfa83d" },
"hg": { "branch": "main", "commit": "1c4bdf80174ec840ba76c4dc7032c4313db62199" },
"java-syntax.vim": { "branch": "master", "commit": "9a3d76a8c6cd7765ba93a7bdd9280594167e3f1b" },
"kotlin-vim": { "branch": "master", "commit": "53fe045906df8eeb07cb77b078fc93acda6c90b8" },
"lazy.nvim": { "branch": "main", "commit": "14d76aac4bd3ff07c1fca074c210f28f766a931e" },
@ -39,6 +42,7 @@
"lsp_lines.nvim": { "branch": "main", "commit": "f53af96d4789eef39a082dbcce078d2bfc384ece" },
"lspkind.nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" },
"lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" },
"luasnip-google.nvim": { "branch": "main", "commit": "5fd7feb144de0ecea837618c9c9e1bbecc0e3243" },
"markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "796008869e67ef27a5aa5ac44c08ce2a60b89f55" },
"mason.nvim": { "branch": "main", "commit": "5ad3e113b0c3fde3caba8630599373046f6197e8" },
@ -48,13 +52,14 @@
"nui.nvim": { "branch": "main", "commit": "d146966a423e60699b084eeb28489fe3b6427599" },
"null-ls.nvim": { "branch": "main", "commit": "db09b6c691def0038c456551e4e2772186449f35" },
"nvim-cmp": { "branch": "main", "commit": "c4e491a87eeacf0408902c32f031d802c7eafce8" },
"nvim-lightbulb": { "branch": "master", "commit": "6166029a136afd56cf23384fc31e8ba203a6e102" },
"nvim-lspconfig": { "branch": "master", "commit": "f88fc62d9770e70faab132ddfed680e49fb012f3" },
"nvim-lightbulb": { "branch": "master", "commit": "bb9ec720aa998252951627f811e8f39b76789e0a" },
"nvim-lspconfig": { "branch": "master", "commit": "deade69789089c3da15237697156334fb3e943f0" },
"nvim-notify": { "branch": "master", "commit": "ea9c8ce7a37f2238f934e087c255758659948e0f" },
"nvim-osc52": { "branch": "main", "commit": "3e96035d62290183fe7a11418db2b254fcfcaee3" },
"nvim-scrollbar": { "branch": "main", "commit": "35f99d559041c7c0eff3a41f9093581ceea534e8" },
"nvim-treesitter": { "branch": "master", "commit": "575f5a4b1fcb60c1ac4f560c46a5171454d674ca" },
"nvim-web-devicons": { "branch": "master", "commit": "9ab9b0b894b2388a9dbcdee5f00ce72e25d85bf9" },
"nvim_figtree": { "branch": "main", "commit": "9bc3025f46e34732382da1019e256a9d8bec1e55" },
"plenary.nvim": { "branch": "master", "commit": "bda256fab0eb66a15e8190937e417e6a14ee5d72" },
"refactoring.nvim": { "branch": "master", "commit": "56b747d1be0aa5cecddf85e6f3ca2aed6797edef" },
"registers.nvim": { "branch": "main", "commit": "2ab8372bb837f05fae6b43091f10a0b725d113ca" },
@ -62,12 +67,16 @@
"telekasten.nvim": { "branch": "main", "commit": "4a5e57eee9c5154ed77423bb7fa6619fdb0784cd" },
"telescope-file-browser.nvim": { "branch": "master", "commit": "e03ff55962417b69c85ef41424079bb0580546ba" },
"telescope.nvim": { "branch": "master", "commit": "276362a8020c6e94c7a76d49aa00d4923b0c02f3" },
"telescope_citc": { "branch": "main", "commit": "d6421d5bfe058915ece0daec55e488f8ea05f207" },
"telescope_codesearch": { "branch": "main", "commit": "a26077ad3c68cf897ae1c31da903d6516ebb9c92" },
"telescope_fig": { "branch": "main", "commit": "90150e1aa368b49a5125689b3a6da573a99e2bda" },
"trouble.nvim": { "branch": "main", "commit": "d99e2abd10808ef91738ce98a5c767e6a51df449" },
"undotree": { "branch": "master", "commit": "0e11ba7325efbbb3f3bebe06213afa3e7ec75131" },
"vcscommand.vim": { "branch": "master", "commit": "2fb32681361f37533455d20aaa7fc6eb11b0fa4b" },
"vim-bazel": { "branch": "master", "commit": "31b0d5e4f51da1aeb56d65bf505a744e6de405de" },
"vim-better-whitespace": { "branch": "master", "commit": "1b22dc57a2751c7afbc6025a7da39b7c22db635d" },
"vim-dirdiff": { "branch": "master", "commit": "84bc8999fde4b3c2d8b228b560278ab30c7ea4c9" },
"vim-imp": { "branch": "main", "commit": "394e926ce62010443731f3923031e5afa1279f3e" },
"vim-indent-guides": { "branch": "master", "commit": "a1e1390c0136e63e813d051de2003bf0ee18ae30" },
"vim-maktaba": { "branch": "master", "commit": "fe95bb10f6bb250943a44632107f6a3d76ce5f28" },
"vim-matchup": { "branch": "master", "commit": "17cc05867cb3314761e4baa20115a27120f8e82c" },

View File

@ -1,71 +0,0 @@
vim.g.catppuccin_flavour = "macchiato" -- latte, frappe, macchiato, mocha
local colors = require("catppuccin.palettes").get_palette()
require("catppuccin").setup({
flavour = "macchiato",
integrations = {
cmp = true,
-- coc_nvim = false,
dashboard = true,
-- fern = false,
fidget = true,
gitgutter = true,
gitsigns = true,
-- hop = false,
-- illuminate = false,
-- leap = false,
-- lightspeed = false,
-- lsp_saga = false,
lsp_trouble = true,
mason = true,
markdown = true,
-- neogit = false,
-- neotest = false,
neotree = true,
notify = true,
-- nvimtree = true,
-- overseer = false,
-- pounce = false,
symbols_outline = true,
telescope = true,
treesitter = true,
treesitter_context = false,
-- ts_rainbow = false,
-- vim_sneak = false,
-- vimwiki = false,
which_key = true,
-- Special integrations, see https://github.com/catppuccin/nvim#special-integrations
dap = {
enabled = false,
enable_ui = false,
},
indent_blankline = {
enabled = true,
colored_indent_levels = false,
},
native_lsp = {
enabled = true,
virtual_text = {
errors = { "italic" },
hints = { "italic" },
warnings = { "italic" },
information = { "italic" },
},
underlines = {
errors = { "underline" },
hints = { "underline" },
warnings = { "underline" },
information = { "underline" },
},
},
},
custom_highlights = {
Identifier = { fg = colors.lavender },
Statement = { fg = colors.rosewater },
-- Identifier = { fg = colors.sapphire },
Function = { fg = colors.mauve },
},
})
vim.api.nvim_command("colorscheme catppuccin")

View File

@ -94,15 +94,6 @@ return {
require("libp").setup()
end,
},
{
"catppuccin/nvim",
name = "catppuccin",
lazy = false, -- make sure we load this during startup if it is your main colorscheme
priority = 1000, -- make sure to load this before all the other start plugins
config = function()
require("config.catppuccin")
end,
},
{
"ojroques/nvim-osc52",
config = function()

View File

@ -0,0 +1,79 @@
return {
"catppuccin/nvim",
name = "catppuccin",
lazy = false, -- make sure we load this during startup if it is your main colorscheme
priority = 1000, -- make sure to load this before all the other start plugins
config = function()
vim.g.catppuccin_flavour = "macchiato" -- latte, frappe, macchiato, mocha
local colors = require("catppuccin.palettes").get_palette()
require("catppuccin").setup({
flavour = "macchiato",
integrations = {
cmp = true,
-- coc_nvim = false,
dashboard = true,
-- fern = false,
fidget = true,
gitgutter = true,
gitsigns = true,
-- hop = false,
-- illuminate = false,
-- leap = false,
-- lightspeed = false,
-- lsp_saga = false,
lsp_trouble = true,
mason = true,
markdown = true,
-- neogit = false,
-- neotest = false,
neotree = true,
notify = true,
-- nvimtree = true,
-- overseer = false,
-- pounce = false,
symbols_outline = true,
telescope = true,
treesitter = true,
treesitter_context = false,
-- ts_rainbow = false,
-- vim_sneak = false,
-- vimwiki = false,
which_key = true,
-- Special integrations, see https://github.com/catppuccin/nvim#special-integrations
dap = {
enabled = false,
enable_ui = false,
},
indent_blankline = {
enabled = true,
colored_indent_levels = false,
},
native_lsp = {
enabled = true,
virtual_text = {
errors = { "italic" },
hints = { "italic" },
warnings = { "italic" },
information = { "italic" },
},
underlines = {
errors = { "underline" },
hints = { "underline" },
warnings = { "underline" },
information = { "underline" },
},
},
},
custom_highlights = {
Identifier = { fg = colors.lavender },
Statement = { fg = colors.rosewater },
-- Identifier = { fg = colors.sapphire },
Function = { fg = colors.mauve },
},
})
vim.api.nvim_command("colorscheme catppuccin")
end,
}

View File

@ -1,44 +0,0 @@
return {
"mhartington/formatter.nvim",
config = function()
-- Utilities for creating configurations
local util = require("formatter.util")
-- Provides the Format, FormatWrite, FormatLock, and FormatWriteLock commands
require("formatter").setup({
-- Enable or disable logging
logging = true,
-- Set the log level
log_level = vim.log.levels.WARN,
-- All formatter configurations are opt-in
filetype = {
-- xml = {
-- function()
-- return {
-- exe = "tidy",
-- args = {
-- "-quiet",
-- "-xml",
-- "--indent auto",
-- "--indent-spaces 2",
-- "--verical-space yes",
-- "--tidy-mark no",
-- },
-- stdin = true,
-- try_node_modules = true,
-- }
-- end,
-- },
--
-- Use the special "*" filetype for defining formatter configurations on
-- any filetype
},
})
vim.cmd([[
augroup FormatAutogroup
autocmd!
autocmd BufWritePost * FormatWrite
augroup END
]])
end,
}

View File

@ -44,15 +44,30 @@ return {
{
name = "relatedfiles",
dir = "/usr/share/vim/google/relatedfiles",
dependencies = { "maktaba", "glaive" },
dependencies = { "glaive" },
config = function()
vim.cmd([[ Glaive relatedfiles plugin[mappings] ]])
vim.cmd([[Glaive relatedfiles]])
end,
keys = {
{
"<leader>rb",
":exec relatedfiles#selector#JumpToBuild()<CR>",
},
{
"<leader>rt",
":exec relatedfiles#selector#JumpToTestFile()<CR>",
},
{
"<leader>rc",
":exec relatedfiles#selector#JumpToCodeFile()<CR>",
},
},
},
{
name = "codefmt",
dir = "/usr/share/vim/google/codefmt",
dependencies = { "maktaba", "glaive" },
dependencies = { "glaive" },
config = function()
vim.cmd(
[[Glaive codefmt ktfmt_executable=`["/google/bin/releases/kotlin-google-eng/ktfmt/ktfmt_deploy.jar", "--google-style"]`]]
@ -62,7 +77,7 @@ return {
{
name = "imp-google",
dir = "/usr/share/vim/google/imp-google",
dependencies = { "maktaba", "vim-imp", "glaive" },
dependencies = { "vim-imp", "glaive" },
config = function()
require("config.imp-google")
end,

View File

@ -44,6 +44,7 @@ return {
configs.ast_grep = {
default_config = {
cmd = { "sg", "lsp" },
offset_encoding = "utf-8",
filetypes = {
"c",
"cpp",
@ -70,6 +71,7 @@ return {
"--tooltag=nvim-cmp",
"--forward_sync_responses",
},
offset_encoding = "utf-8",
filetypes = {
"c",
"cpp",
@ -98,6 +100,7 @@ return {
"--lint_on_save=false",
"--max_qps=10",
},
offset_encoding = "utf-8",
filetypes = {
"c",
"cpp",

View File

@ -14,6 +14,7 @@ return {
-- buildifier is a tool for formatting and linting bazel BUILD, WORKSPACE, and .bzl files.
null_ls.builtins.diagnostics.buildifier,
null_ls.builtins.formatting.buildifier,
-- Codespell finds common misspellings in text files.
null_ls.builtins.diagnostics.codespell,
@ -26,9 +27,33 @@ return {
null_ls.builtins.formatting.google_java_format,
-- XML
null_ls.builtins.diagnostics.tidy,
-- null_ls.builtins.formatting.xmlformat
-- null_ls.builtins.diagnostics.tidy,
-- null_ls.builtins.formatting.xmlformat,
-- null_ls.builtins.formatting.xq,
-- null_ls.builtins.formatting.xmllint.with({ extra_args = { "--pretty", "2" } }),
null_ls.builtins.formatting.tidy.with({
filetypes = { "xml" },
args = {
"-xml",
"-quiet",
"-wrap",
"--tidy-mark",
"no",
"--indent",
"yes",
"--indent-spaces",
"2",
"--indent-attributes",
"yes",
"--sort-attributes",
"alpha",
"--wrap-attributes",
"yes",
"--vertical-space",
"yes",
"-",
},
}),
null_ls.builtins.formatting.stylua,
}
@ -48,8 +73,25 @@ return {
})
end
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
null_ls.setup({
on_init = function(new_client, _)
new_client.offset_encoding = "utf-8"
end,
sources = sources,
-- you can reuse a shared lspconfig on_attach callback here
on_attach = function(client, bufnr)
if client.supports_method("textDocument/formatting") then
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
vim.api.nvim_create_autocmd("BufWritePre", {
group = augroup,
buffer = bufnr,
callback = function()
vim.lsp.buf.format({ async = false })
end,
})
end
end,
})
end,
}