Documentation
¶
Overview ¶
Copyright 2026 Teradata
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Package diffview provides diff viewing components (stub).
Index ¶
- type DiffView
- type LineStyle
- type Model
- func (m *Model) After(path string, content ...string) *Model
- func (m *Model) Before(path string, content ...string) *Model
- func (m *Model) ChromaStyle(style *chroma.Style) *Model
- func (m *Model) GetHeight() int
- func (m *Model) GetWidth() int
- func (m *Model) Height(h int) *Model
- func (m *Model) Init() tea.Cmd
- func (m *Model) SetContent(old, new string)
- func (m *Model) SetSize(width, height int)
- func (m *Model) SetStyles(s Styles)
- func (m *Model) Split() *Model
- func (m *Model) String() string
- func (m *Model) Style(s Styles) *Model
- func (m *Model) TabWidth(width int) *Model
- func (m *Model) Unified() *Model
- func (m *Model) Update(msg tea.Msg) (*Model, tea.Cmd)
- func (m *Model) View() string
- func (m *Model) Width(w int) *Model
- func (m *Model) XOffset(x int) *Model
- func (m *Model) YOffset(y int) *Model
- type Style
- type Styles
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiffView ¶
type DiffView = Model
DiffView is an alias for Model (for compatibility with usage patterns).
type LineStyle ¶
type LineStyle struct {
Line lipgloss.Style
Number lipgloss.Style
LineNumber lipgloss.Style
Gutter lipgloss.Style
GutterSet string
Code lipgloss.Style
Symbol lipgloss.Style
}
LineStyle configures a diff line style.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is a diff viewer component.
func (*Model) ChromaStyle ¶
ChromaStyle sets the chroma style and returns self for chaining.
func (*Model) SetContent ¶
SetContent sets the diff content.
type Styles ¶
type Styles struct {
Added lipgloss.Style
Removed lipgloss.Style
Changed lipgloss.Style
Unchanged lipgloss.Style
LineNumber lipgloss.Style
Header lipgloss.Style
DividerLine LineStyle
MissingLine LineStyle
EqualLine LineStyle
InsertLine LineStyle
DeleteLine LineStyle
}
Styles configures diff viewer appearance.