aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2023-12-05 22:29:48 +0100
committerTeddy Wing2023-12-06 00:51:47 +0100
commite89b00c7be35fdb64200b0a8c8530ffadb849c72 (patch)
treec77f43d2c37962e5f974c7e568327a7e4a518432
parent3b866040ef1c09c9e5786ff1bd1f5b7993dad958 (diff)
downloaddotvim-e89b00c7be35fdb64200b0a8c8530ffadb849c72.tar.bz2
after/compiler/typescript.vim: Compile all files
The 'typescript.vim' plugin has the 'makeprg' compile only the current file, not all files. Copy its 'makeprg' command and modify it to compile all files in the project instead. This way I get compiler errors in quickfix for the whole project. This way makes more sense to me and works for code reviews.
-rw-r--r--after/compiler/typescript.vim7
1 files changed, 7 insertions, 0 deletions
diff --git a/after/compiler/typescript.vim b/after/compiler/typescript.vim
new file mode 100644
index 0000000..362fc30
--- /dev/null
+++ b/after/compiler/typescript.vim
@@ -0,0 +1,7 @@
+" Run tsc on all files. The typescript.vim plugin only operates on the current
+" file.
+execute 'CompilerSet makeprg='
+ \ . escape(g:typescript_compiler_binary, ' ')
+ \ . '\ '
+ \ . escape(g:typescript_compiler_options, ' ')
+ \ . '\ $*'