mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 09:26:30 +00:00
fix(treesitter): do not link @error by default
The @error capture is used for tree-sitter's ERROR node, which indicates a parsing error -- which can be quite frequent (and jarring) while typing. Users can still manually `hi link @error Error` in their config.
This commit is contained in:
@@ -16,12 +16,7 @@ function(BuildTSParser LANG TS_URL TS_SHA256 TS_CMAKE_FILE)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmake/${TS_CMAKE_FILE}
|
||||
${DEPS_BUILD_DIR}/src/${NAME}/CMakeLists.txt
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||
-DCMAKE_GENERATOR=${CMAKE_GENERATOR}
|
||||
${BUILD_TYPE_STRING}
|
||||
-DCMAKE_INSTALL_PREFIX=${DEPS_INSTALL_DIR}
|
||||
# Pass toolchain
|
||||
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
|
||||
-DPARSERLANG=${LANG})
|
||||
endfunction()
|
||||
|
||||
|
@@ -186,7 +186,6 @@ static const char *highlight_init_both[] = {
|
||||
"default link DiagnosticSignInfo DiagnosticInfo",
|
||||
"default link DiagnosticSignHint DiagnosticHint",
|
||||
|
||||
"default link @error Error",
|
||||
"default link @text.underline Underlined",
|
||||
"default link @todo Todo",
|
||||
"default link @debug Debug",
|
||||
|
@@ -106,6 +106,7 @@ describe('treesitter highlighting', function()
|
||||
}
|
||||
|
||||
exec_lua([[ hl_query = ... ]], hl_query)
|
||||
command [[ hi link @error ErrorMsg ]]
|
||||
command [[ hi link @warning WarningMsg ]]
|
||||
end)
|
||||
|
||||
|
Reference in New Issue
Block a user