Skip to content

Commit

Permalink
docs: add inlay-hints doc
Browse files Browse the repository at this point in the history
  • Loading branch information
inclyc committed Apr 27, 2024
1 parent df9d7a7 commit e1f6f71
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions nixd/docs/features.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
## Features in nixd

### Inlay Hints

Inlay hints, in nixd, is used for give you package versions in your system configuration.
It will make a "floating" text right after the package name, with it's version.

Version strings are evaluated by `name.version` attrpath, it should be consistent with your configured `nixpkgs`. Read the [configuration docs](./configuration.md) if you don't know how to setup.

```
with pkgs; [
nix: 2.19.0
# ~~~~~~~~~~~~~~ <-- the version, floating.
]
```

Screenshots:

<img width="381" alt="inlay hints" src="https://github.com/nix-community/nixd/assets/36667224/c0928920-a5d6-4d13-aaa0-8f292e6c1b49">


> [!TIP]
> Use `--inlay-hints=false` to completely disable the feature.

### Semantic Tokens

Expand Down

0 comments on commit e1f6f71

Please sign in to comment.