trouble.nvim: init

This commit is contained in:
Pedro Alves 2022-11-15 10:14:43 +00:00
parent fb22debb36
commit 4f08c8a4bf
4 changed files with 39 additions and 6 deletions

View file

@ -30,6 +30,7 @@
./nvim-lsp ./nvim-lsp
./nvim-lsp/lspsaga.nix ./nvim-lsp/lspsaga.nix
./nvim-lsp/lsp-lines.nix ./nvim-lsp/lsp-lines.nix
./nvim-lsp/trouble.nix
./pluginmanagers/packer.nix ./pluginmanagers/packer.nix

View file

@ -0,0 +1,23 @@
{ config, pkgs, lib, helpers, ... }:
let
cfg = config.plugins.trouble;
in
with lib;
# with helpers;
{
options.plugins.trouble = {
enable = mkEnableOption "trouble.nvim";
position = helpers.mkNullOrOption (types.enum [ "top" "left" "right" "bottom" ]) "Position of the list";
height = helpers.mkNullOrOption types.int "Height of the trouble list when position is top or bottom";
width = helpers.mkNullOrOption types.int "Width of the trouble list when position is left or right";
icons = helpers.mkNullOrOption types.bool "Use devicons for filenames";
};
config = mkIf cfg.enable {
extraPlugins = with pkgs.vimPlugins; [
trouble-nvim
nvim-web-devicons
];
};
}

12
tests/flake.lock generated
View file

@ -97,12 +97,12 @@
}, },
"locked": { "locked": {
"lastModified": 0, "lastModified": 0,
"narHash": "sha256-3m9eDTuaK9RS8HpctJwSu1wnyx5/CILSGppr+6OjTPw=", "narHash": "sha256-b5FuoFQsTCgKsVTQS13qmFnMmVotIQWtcjPu+WT6ubo=",
"path": "/nix/store/pp50jx20wrkbrkv3mxkwzckciy8xcqy2-source", "path": "/nix/store/m90wvnc3d4rci36q0r0j7d2i1sk35cgy-source",
"type": "path" "type": "path"
}, },
"original": { "original": {
"path": "/nix/store/pp50jx20wrkbrkv3mxkwzckciy8xcqy2-source", "path": "/nix/store/m90wvnc3d4rci36q0r0j7d2i1sk35cgy-source",
"type": "path" "type": "path"
} }
}, },
@ -116,12 +116,12 @@
}, },
"locked": { "locked": {
"lastModified": 0, "lastModified": 0,
"narHash": "sha256-3m9eDTuaK9RS8HpctJwSu1wnyx5/CILSGppr+6OjTPw=", "narHash": "sha256-b5FuoFQsTCgKsVTQS13qmFnMmVotIQWtcjPu+WT6ubo=",
"path": "/nix/store/pp50jx20wrkbrkv3mxkwzckciy8xcqy2-source", "path": "/nix/store/m90wvnc3d4rci36q0r0j7d2i1sk35cgy-source",
"type": "path" "type": "path"
}, },
"original": { "original": {
"path": "/nix/store/pp50jx20wrkbrkv3mxkwzckciy8xcqy2-source", "path": "/nix/store/m90wvnc3d4rci36q0r0j7d2i1sk35cgy-source",
"type": "path" "type": "path"
} }
}, },

View file

@ -61,6 +61,15 @@
plugins.lsp-lines.enable = true; plugins.lsp-lines.enable = true;
}; };
trouble = build {
plugins.lsp = {
enable = true;
servers.clangd.enable = true;
};
plugins.trouble.enable = true;
};
issue-40 = build-stable { issue-40 = build-stable {
plugins = { plugins = {
nix.enable = true; nix.enable = true;