From e89b00c7be35fdb64200b0a8c8530ffadb849c72 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 5 Dec 2023 22:29:48 +0100 Subject: 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. --- after/compiler/typescript.vim | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 after/compiler/typescript.vim (limited to 'after/compiler/typescript.vim') 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, ' ') + \ . '\ $*' -- cgit v1.2.3