wuub / SublimeREPL

SublimeREPL - run an interpreter inside ST2 (Clojure, CoffeeScript, F#, Groovy, Haskell, Lua, MozRepl, NodeJS, Python, R, Ruby, Scala, shell or configure one yourself)
https://github.com/wuub/SublimeREPL
Other
2.14k stars 312 forks source link

Adding support for an additional language #597

Open ghylander opened 2 years ago

ghylander commented 2 years ago

Hi, I want to add to this plugin support for FORTRAN, so I can run terminal scripts directly from the sublime console It is stated that this is possible, but looking at the docs I don't understand how this is done

I already have a custom build system for FORTRAN, which may help setting up the REPL support

Can I get some indications?

deathaxe commented 10 months ago

Ignoring the overcomplicated structure, the only thing finally needed is a reference to repl_open with correct arguments.

The following example shows content of _Packages/User/Default.sublime-commands` to add a REPL for Gambit to Command Palette.

[
   {"command": "repl_open",
      "caption": "SublimeREPL: Gambit",
      "args": {
         "type": "subprocess",
         "encoding": "utf8",
         "external_id": "scheme",
         "cmd": {"linux": ["gosh", "-i"],
            "osx": ["gsi", "-i"],
         "windows": ["gosh", "-i"]},
         "soft_quit": "\n(exit)\n",
         "cwd": "$folder",
         "cmd_postfix": "\n",
         "extend_env": {"INSIDE_EMACS": "1"},
         "syntax": "Scheme.sublime-syntax"
      }
   },
]