Neovim plugin to conceal long class attributes.
Requires nvim-treesitter
- lazy.nvim:
{
'razak17/tailwind-fold.nvim',
opts= {},
dependencies = { 'nvim-treesitter/nvim-treesitter' },
ft = { 'html', 'svelte', 'astro', 'vue', 'typescriptreact', 'php', 'blade' },
},
{
enabled = true
-- min chars to fold.
min_chars = 0,
},
- Make sure to install treesitter parsers for enabled languages. For example:
:TSInstall html
- Make sure conceallevel is set to 2 in your config OR.
:set conceallevel=2
- Set concealcursor to an empty string to expand class when on cursorline:
:set concealcursor=
The plugin is activated automatically
:TailwindFoldDisable
, :TailwindFoldEnable
and :TailwindFoldToggle
are also available to change fold state.
All credit goes to the author of this gist, which makes this plugin possible
You can use it if you prefer not to install a plugin