Ver código fonte

nixpkgs/neovim: use tsgo as compiler if present

Thomas Dy 1 mês atrás
pai
commit
e548d3fab3

+ 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"