feat: enable vim syntax fallback by default
Problem: languages without a treesitter parser (COBOL, Fortran, etc.) got no syntax highlighting at all because `highlights.vim.enabled` defaulted to `false`. Solution: flip the default to `true`. The vim syntax path is already deferred via `vim.schedule` so it never blocks the first paint.
This commit is contained in:
parent
e1d3b81607
commit
9cbf4492fa
2 changed files with 8 additions and 6 deletions
|
|
@ -89,7 +89,7 @@ Configuration is done via `vim.g.diffs`. Set this before the plugin loads:
|
||||||
max_lines = 500,
|
max_lines = 500,
|
||||||
},
|
},
|
||||||
vim = {
|
vim = {
|
||||||
enabled = false,
|
enabled = true,
|
||||||
max_lines = 200,
|
max_lines = 200,
|
||||||
},
|
},
|
||||||
intra = {
|
intra = {
|
||||||
|
|
@ -204,7 +204,7 @@ Configuration is done via `vim.g.diffs`. Set this before the plugin loads:
|
||||||
See |diffs.TreesitterConfig| for fields.
|
See |diffs.TreesitterConfig| for fields.
|
||||||
|
|
||||||
{vim} (table, default: see below)
|
{vim} (table, default: see below)
|
||||||
Vim syntax highlighting options (experimental).
|
Vim syntax fallback highlighting options.
|
||||||
See |diffs.VimConfig| for fields.
|
See |diffs.VimConfig| for fields.
|
||||||
|
|
||||||
{intra} (table, default: see below)
|
{intra} (table, default: see below)
|
||||||
|
|
@ -269,13 +269,15 @@ Configuration is done via `vim.g.diffs`. Set this before the plugin loads:
|
||||||
|
|
||||||
*diffs.VimConfig*
|
*diffs.VimConfig*
|
||||||
Vim config fields: ~
|
Vim config fields: ~
|
||||||
{enabled} (boolean, default: false)
|
{enabled} (boolean, default: true)
|
||||||
Use vim syntax highlighting as fallback when no
|
Use vim syntax highlighting as fallback when no
|
||||||
treesitter parser is available for a language.
|
treesitter parser is available for a language.
|
||||||
Creates a scratch buffer, sets the filetype, and
|
Creates a scratch buffer, sets the filetype, and
|
||||||
queries |synID()| per character to extract
|
queries |synID()| per character to extract
|
||||||
highlight groups. Slower than treesitter but
|
highlight groups. Deferred via |vim.schedule()|
|
||||||
covers languages without a TS parser installed.
|
so it never blocks the first paint. Slower than
|
||||||
|
treesitter but covers languages without a TS
|
||||||
|
parser installed (e.g., COBOL, Fortran).
|
||||||
|
|
||||||
{max_lines} (integer, default: 200)
|
{max_lines} (integer, default: 200)
|
||||||
Skip vim syntax highlighting for hunks larger than
|
Skip vim syntax highlighting for hunks larger than
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ local default_config = {
|
||||||
max_lines = 500,
|
max_lines = 500,
|
||||||
},
|
},
|
||||||
vim = {
|
vim = {
|
||||||
enabled = false,
|
enabled = true,
|
||||||
max_lines = 200,
|
max_lines = 200,
|
||||||
},
|
},
|
||||||
intra = {
|
intra = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue