# Set up Sublime Text 3 for Julia

**URL:** <https://discourse.julialang.org/t/set-up-sublime-text-3-for-julia/11702>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [June 15, 2018, 3:46pm UTC](https://discourse.julialang.org/t/set-up-sublime-text-3-for-julia/11702 "2018-06-15T15:46:37Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yifan\_Liu](https://avatars.discourse-cdn.com/v4/letter/y/4da419/32.png) [@Yifan\_Liu](https://discourse.julialang.org/u/Yifan_Liu)\
**Post date:** [June 15, 2018, 3:46pm UTC](https://discourse.julialang.org/t/set-up-sublime-text-3-for-julia/11702/1 "2018-06-15T15:46:37Z")

</div>

I want to set up Sublime Text 3 for Julia, but could not find a detailed instruction. I followed this guidance:

[https://github.com/JuliaEditorSupport/Julia-sublime](https://github.com/JuliaEditorSupport/Julia-sublime)

but I am not sure how to link Julia to it.

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [June 15, 2018, 6:08pm UTC](https://discourse.julialang.org/t/set-up-sublime-text-3-for-julia/11702/2 "2018-06-15T18:08:21Z")

</div>

Pretty sure you don’t – that plugin only provides

> - Syntax highlighting
> - Unicode tab completion (like the REPL)
> - Auto-indentation
> - Snippets

so there’s no need for a connection to a local julia installation or anything like that. That also means you’re going to miss out on the integration that VSCode/Juno/the-LSP-enabled-editor-of-your-choice provides though.

---

<div class="post-metadata">

**Author:** ![Yifan\_Liu](https://avatars.discourse-cdn.com/v4/letter/y/4da419/32.png) [@Yifan\_Liu](https://discourse.julialang.org/u/Yifan_Liu)\
**Post date:** [June 15, 2018, 7:44pm UTC](https://discourse.julialang.org/t/set-up-sublime-text-3-for-julia/11702/3 "2018-06-15T19:44:55Z")

</div>

I saw it under the Editor support, so how can I use Julia in sublime next

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [June 16, 2018, 11:03am UTC](https://discourse.julialang.org/t/set-up-sublime-text-3-for-julia/11702/4 "2018-06-16T11:03:41Z")

</div>

You can’t use Julia _in_ Sublime Text, but you can write your code in ST3 and `include` it (or use Revise.jl) in a separate REPL session.

---

<div class="post-metadata">

**Author:** ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)\
**Post date:** [June 16, 2018, 11:30am UTC](https://discourse.julialang.org/t/set-up-sublime-text-3-for-julia/11702/5 "2018-06-16T11:30:18Z")

</div>

There used to be a way to run a Julia REPL (Edit: I think it may have been an IJulia terminal, actually) inside Sublime, but that was a long time ago, I don’t know if that works now.

You can run a terminal next to the editor and use [https://github.com/randy3k/SendCode](https://github.com/randy3k/SendCode) to send the code to the REPL. In my experience, it works quite well, but that is the workflow I abandoned in favour of VS Code and Juno, without any regrets. The ST workflow is limited in comparison.

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [June 16, 2018, 2:31pm UTC](https://discourse.julialang.org/t/set-up-sublime-text-3-for-julia/11702/6 "2018-06-16T14:31:23Z")

</div>

I think some very brave folks might have gotten (or at least tried) LanguageServer.jl hooked up with Sublime, which would give you some more integration. But I’m not sure whether it actually worked in the end.

---

<div class="post-metadata">

**Author:** ![Seif\_Shebl](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@Seif\_Shebl](https://discourse.julialang.org/u/Seif_Shebl)\
**Post date:** [June 16, 2018, 4:57pm UTC](https://discourse.julialang.org/t/set-up-sublime-text-3-for-julia/11702/7 "2018-06-16T16:57:54Z")

</div>

Yes, you can, I use it all the time. The instructions on how to install `Sublime-Ijulia` plugin for Sublime text are found on the page at Github: [https://github.com/quinnj/Sublime-IJulia](https://github.com/quinnj/Sublime-IJulia).

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [June 17, 2018, 8:46am UTC](https://discourse.julialang.org/t/set-up-sublime-text-3-for-julia/11702/8 "2018-06-17T08:46:32Z")

</div>

Right, completly forgot about that plugin. Sorry for spreading misinformation 🙂

---

<div class="post-metadata">

**Author:** ![randy3k](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/randy3k/32/878_2.png) [@randy3k](https://discourse.julialang.org/u/randy3k)\
**Post date:** [June 17, 2018, 11:18pm UTC](https://discourse.julialang.org/t/set-up-sublime-text-3-for-julia/11702/9 "2018-06-17T23:18:02Z")

</div>

Sublime Text users could use run LanguageServer.jl vis [https://github.com/randy3k/LSP-julia](https://github.com/randy3k/LSP-julia) and [LSP](https://github.com/tomv564/LSP).

I should have put it in the README of JuliaEditorSupport/Julia-sublime

---

<div class="post-metadata">

**Author:** ![randy3k](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/randy3k/32/878_2.png) [@randy3k](https://discourse.julialang.org/u/randy3k)\
**Post date:** [June 17, 2018, 11:19pm UTC](https://discourse.julialang.org/t/set-up-sublime-text-3-for-julia/11702/10 "2018-06-17T23:19:08Z")

</div>

You might want to checkout [https://github.com/ngr-t/SublimeHermes](https://github.com/ngr-t/SublimeHermes) for jupyter support (especially the `use_jupyter_client` branch)

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [November 3, 2018, 2:12am UTC](https://discourse.julialang.org/t/set-up-sublime-text-3-for-julia/11702/11 "2018-11-03T02:12:42Z")

</div>

The terminal can be run inside ST3 (I like Terminus). The package SendCode is capable of sending Julia lines, selections, etc. to the terminal running within the editor. It works very smoothly.

---

<div class="post-metadata">

**Author:** ![musm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/musm/32/3675_2.png) [@musm](https://discourse.julialang.org/u/musm)\
**Post date:** [November 3, 2018, 3:31am UTC](https://discourse.julialang.org/t/set-up-sublime-text-3-for-julia/11702/12 "2018-11-03T03:31:11Z")

</div>

Is it possible to upload this package to package control or to the official LSP package?

---

<div class="post-metadata">

**Author:** ![Paul\_Soderlind](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paul_soderlind/32/1753_2.png) [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)\
**Post date:** [November 4, 2018, 2:41pm UTC](https://discourse.julialang.org/t/set-up-sublime-text-3-for-julia/11702/13 "2018-11-04T14:41:37Z")

</div>

Here is my favourite for the Terminus Command Palette. If there is an open (.jl) file, the this opens up Julia (in the same folder) on the right side of the screen:

```julia
[
 	{
         "caption": "Terminus: Open Julia",
         "command": "terminus_open",
         "args" : {
             "cmd": ["d:/Julia/julia10.cmd"],
             "cwd": "${file_path:${folder}}",
             "title": "Julia 1.0",
				      "pre_window_hooks": [
               ["set_layout", {
                   "cols": [0.0, 0.6, 1.0],
                   "rows": [0.0, 1.0],
                   "cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
               }],
               ["focus_group", {"group": 1}]
            ]           

         }
     },	
]

```

The Julia10.cmd file contains just `D:\Julia\Julia-1.0.1\bin\julia.exe` (maybe I could bypass that).

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [November 4, 2018, 4:01pm UTC](https://discourse.julialang.org/t/set-up-sublime-text-3-for-julia/11702/14 "2018-11-04T16:01:34Z")

</div>

This works beautifully. I have simplified this a tiny bit by `"cmd": ["julia"],` as I make sure the Julia executable is in the path.

By the way, is the correct procedure for installing this command to put it in the In `Default.sublime-settings` in the Terminus package?

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [November 4, 2018, 4:10pm UTC](https://discourse.julialang.org/t/set-up-sublime-text-3-for-julia/11702/15 "2018-11-04T16:10:04Z")

</div>

By the way, kudos and many thanks to Randy Lai (@randy3k) for the packages [SendCode](https://github.com/randy3k/SendCode) and [Terminus](https://github.com/randy3k/Terminus). Beautifully done and eminently useful for Sublime Text 3!

---

<div class="post-metadata">

**Author:** ![musm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/musm/32/3675_2.png) [@musm](https://discourse.julialang.org/u/musm)\
**Post date:** [November 4, 2018, 4:12pm UTC](https://discourse.julialang.org/t/set-up-sublime-text-3-for-julia/11702/16 "2018-11-04T16:12:47Z")

</div>

Indeed, now I am interested in LanguageServer integration for even better Julia experience. Does LanguageServer properly work with julia 1.0 yet?

---

<div class="post-metadata">

**Author:** ![Paul\_Soderlind](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paul_soderlind/32/1753_2.png) [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)\
**Post date:** [November 4, 2018, 5:14pm UTC](https://discourse.julialang.org/t/set-up-sublime-text-3-for-julia/11702/17 "2018-11-04T17:14:23Z")

</div>

> is the correct procedure for installing this command to put it in the In `Default.sublime-settings` in the Terminus package?

Not sure. I just did Ctrl+Shift+P and then `Preferences: Terminus Command Palette`

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [November 4, 2018, 5:29pm UTC](https://discourse.julialang.org/t/set-up-sublime-text-3-for-julia/11702/18 "2018-11-04T17:29:55Z")

</div>

Right, that makes sense. Thanks.

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [November 5, 2018, 5:31pm UTC](https://discourse.julialang.org/t/set-up-sublime-text-3-for-julia/11702/19 "2018-11-05T17:31:59Z")

</div>

Randy,

Doesn’t this require LanguageServer.jl? I believe it only works for Julia version 0.6 (@davidanthoff)…?

By the way, it isn’t quite clear to me how [https://github.com/randy3k/LSP-julia](https://github.com/randy3k/LSP-julia) interacts with the package LSP and the actual language server. If I read your python plug-in correctly, you start LanguageServer in Julia. Did this work with Julia 0.6?

To configure LSP I did

```julia
{
	"clients": {
		"julials":
		{
		  "command": ["julials"],
		  "scopes": ["source.julia"],
		  "syntaxes": ["Packages/User/Julia-sublime/Julia.sublime-syntax"],
		  "languageId": "julia"
		},
	},
	"log_debug": true,
}

```

Does that look about right?

The weird thing is `Julia.sublime-syntax` was not installed through Package Control when Julia syntax-highlighting was installed as a package. I had to find it and copy it manually into the User settings folder.

---

<div class="post-metadata">

**Author:** ![Zhong\_Pan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zhong_pan/32/19872_2.png) [@Zhong\_Pan](https://discourse.julialang.org/u/Zhong_Pan)\
**Post date:** [January 7, 2020, 5:41am UTC](https://discourse.julialang.org/t/set-up-sublime-text-3-for-julia/11702/20 "2020-01-07T05:41:18Z")

</div>

This thread is old so I’m not sure if anybody still needs this info, but it’s new to me. 🙂 I got Sublime Text 3 LSP working with Julia today by simply following the instructions on this page: [Sublime Text Language Server Protocol Documentation - Julia](https://lsp.readthedocs.io/en/latest/#julia)

Key versions:

- Julia 1.3.1
- LanguageServer.jl v1.0.0
- SymbolServer.jl v1.0.1
- Windows 10 64-bit

There is no need to install package LSP-julia.

These features seem to work:

- Mouse hovering to show doc string / variable definition.
- Right click a symbol (e.g. function name), choose LSP to “Find Symbol References”, or “Go to Symbol Definition”, or “Format Document”

For unknown reason, “Rename Symbol” does not seem to work for me.

One puzzle I spent hours to figure out: LSP for Julia started working on one of my PCs but not on another, with everything at exactly the same version, and Sublime Text 3 being an exact clone of each other (I use the portable version). On the PC that’s not working, I could see the Julia process running the language server in the background, but Sublime Text 3 never showed “julials initialized” message.

It turned out to be the firewall blocking port 8080, which is the default port used by the language server! Once I opened TCP port 8080 on my Windows Firewall julials started working.

Luckily I don’t use port 8080 for anything else, otherwise I would have to set up a different port for the language server, which can easily be done on Sublime Text 3 side (just search “tcp\_port” in the [Sublime Text Language Server Protocol Documentation](https://lsp.readthedocs.io/en/latest/)), but I have no idea how for [LanguageServer.jl](https://github.com/julia-vscode/LanguageServer.jl)

[Next page](https://discourse.julialang.org/t/set-up-sublime-text-3-for-julia/11702.md?page=2)
