69 lines
2.6 KiB
Text
69 lines
2.6 KiB
Text
*fugitive-ts.nvim.txt* Treesitter highlighting for vim-fugitive diffs
|
|
|
|
Author: Barrett Ruth <br.barrettruth@gmail.com>
|
|
License: MIT
|
|
|
|
==============================================================================
|
|
INTRODUCTION *fugitive-ts.nvim*
|
|
|
|
fugitive-ts.nvim adds treesitter-based syntax highlighting to vim-fugitive
|
|
diff views. It overlays language-aware highlights on top of fugitive's
|
|
default regex-based diff highlighting.
|
|
|
|
==============================================================================
|
|
REQUIREMENTS *fugitive-ts-requirements*
|
|
|
|
- Neovim 0.9.0+
|
|
- vim-fugitive
|
|
- Treesitter parsers for languages you want highlighted
|
|
|
|
==============================================================================
|
|
SETUP *fugitive-ts-setup*
|
|
|
|
>lua
|
|
require('fugitive-ts').setup({
|
|
-- Enable/disable highlighting (default: true)
|
|
enabled = true,
|
|
|
|
-- Custom filename -> language mappings (optional)
|
|
languages = {},
|
|
|
|
-- Debounce delay in ms (default: 50)
|
|
debounce_ms = 50,
|
|
})
|
|
<
|
|
|
|
==============================================================================
|
|
COMMANDS *fugitive-ts-commands*
|
|
|
|
This plugin works automatically when you open a fugitive buffer. No commands
|
|
are required.
|
|
|
|
==============================================================================
|
|
API *fugitive-ts-api*
|
|
|
|
*fugitive-ts.setup()*
|
|
setup({opts})
|
|
Configure the plugin. See |fugitive-ts-setup| for options.
|
|
|
|
*fugitive-ts.attach()*
|
|
attach({bufnr})
|
|
Manually attach highlighting to a buffer. Called automatically for
|
|
fugitive buffers.
|
|
|
|
*fugitive-ts.refresh()*
|
|
refresh({bufnr})
|
|
Manually refresh highlighting for a buffer.
|
|
|
|
==============================================================================
|
|
ROADMAP *fugitive-ts-roadmap*
|
|
|
|
Planned features and improvements:
|
|
|
|
- Vim syntax fallback: For languages without treesitter parsers, fall back
|
|
to vim's built-in syntax highlighting via scratch buffers. This would
|
|
provide highlighting coverage for more languages at the cost of
|
|
implementation complexity.
|
|
|
|
==============================================================================
|
|
vim:tw=78:ts=8:ft=help:norl:
|