mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
lsp: add haskell language server
This commit is contained in:
parent
bc045bd50a
commit
36bc31ed5c
4 changed files with 109 additions and 14 deletions
|
@ -66,6 +66,12 @@ in
|
|||
|
||||
folding = mkEnableOption "Enable tree-sitter based folding";
|
||||
};
|
||||
|
||||
grammarPackages = mkOption {
|
||||
type = with types; listOf package;
|
||||
default = pkgs.tree-sitter.allGrammars;
|
||||
description = "Grammar packages to install";
|
||||
};
|
||||
};
|
||||
|
||||
config =
|
||||
|
@ -107,7 +113,7 @@ in
|
|||
'';
|
||||
|
||||
extraPlugins = with pkgs; if cfg.nixGrammars then
|
||||
[ (vimPlugins.nvim-treesitter.withPlugins (_: tree-sitter.allGrammars)) ]
|
||||
[ (vimPlugins.nvim-treesitter.withPlugins (_: cfg.grammarPackages)) ]
|
||||
else [ vimPlugins.nvim-treesitter ];
|
||||
extraPackages = [ pkgs.tree-sitter pkgs.nodejs ];
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ let
|
|||
name = "elixirls";
|
||||
description = "Enable elixirls";
|
||||
packages = [ ];
|
||||
cmd = ["${pkgs.elixir_ls}/bin/elixir-ls"];
|
||||
cmd = [ "${pkgs.elixir_ls}/bin/elixir-ls" ];
|
||||
}
|
||||
{
|
||||
name = "gdscript";
|
||||
|
@ -78,6 +78,11 @@ let
|
|||
name = "zls";
|
||||
description = "Enable zls, for Zig.";
|
||||
}
|
||||
{
|
||||
name = "hls";
|
||||
description = "Enable haskell language server";
|
||||
packages = [ pkgs.haskell-language-server ];
|
||||
}
|
||||
];
|
||||
in
|
||||
{
|
||||
|
|
88
tests/flake.lock
generated
88
tests/flake.lock
generated
|
@ -46,6 +46,25 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"build-ts": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1669771646,
|
||||
"narHash": "sha256-IfH9zCq0+QpAB8D1ClhISfWcR59mSDsi91/2NW0RWfs=",
|
||||
"owner": "pta2002",
|
||||
"repo": "build-ts-grammar.nix",
|
||||
"rev": "bba8a5b14a4632f25411dbf0fb01de69e999ce82",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "pta2002",
|
||||
"repo": "build-ts-grammar.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1667395993,
|
||||
|
@ -91,6 +110,37 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_4": {
|
||||
"locked": {
|
||||
"lastModified": 1667395993,
|
||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gleam": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1669665314,
|
||||
"narHash": "sha256-aeho84P91cH13j7uLJwyD/zj8O/peROrpfa41HA/FGo=",
|
||||
"owner": "gleam-lang",
|
||||
"repo": "tree-sitter-gleam",
|
||||
"rev": "97611918f79643ade377a156f3e4192cd50dc3e6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "gleam-lang",
|
||||
"repo": "tree-sitter-gleam",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1663491030,
|
||||
|
@ -135,28 +185,42 @@
|
|||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1663491030,
|
||||
"narHash": "sha256-MVsfBhE9US5DvLtBAaTRjwYdv1tLO8xjahM8qLXTgTo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "767542707d394ff15ac1981e903e005ba69528b5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixvim": {
|
||||
"inputs": {
|
||||
"beautysh": "beautysh",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"flake-utils": "flake-utils_3",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"nmdSrc": "nmdSrc"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 0,
|
||||
"narHash": "sha256-sjdU/aCTVFGSDxU+jxgaHtDsZQeFNb1nA55wRPgc3tU=",
|
||||
"path": "/nix/store/5wxj9v7dzrga7xvp4pr825ph20i1qb42-source",
|
||||
"narHash": "sha256-HWr75pPDcv+OM0BRyQUtIDPJ4W1V1iDzsEVXY6JQz6E=",
|
||||
"path": "/nix/store/hgr3qr1x8gndpdkaj8cx2xclmd7v20b9-source",
|
||||
"type": "path"
|
||||
},
|
||||
"original": {
|
||||
"path": "/nix/store/5wxj9v7dzrga7xvp4pr825ph20i1qb42-source",
|
||||
"path": "/nix/store/hgr3qr1x8gndpdkaj8cx2xclmd7v20b9-source",
|
||||
"type": "path"
|
||||
}
|
||||
},
|
||||
"nixvim-stable": {
|
||||
"inputs": {
|
||||
"beautysh": "beautysh_2",
|
||||
"flake-utils": "flake-utils_3",
|
||||
"flake-utils": "flake-utils_4",
|
||||
"nixpkgs": [
|
||||
"nixpkgs-stable"
|
||||
],
|
||||
|
@ -164,12 +228,12 @@
|
|||
},
|
||||
"locked": {
|
||||
"lastModified": 0,
|
||||
"narHash": "sha256-sjdU/aCTVFGSDxU+jxgaHtDsZQeFNb1nA55wRPgc3tU=",
|
||||
"path": "/nix/store/5wxj9v7dzrga7xvp4pr825ph20i1qb42-source",
|
||||
"narHash": "sha256-HWr75pPDcv+OM0BRyQUtIDPJ4W1V1iDzsEVXY6JQz6E=",
|
||||
"path": "/nix/store/hgr3qr1x8gndpdkaj8cx2xclmd7v20b9-source",
|
||||
"type": "path"
|
||||
},
|
||||
"original": {
|
||||
"path": "/nix/store/5wxj9v7dzrga7xvp4pr825ph20i1qb42-source",
|
||||
"path": "/nix/store/hgr3qr1x8gndpdkaj8cx2xclmd7v20b9-source",
|
||||
"type": "path"
|
||||
}
|
||||
},
|
||||
|
@ -261,8 +325,10 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"build-ts": "build-ts",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"gleam": "gleam",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs-stable": "nixpkgs-stable",
|
||||
"nixvim": "nixvim",
|
||||
"nixvim-stable": "nixvim-stable"
|
||||
|
|
|
@ -4,13 +4,17 @@
|
|||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
inputs.nixvim.url = "./..";
|
||||
|
||||
inputs.build-ts.url = "github:pta2002/build-ts-grammar.nix";
|
||||
inputs.gleam.url = "github:gleam-lang/tree-sitter-gleam";
|
||||
inputs.gleam.flake = false;
|
||||
|
||||
inputs.nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-22.05";
|
||||
inputs.nixvim-stable = {
|
||||
url = "./..";
|
||||
inputs.nixpkgs.follows = "nixpkgs-stable";
|
||||
};
|
||||
|
||||
outputs = { self, nixvim, nixvim-stable, nixpkgs, flake-utils, nixpkgs-stable, ... }:
|
||||
outputs = { self, nixvim, nixvim-stable, nixpkgs, flake-utils, nixpkgs-stable, build-ts, gleam, ... }:
|
||||
(flake-utils.lib.eachDefaultSystem
|
||||
(system:
|
||||
let
|
||||
|
@ -238,6 +242,20 @@
|
|||
Normal.fg = "#ff0000";
|
||||
};
|
||||
};
|
||||
|
||||
ts-custom = build {
|
||||
plugins.treesitter = {
|
||||
enable = true;
|
||||
nixGrammars = true;
|
||||
grammarPackages = [
|
||||
(build-ts.lib.buildGrammar pkgs {
|
||||
language = "gleam";
|
||||
version = "0.25.0";
|
||||
source = gleam;
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
})) // {
|
||||
nixosConfigurations.nixvim-machine = nixpkgs.lib.nixosSystem {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue