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
|
-- Default autocmds that are always set: https://github.com/jul-o/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||||
-- Add any additional autocmds here
|
-- Add any additional autocmds here
|
||||||
|
|
||||||
-- vim.api.nvim_create_autocmd({ "BufWritePre" }, {
|
vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
|
||||||
-- group = vim.api.nvim_create_augroup("format_on_save", {}),
|
pattern = { "*.html", "*.tsx", "*.jsx" },
|
||||||
-- callback = function()
|
callback = function(_)
|
||||||
-- vim.lsp.buf.format()
|
vim.cmd("InlineFoldActivate")
|
||||||
-- end,
|
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",
|
"NvChad/nvim-colorizer.lua",
|
||||||
config = function()
|
config = function()
|
||||||
require("colorizer").setup({
|
require("colorizer").setup({
|
||||||
tailwind = true,
|
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,
|
end,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue