helix nix lsp

This commit is contained in:
dusk 2021-08-16 12:29:55 +03:00
parent c85309dd10
commit b15d657641
Signed by: dusk
GPG Key ID: 1D8F8FAF2294D6EA
3 changed files with 19 additions and 6 deletions

View File

@ -412,15 +412,15 @@
]
},
"locked": {
"lastModified": 1627598485,
"narHash": "sha256-jH60VPMHgByO9tjk6y9m3DJolpl6JFYXwvcervWRcaE=",
"owner": "kreisys",
"lastModified": 1626644818,
"narHash": "sha256-w0hpyFXxltmOpbBKNQ2tfKRWELQzStc/ho1EcNyYaWc=",
"owner": "nix-community",
"repo": "rnix-lsp",
"rev": "ea5d8bbf13eb1c7ebad2670d941e8a7d6594de5c",
"rev": "1fdd7cf9bf56b8ad2dddcfd27354dae8aef2b453",
"type": "github"
},
"original": {
"owner": "kreisys",
"owner": "nix-community",
"repo": "rnix-lsp",
"type": "github"
}

View File

@ -37,7 +37,7 @@
nixos-hardware.url = "github:nixos/nixos-hardware";
rnixLsp = {
url = "github:kreisys/rnix-lsp";
url = "github:nix-community/rnix-lsp";
inputs.naersk.follows = "naersk";
inputs.nixpkgs.follows = "nixpkgs";
inputs.utils.follows = "flake-utils";
@ -96,6 +96,7 @@
nixpkgsWayland.overlay
(_: prev: {
helix = helix.packages.${prev.system}.helix;
helix-src = helix;
rnix-lsp = rnixLsp.packages.${prev.system}.rnix-lsp;
})
./pkgs/default.nix

View File

@ -778,6 +778,18 @@ in
[lsp]
display-messages = true
'';
"helix/languages.toml".text = ''
${builtins.readFile "${pkgs.helix-src}/languages.toml"}
[[language]]
name = "nix"
scope = "source.nix"
injection-regex = "nix"
file-types = ["nix"]
roots = []
comment-token = "#"
language-server = { command = "${pkgBin "rnix-lsp"}" }
indent = { tab-width = 2, unit = " " }
'';
"waybar/config".text =
let swayEnabled = config.wayland.windowManager.sway.enable; in
builtins.toJSON {