Fix relatedfiles
This commit is contained in:
@ -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")
|
@ -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()
|
||||
|
79
vim/.vim/lua/plugins/catppuccin.lua
Normal file
79
vim/.vim/lua/plugins/catppuccin.lua
Normal 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,
|
||||
}
|
@ -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,
|
||||
}
|
@ -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,
|
||||
|
@ -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",
|
||||
|
@ -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,
|
||||
}
|
||||
|
Reference in New Issue
Block a user