highlight

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Highlighter

type Highlighter struct {
	// contains filtered or unexported fields
}

Highlighter provides syntax highlighting for code.

func New

func New() *Highlighter

New creates a new syntax highlighter.

func (*Highlighter) HighlightLine

func (h *Highlighter) HighlightLine(filePath, line string) string

HighlightLine applies syntax highlighting to a single line of code filePath is used to detect the language Returns the highlighted line with lipgloss styling.

func (*Highlighter) IsEnabled

func (h *Highlighter) IsEnabled(filePath string) bool

IsEnabled returns whether syntax highlighting is available for a file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL