mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
fix(highlight): remove syncolor.vim
Remove syncolor.vim in favor of defining the default highlight groups directly in `init_highlight`. This approach provides a number of advantages: 1. The highlights are always defined, regardless of whether or not the syntax regex engine is enabled. 2. Redundant sourcing of syntax files is eliminated (syncolor.vim was often sourced multiple times based on how the user's colorscheme file was written). 3. The syntax highlighting regex engine and the highlight groups themselves are more fully decoupled. 4. Removal of the confusing `:syntax on` / `:syntax enable` dichotomy (they now both do the same thing). This approach also correctly solves a number of bugs related to highlighting (#15176, #12573, #15205).
This commit is contained in:
@@ -52,6 +52,32 @@ local predefined_hl_defs = {
|
||||
QuickFixLine=true,
|
||||
Substitute=true,
|
||||
Whitespace=true,
|
||||
Error=true,
|
||||
Todo=true,
|
||||
String=true,
|
||||
Character=true,
|
||||
Number=true,
|
||||
Boolean=true,
|
||||
Float=true,
|
||||
Function=true,
|
||||
Conditional=true,
|
||||
Repeat=true,
|
||||
Label=true,
|
||||
Operator=true,
|
||||
Keyword=true,
|
||||
Exception=true,
|
||||
Include=true,
|
||||
Define=true,
|
||||
Macro=true,
|
||||
PreCondit=true,
|
||||
StorageClass=true,
|
||||
Structure=true,
|
||||
Typedef=true,
|
||||
Tag=true,
|
||||
SpecialChar=true,
|
||||
Delimiter=true,
|
||||
SpecialComment=true,
|
||||
Debug=true,
|
||||
|
||||
-- From highlight_init_(dark|light)
|
||||
ColorColumn=true,
|
||||
@@ -83,8 +109,6 @@ local predefined_hl_defs = {
|
||||
Visual=true,
|
||||
WarningMsg=true,
|
||||
Normal=true,
|
||||
|
||||
-- From syncolor.vim, if &background
|
||||
Comment=true,
|
||||
Constant=true,
|
||||
Special=true,
|
||||
@@ -94,36 +118,6 @@ local predefined_hl_defs = {
|
||||
Type=true,
|
||||
Underlined=true,
|
||||
Ignore=true,
|
||||
|
||||
-- From syncolor.vim, below if &background
|
||||
Error=true,
|
||||
Todo=true,
|
||||
|
||||
-- From syncolor.vim, links at the bottom
|
||||
String=true,
|
||||
Character=true,
|
||||
Number=true,
|
||||
Boolean=true,
|
||||
Float=true,
|
||||
Function=true,
|
||||
Conditional=true,
|
||||
Repeat=true,
|
||||
Label=true,
|
||||
Operator=true,
|
||||
Keyword=true,
|
||||
Exception=true,
|
||||
Include=true,
|
||||
Define=true,
|
||||
Macro=true,
|
||||
PreCondit=true,
|
||||
StorageClass=true,
|
||||
Structure=true,
|
||||
Typedef=true,
|
||||
Tag=true,
|
||||
SpecialChar=true,
|
||||
Delimiter=true,
|
||||
SpecialComment=true,
|
||||
Debug=true,
|
||||
}
|
||||
|
||||
local nvim_hl_defs = {}
|
||||
|
Reference in New Issue
Block a user