mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
Use mini.surround instead of surround.nvim
This commit is contained in:
parent
b90cd94a1f
commit
f895285651
1 changed files with 15 additions and 20 deletions
|
|
@ -35,17 +35,9 @@ return {
|
||||||
-- Enable rainbow parenthesis
|
-- Enable rainbow parenthesis
|
||||||
{ "HiPhish/rainbow-delimiters.nvim" },
|
{ "HiPhish/rainbow-delimiters.nvim" },
|
||||||
|
|
||||||
{
|
|
||||||
"kylechui/nvim-surround",
|
|
||||||
version = "*",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function()
|
|
||||||
require("nvim-surround").setup()
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Add s-exp mappings
|
-- Add s-exp mappings
|
||||||
{ "PaterJason/nvim-treesitter-sexp" },
|
{ "PaterJason/nvim-treesitter-sexp" },
|
||||||
|
{ "echasnovski/mini.surround" },
|
||||||
|
|
||||||
-- Colorize the output of the log buffer
|
-- Colorize the output of the log buffer
|
||||||
{
|
{
|
||||||
|
|
@ -75,16 +67,6 @@ return {
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd({ "BufWinEnter" }, {
|
|
||||||
pattern = "conjure-log-*",
|
|
||||||
group = augroup,
|
|
||||||
callback = function()
|
|
||||||
local buffer = vim.api.nvim_get_current_buf()
|
|
||||||
vim.diagnostic.disable(buffer)
|
|
||||||
vim.g.conjure_baleia.automatically(buffer)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_user_command("BaleiaColorize", function()
|
vim.api.nvim_create_user_command("BaleiaColorize", function()
|
||||||
vim.g.conjure_baleia.once(vim.api.nvim_get_current_buf())
|
vim.g.conjure_baleia.once(vim.api.nvim_get_current_buf())
|
||||||
end, { bang = true })
|
end, { bang = true })
|
||||||
|
|
@ -104,7 +86,20 @@ return {
|
||||||
init = function()
|
init = function()
|
||||||
-- print color codes if baleia.nvim is available
|
-- print color codes if baleia.nvim is available
|
||||||
local colorize = require("lazyvim.util").has("baleia.nvim")
|
local colorize = require("lazyvim.util").has("baleia.nvim")
|
||||||
vim.g["conjure#log#strip_ansi_escape_sequences_line_limit"] = colorize and 1 or 0
|
vim.g["conjure#log#strip_ansi_escape_sequences_line_limit"] = colorize and 1 or nil
|
||||||
|
|
||||||
|
-- disable diagnostics in log buffer and colorize it
|
||||||
|
vim.api.nvim_create_autocmd({ "BufWinEnter" }, {
|
||||||
|
pattern = "conjure-log-*",
|
||||||
|
callback = function()
|
||||||
|
local buffer = vim.api.nvim_get_current_buf()
|
||||||
|
vim.diagnostic.disable(buffer)
|
||||||
|
|
||||||
|
if colorize and vim.g.conjure_baleia then
|
||||||
|
vim.g.conjure_baleia.automatically(buffer)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
-- prefer LSP for jump-to-definition and symbol-doc, and use conjure
|
-- prefer LSP for jump-to-definition and symbol-doc, and use conjure
|
||||||
-- alternatives with <localleader>K and <localleader>gd
|
-- alternatives with <localleader>K and <localleader>gd
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue