mirror of https://github.com/LazyVim/starter
Inline-fold
parent
02f782c8b0
commit
ba57d6ea45
|
@ -2,9 +2,9 @@
|
|||
-- Default autocmds that are always set: https://github.com/jul-o/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||
-- Add any additional autocmds here
|
||||
|
||||
-- vim.api.nvim_create_autocmd({ "BufWritePre" }, {
|
||||
-- group = vim.api.nvim_create_augroup("format_on_save", {}),
|
||||
-- callback = function()
|
||||
-- vim.lsp.buf.format()
|
||||
-- end,
|
||||
-- })
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
|
||||
pattern = { "*.html", "*.tsx", "*.jsx" },
|
||||
callback = function(_)
|
||||
vim.cmd("InlineFoldActivate")
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
local tsx = {
|
||||
{ pattern = 'className="([^"]*)"' }, -- classes in html
|
||||
}
|
||||
|
||||
local jsx = tsx
|
||||
|
||||
return {
|
||||
"malbertzard/inline-fold.nvim",
|
||||
opts = {
|
||||
defaultPlaceholder = "…",
|
||||
queries = {
|
||||
html = {
|
||||
{ pattern = 'class="([^"]*)"' }, -- classes in html
|
||||
{ pattern = 'className="([^"]*)"' }, -- classes in html
|
||||
{ pattern = 'href="(.-)"' }, -- hrefs in html
|
||||
{ pattern = 'src="(.-)"' }, -- HTML img src attribute
|
||||
},
|
||||
typescriptreact = tsx,
|
||||
javascriptreact = jsx,
|
||||
},
|
||||
},
|
||||
}
|
|
@ -2,7 +2,16 @@ return {
|
|||
"NvChad/nvim-colorizer.lua",
|
||||
config = function()
|
||||
require("colorizer").setup({
|
||||
user_default_options = {
|
||||
tailwind = true,
|
||||
RRGGBBAA = true, -- #RRGGBBAA hex codes
|
||||
AARRGGBB = true, -- 0xAARRGGBB hex codes
|
||||
rgb_fn = true, -- CSS rgb() and rgba() functions
|
||||
hsl_fn = true, -- CSS hsl() and hsla() functions
|
||||
css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
|
||||
css_fn = true,
|
||||
sass = { enable = true, parsers = { "css" } },
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue