Skip to content

Neovim plugin to conceal long class attributes.

Notifications You must be signed in to change notification settings

Tim4c/tailwind-fold.nvim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 

Repository files navigation

Tailwind-fold.nvim

Neovim plugin to conceal long class attributes.

Requirements

Requires nvim-treesitter

Installation

  • lazy.nvim:
{
  'razak17/tailwind-fold.nvim',
  opts= {},
  dependencies = { 'nvim-treesitter/nvim-treesitter' },
  ft = { 'html', 'svelte', 'astro', 'vue', 'typescriptreact', 'php', 'blade' },
},

Showcase

2023-05-11_202341_699860995

Default Options

{
  enabled = true
  -- min chars to fold.
  min_chars = 0,
},

Configuration

  • 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=

Usage

The plugin is activated automatically

:TailwindFoldDisable, :TailwindFoldEnable and :TailwindFoldToggle are also available to change fold state.

Resources and Acknowledgements

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

About

Neovim plugin to conceal long class attributes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 100.0%