Module colorizer.tailwind

Handles Tailwind CSS color highlighting within buffers.

This module integrates with the Tailwind CSS Language Server Protocol (LSP) to retrieve and apply color highlights for Tailwind classes in a buffer. It manages LSP attachment, autocmds for color updates, and maintains state for efficient Tailwind highlighting.

Functions

cleanup (bufnr) Cleanup tailwind variables and autocmd
lsp_highlight (bufnr, ud_opts, buf_local_opts, add_highlight, on_detach, line_start, line_end) Highlight buffer using values returned by tailwindcss


Functions

cleanup (bufnr)
Cleanup tailwind variables and autocmd

Parameters:

  • bufnr number|nil: buffer number (0 for current)
lsp_highlight (bufnr, ud_opts, buf_local_opts, add_highlight, on_detach, line_start, line_end)
Highlight buffer using values returned by tailwindcss

Parameters:

  • bufnr number: Buffer number (0 for current)
  • ud_opts table: `user_default_options`
  • buf_local_opts table: Buffer local options
  • add_highlight function: Function to add highlights
  • on_detach function: Function to call when LSP is detached
  • line_start number: Start line
  • line_end number: End line

Returns:

    boolean|nil
generated by LDoc 1.5.0 Last updated - January