Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add typescript repl support #108

Merged
merged 2 commits into from
Mar 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down Expand Up @@ -71,6 +71,7 @@ Default interpreter dependencies:
- Julia: `julia`
- Elm: `elm`
- Elixir: `iex`
- TypeScript: `tsun`

## Usage

Expand Down
4 changes: 4 additions & 0 deletions autoload/codi/load.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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> ',
Expand Down
6 changes: 6 additions & 0 deletions doc/codi.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down