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:
Christian Clason
2022-09-04 17:58:33 +02:00
parent 64cc78c9f3
commit 97f38f0a9b
3 changed files with 1 additions and 6 deletions

View File

@@ -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()

View File

@@ -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",

View File

@@ -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)