aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuntasir Mahmud <muntasir.joypurhat@gmail.com>2025-03-12 14:00:00 +0600
committerGitHub <noreply@github.com>2025-03-12 08:00:00 +0000
commit02ed5dc088e3d90f35c396586c60a963d56ec870 (patch)
tree8dd2c1fb2a8260fcf0af75706ed82927b6cd4ac7
parenta94a2927d00a80e5e00a4f358db581c7d2a7e525 (diff)
downloadrneovim-02ed5dc088e3d90f35c396586c60a963d56ec870.tar.gz
rneovim-02ed5dc088e3d90f35c396586c60a963d56ec870.tar.bz2
rneovim-02ed5dc088e3d90f35c396586c60a963d56ec870.zip
vim-patch:2347330: runtime(compiler): allow customizing exe and args for tsc (#32853)
closes: vim/vim#16853 https://github.com/vim/vim/commit/23473303b78d598a0f3c2f9370e011045093d3bd Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
-rw-r--r--runtime/compiler/tsc.vim5
-rw-r--r--runtime/doc/quickfix.txt7
2 files changed, 10 insertions, 2 deletions
diff --git a/runtime/compiler/tsc.vim b/runtime/compiler/tsc.vim
index 76f525baa6..9922cd7dfa 100644
--- a/runtime/compiler/tsc.vim
+++ b/runtime/compiler/tsc.vim
@@ -2,6 +2,7 @@
" Compiler: TypeScript Compiler
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2024 Apr 03
+" 2025 Mar 11 by The Vim Project (add comment for Dispatch, add tsc_makeprg variable)
if exists("current_compiler")
finish
@@ -11,9 +12,9 @@ let current_compiler = "tsc"
let s:cpo_save = &cpo
set cpo&vim
+" CompilerSet makeprg=tsc
" CompilerSet makeprg=npx\ tsc
-
-CompilerSet makeprg=tsc
+execute $'CompilerSet makeprg={escape(get(b:, 'tsc_makeprg', get(g:, 'tsc_makeprg', 'tsc')), ' \|"')}'
CompilerSet errorformat=%f\ %#(%l\\,%c):\ %trror\ TS%n:\ %m,
\%trror\ TS%n:\ %m,
\%-G%.%#
diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt
index 7aeb494437..c2a8c15b10 100644
--- a/runtime/doc/quickfix.txt
+++ b/runtime/doc/quickfix.txt
@@ -1681,6 +1681,13 @@ shells and OSes and also does not allow to use other available TeX options,
if any. If your TeX doesn't support "-interaction=nonstopmode", please
report it with different means to express \nonstopmode from the command line.
+TSC COMPILER *compiler-tsc*
+
+The executable and compiler options can be added to 'makeprg' by setting the
+b/g:tsc_makeprg variable. For example: >
+
+ let b:tsc_makeprg = "npx tsc --noEmit"
+
TYPST COMPILER *compiler-typst*
Vim includes a compiler plugin for Typst files. This compiler is enabled