diff --git a/README.md b/README.md index ef8904f..e1e4a1e 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ any language that provides a REPL (interactive interpreter)! Languages with built-in support: Python, JavaScript, CoffeeScript, Haskell, PureScript, Ruby, OCaml, R, -Clojure/ClojureScript, PHP, Lua, C++, Julia, Elm, Elixir +Clojure/ClojureScript, PHP, Lua, C++, Julia, Elm, Elixir, TypeScript [Pull requests](https://github.com/metakirby5/codi.vim/pulls) for new language support welcome! @@ -71,6 +71,7 @@ Default interpreter dependencies: - Julia: `julia` - Elm: `elm` - Elixir: `iex` + - TypeScript: `tsun` ## Usage diff --git a/autoload/codi/load.vim b/autoload/codi/load.vim index 04396f7..04ae480 100644 --- a/autoload/codi/load.vim +++ b/autoload/codi/load.vim @@ -126,6 +126,10 @@ let s:codi_default_interpreters = { \ 'bin': ['node', '-e', 'require("repl").start({ignoreUndefined: true, useGlobal: true})'], \ 'prompt': '^\(>\|\.\.\.\+\) ', \ }, + \ 'typescript': { + \ 'bin': ['tsun', '--ignore-undefined'], + \ 'prompt': '^\(>\|\.\.\.\+\) ', + \ }, \ 'coffee': { \ 'bin': 'coffee', \ 'prompt': '^coffee> ', diff --git a/doc/codi.txt b/doc/codi.txt index 125f274..8c18e49 100644 --- a/doc/codi.txt +++ b/doc/codi.txt @@ -421,6 +421,12 @@ ruby~ maintainer: @metakirby5 bin: irb +typescript~ +maintainer: @topaxi +bin: tsun +notes: + - Requires at least tsun 0.5.0 + Note that Codi is not meant to be a replacement for actually running your program; it supports nothing more than what the underlying bin supports. This is why Haskell language pragmas don't work, PureScript only works