aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/compiler/svelte-check.vim19
1 files changed, 19 insertions, 0 deletions
diff --git a/runtime/compiler/svelte-check.vim b/runtime/compiler/svelte-check.vim
new file mode 100644
index 0000000000..883aefdbc4
--- /dev/null
+++ b/runtime/compiler/svelte-check.vim
@@ -0,0 +1,19 @@
+" Vim compiler file
+" Compiler: svelte-check
+" Maintainer: @Konfekt
+" Last Change: 2025 Feb 22
+
+if exists("current_compiler") | finish | endif
+let current_compiler = "svelte-check"
+
+CompilerSet makeprg=npx\ svelte-check\ --output\ machine
+CompilerSet errorformat=%*\\d\ %t%*\\a\ \"%f\"\ %l:%c\ %m
+CompilerSet errorformat+=%-G%.%#
+
+" " Fall-back for versions of svelte-check that don't support --output machine
+" " before May 2020 https://github.com/sveltejs/language-tools/commit/9f7a90379d287a41621a5e78af5b010a8ab810c3
+" " which is before the first production release 1.1.31 of Svelte-Check
+" CompilerSet makeprg=npx\ svelte-check
+" CompilerSet errorformat=%E%f:%l:%c,
+" CompilerSet errorformat+=%+ZError\:\ %m,
+" CompilerSet errorformat+=%-G%.%#