소스 검색

nixpkgs/neovim: use tsgo as compiler if present

Thomas Dy 1 개월 전
부모
커밋
e548d3fab3
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      .config/nixpkgs/neovim/overrides/after/compiler/typescript.lua

+ 5 - 1
.config/nixpkgs/neovim/overrides/after/compiler/typescript.lua

@@ -1,2 +1,6 @@
-vim.bo.makeprg = "tsc --noEmit --incremental $*"
+if vim.fn.executable("tsgo") == 1 then
+  vim.bo.makeprg = "tsgo --noEmit --pretty false $*"
+else
+  vim.bo.makeprg = "tsc --noEmit --incremental $*"
+end
 vim.bo.errorformat = "%+A %#%f %#(%l\\,%c): %m,%C%m"