Add dart lsp
This commit is contained in:
parent
15e0e96372
commit
fbb59f1345
5 changed files with 27 additions and 3 deletions
|
@ -434,11 +434,11 @@
|
||||||
},
|
},
|
||||||
"latest_2": {
|
"latest_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1679231546,
|
"lastModified": 1679232602,
|
||||||
"narHash": "sha256-Lp1UbxFkRCOtJKIG0FAxgGsvoxap1ADyqkCN8a5OzRw=",
|
"narHash": "sha256-O7dj7MvfhN0G5BQxMjPEUh13iGGjLT87Wxc4U6EH20E=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "eefe9c8bae9abcf7a0ec953f6e18f82d8d86e67a",
|
"rev": "feb661ff785b95dfbfe780143b66ad21814218fc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
20
users/modules/neovim/dart.nix
Normal file
20
users/modules/neovim/dart.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{ lib, pkgs, config, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.mae.nvim.dart;
|
||||||
|
in
|
||||||
|
with lib;
|
||||||
|
{
|
||||||
|
options.mae.nvim.dart.enable = lib.mkEnableOption "Enable dart support in neovim";
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
mae.nvim.lsp.servers.dartls = {
|
||||||
|
enable = true;
|
||||||
|
script = ''
|
||||||
|
{
|
||||||
|
cmd = { "${pkgs.latest.dart}/bin/dart", "language-server" },
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
programs.neovim.plugins = with pkgs.vimPlugins; [ dart-vim-plugin ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -13,6 +13,7 @@ in
|
||||||
./python.nix
|
./python.nix
|
||||||
./clangd.nix
|
./clangd.nix
|
||||||
./elixir.nix
|
./elixir.nix
|
||||||
|
./dart.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
options.mae.nvim = {
|
options.mae.nvim = {
|
||||||
|
|
|
@ -20,6 +20,8 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.mae.nvim.lsp = {
|
options.mae.nvim.lsp = {
|
||||||
|
|
||||||
|
|
||||||
enable = mkEnableOption "Enable lsp support in nvim with nvim-lspconfig and cmp-nvim";
|
enable = mkEnableOption "Enable lsp support in nvim with nvim-lspconfig and cmp-nvim";
|
||||||
servers = mkOption {
|
servers = mkOption {
|
||||||
type = types.attrsOf lspLangConfigType;
|
type = types.attrsOf lspLangConfigType;
|
||||||
|
|
|
@ -11,5 +11,6 @@
|
||||||
clangd.enable = true;
|
clangd.enable = true;
|
||||||
python.enable = true;
|
python.enable = true;
|
||||||
elixir.enable = true;
|
elixir.enable = true;
|
||||||
|
dart.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue