I tried adding this to my init.lua but it doesn’t work
vim.g["sandwich#recipes"] = vim.deepcopy(vim.g["sandwich#default_recipes"]) or {}
table.insert(vim.g["sandwich#recipes"], {
{
buns = { "<span style=\"/* custom style */\">", "</span>" },
input = { "x" },
},
})
These are the files:
vim.g.base46_cache = vim.fn.stdpath "data" .. "/nvchad/base46/"
vim.g.mapleader = " "
-- bootstrap lazy and all plugins
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
local repo = "https://github.com/folke/lazy.nvim.git"
vim.fn.system { "git", "clone", "--filter=blob:none", repo, "--branch=stable", lazypath }
end
vim.opt.rtp:prepend(lazypath)
local lazy_config = require "configs.lazy"
-- load plugins
require("lazy").setup({
{
"NvChad/NvChad",
lazy = false,
branch = "v2.5",
import = "nvchad.plugins",
config = function()
require "options"
end,
},
{ import = "plugins" },
}, lazy_config)
require("auto-session").setup {
auto_save_enabled = true,
auto_restore_enabled = true,
auto_session_enable_last_session = true,
pre_save_cmds = { 'Neotree close' },
post_restore_cmds = { 'wincmd t', 'Neotree buffers current'},
}
require("neo-tree").setup({
source_selector = {
winbar = false,
statusline = false
}
})
vim.g["sandwich#recipes"] = vim.deepcopy(vim.g["sandwich#default_recipes"]) or {}
table.insert(vim.g["sandwich#recipes"], {
{
buns = { "<span style=\"/* custom style */\">", "</span>" },
input = { "x" },
},
})
-- load theme
dofile(vim.g.base46_cache .. "defaults")
dofile(vim.g.base46_cache .. "statusline")
require "nvchad.autocmds"
vim.schedule(function()
require "mappings"
end)
Another:
return {
{
"stevearc/conform.nvim",
-- event = 'BufWritePre', -- uncomment for format on save
config = function()
require "configs.conform"
end,
},
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
lazy = false,
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
}
},
{
'rmagatti/auto-session',
lazy = false,
config = function()
require("auto-session").setup {
log_level = "error"
}
end
},
{
"Pocco81/auto-save.nvim",
lazy = false,
config = function()
require("auto-save").setup {
-- your config goes here
-- or just leave it empty :)
}
end
},
{
"vhyrro/luarocks.nvim",
priority = 1000, -- Very high priority is required, luarocks.nvim should run as the first plugin in your config.
config = true,
},
{
'machakann/vim-sandwich',
lazy = false,
config = function()
end
}