Fix relatedfiles

This commit is contained in:
Christian Nieves
2023-07-19 10:50:32 -05:00
parent 315bbb3e65
commit d2301f54fc
8 changed files with 159 additions and 136 deletions

View File

@ -1,27 +1,28 @@
{
"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": "a84ee1848bfac4601771805396552bdbaa0a0e91" },
"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": "9bf2e7e294b00bac87c6123c889828ee08dc9b46" },
"friendly-snippets": { "branch": "main", "commit": "ea84a710262cb2c286d439070bad37d36fd3db25" },
"fzf": { "branch": "master", "commit": "3c09c77269d848f5e7dd8f350a90e8d7ed760845" },
"fzf.vim": { "branch": "master", "commit": "e0d131d95364edf940a70127fcb5748b86e6955e" },
@ -29,16 +30,18 @@
"gitsigns.nvim": { "branch": "main", "commit": "adcf2c7f2f495f5df148683764bf7cba6a70f34c" },
"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": "25beed5e2e935ebc00d7e3eed1dc502df3c40e39" },
"libp.nvim": { "branch": "main", "commit": "636b1748e92f66022c1763f32b2ded6b8606eda5" },
"lsp-lens.nvim": { "branch": "main", "commit": "13d25ad8bd55aa34cc0aa3082e78a4157c401346" },
"lsp-status.nvim": { "branch": "master", "commit": "54f48eb5017632d81d0fd40112065f1d062d0629" },
"lsp-zero.nvim": { "branch": "v2.x", "commit": "f306adde671281d77cebd635098cc8b8fc8368ee" },
"lsp-zero.nvim": { "branch": "v2.x", "commit": "3638944692d07497f4ae313ba7b68718969ccb27" },
"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": "828a538ac8419f586c010996aefa5df6eb7c250b" },
"mason.nvim": { "branch": "main", "commit": "5ad3e113b0c3fde3caba8630599373046f6197e8" },
@ -56,6 +59,7 @@
"nvim-surround": { "branch": "main", "commit": "211eaad7c6d01ef4ac02cba9052b3082ec232101" },
"nvim-treesitter": { "branch": "master", "commit": "9fa6806b88905d52b5ca36094909630919b432cc" },
"nvim-web-devicons": { "branch": "master", "commit": "efbfed0567ef4bfac3ce630524a0f6c8451c5534" },
"nvim_figtree": { "branch": "main", "commit": "9bc3025f46e34732382da1019e256a9d8bec1e55" },
"plenary.nvim": { "branch": "master", "commit": "267282a9ce242bbb0c5dc31445b6d353bed978bb" },
"refactoring.nvim": { "branch": "master", "commit": "7894b10078a1a70c9b26028f4373bf209968e9bc" },
"registers.nvim": { "branch": "main", "commit": "2ab8372bb837f05fae6b43091f10a0b725d113ca" },
@ -63,12 +67,16 @@
"telekasten.nvim": { "branch": "main", "commit": "4a5e57eee9c5154ed77423bb7fa6619fdb0784cd" },
"telescope-file-browser.nvim": { "branch": "master", "commit": "e03ff55962417b69c85ef41424079bb0580546ba" },
"telescope.nvim": { "branch": "master", "commit": "47c755d737702df7a39b640c8d9c473a728be1df" },
"telescope_citc": { "branch": "main", "commit": "d6421d5bfe058915ece0daec55e488f8ea05f207" },
"telescope_codesearch": { "branch": "main", "commit": "a26077ad3c68cf897ae1c31da903d6516ebb9c92" },
"telescope_fig": { "branch": "main", "commit": "90150e1aa368b49a5125689b3a6da573a99e2bda" },
"trouble.nvim": { "branch": "main", "commit": "20d1b30d6925213abece21d35858a16e11d1e9fc" },
"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

@ -93,15 +93,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

@ -60,6 +60,7 @@ return {
configs.ast_grep = {
default_config = {
cmd = { "sg", "lsp" },
offset_encoding = "utf-8",
filetypes = {
"c",
"cpp",
@ -86,6 +87,7 @@ return {
"--tooltag=nvim-cmp",
"--forward_sync_responses",
},
offset_encoding = "utf-8",
filetypes = {
"c",
"cpp",
@ -114,6 +116,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,
}