From 4015f6d09d69ff1960cda1f750f073c6858e61ee Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Fri, 9 Dec 2022 08:23:02 -0800 Subject: [PATCH] Helix 22.12 is released with support for D/serve-d. --- editor-helix.md | 49 +++++-------------------------------------------- 1 file changed, 5 insertions(+), 44 deletions(-) diff --git a/editor-helix.md b/editor-helix.md index b2529ea3..05777169 100644 --- a/editor-helix.md +++ b/editor-helix.md @@ -1,53 +1,14 @@ # Using serve-d with [Helix][1] --- -NOTE: Support for D is already in the master branch of Helix, so -if you build it from source, or install a release later than -22.08.1 (which as of this writing is the newest release available) +Support for D including serve-d is included in Helix as of release 22.12, so then you should be good to go, as long as serve-d is on your path.) -These instructiosn will become obsolete once the next release -of Helix is made. -At the moment configuration options are limited. - -## The Easy Way - -The easiest solution is just to build Helix from source and use it. -Please see the [directions][2] in the Helix repository for details. - -## The Hard Way - -It is recommended to pair this with Syntax support via the -[Tree-sitter plugin][3]. - -The following configuration can stanzas can be added to your -`languages.toml` file, following these [directions][4]. +This makes use of a [Tree-sitter grammar for D][2] so syntax highlighting and +related functionality is very fast, and of serve-d for other advanced capabilities. -```toml -[[grammar]] -name="d" -source={ git="https://github.com/gdamore/tree-sitter-d", rev="main" } - -[[language]] -name="d" -language-server = { command = "serve-d" } -scope="source.d" -file-types=["d", "di", "dd"] -roots=["dub.json", "dub.sdl"] -indent={tab-width = 4, unit=" "} -``` - -### Copying Queries - -Queries for highlighting, indentation, language injections, and -text objects are located in the [Helix repository][5]: - -Those files can be downloaded and placed in your Helix runtime folder -in `${HELIX_RUNTIME}/queries/d` +At the moment configuration options are limited. [1]: https://helix-editor.com "Helix Web Site" -[2]: https://github.com/helix-editor/helix#installation "Helix Installation" -[3]: https://github.com/gdamore/tree-sitter-d/ "Tree-sitter Grammar for D" -[4]: https://docs.helix-editor.com/guides/adding_languages.html "Adding Languages to Helix" -[5]: https://github.com/helix-editor/helix/tree/master/runtime/queries/d "D syntax queries for Helix" +[2]: https://github.com/gdamore/tree-sitter-d/ "Tree-sitter Grammar for D"