Skip to content

demo for sublime text

bitbegin edited this page Apr 1, 2019 · 19 revisions

install lsp client and red-syntax package

clone lsp server:

  • git clone https://github.com/bitbegin/redlangserver.git

  • we will use server.red (as lsp server) to configure lsp client

configure lsp client like this:

  • Preferences -> Package Settings -> LSP -> Settings
{
	"clients":
	{
		"red":
		{
			"command":
			[
				"C:/ProgramData/Red/console-2019-xxx.exe",
				"D:/path/to/server.red",
				"debug-off"
			],
			"scopes": ["source.red"],
			"enabled": true,
			"languageId": "red"
		},
	},
	"complete_all_chars": true,
	"only_show_lsp_completions": true,
	"show_diagnostics_count_in_view_status": true,
	"show_diagnostics_phantoms": true
}

Notes: C:/ProgramData/Red/console-2019-xxx.exe can be produced by red-latest.exe --cli. You also should use lastest(daily) Red version

enable lsp

Maybe you still need:

  • Run LSP: Enable Language Server from the Command Palette to enable your server.
  • restart sublime-text

limits

  • don't support goto definition, but you can use this way to goto definition goto definition

Clone this wiki locally