-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Helix 22.12 is released with support for D/serve-d.
- Loading branch information
1 parent
4add2d7
commit 4abcafd
Showing
1 changed file
with
5 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
|