Add lsp-trouble

This commit is contained in:
buffet 2022-08-16 19:14:35 +00:00
parent 6c7084ddd2
commit 2ca3a34489
3 changed files with 111 additions and 79 deletions

View file

@ -36,6 +36,22 @@
"type": "github" "type": "github"
} }
}, },
"lsp-trouble": {
"flake": false,
"locked": {
"lastModified": 1620090273,
"narHash": "sha256-Vrv9xWGANqruKwtWlb5jr/4i5bsM8mZiyG6FPENhi9w=",
"owner": "simrat39",
"repo": "lsp-trouble.nvim",
"rev": "315bda04bc48a6d28fc4417b69ec60458d354e7a",
"type": "github"
},
"original": {
"owner": "simrat39",
"repo": "lsp-trouble.nvim",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1660496378, "lastModified": 1660496378,
@ -56,6 +72,7 @@
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"impermanence": "impermanence", "impermanence": "impermanence",
"lsp-trouble": "lsp-trouble",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }
} }

View file

@ -1,11 +1,17 @@
{ {
inputs = { inputs = {
impermanence.url = "github:nix-community/impermanence";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.05";
home-manager = { home-manager = {
url = "github:nix-community/home-manager/release-22.05"; url = "github:nix-community/home-manager/release-22.05";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
impermanence.url = "github:nix-community/impermanence";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.05"; lsp-trouble = {
url = "github:simrat39/lsp-trouble.nvim";
flake = false;
};
}; };
outputs = {nixpkgs, ...} @ args: { outputs = {nixpkgs, ...} @ args: {

View file

@ -2,7 +2,7 @@
lib, lib,
pkgs, pkgs,
... ...
}: { } @ inputs: {
home-manager.users.buffet = { home-manager.users.buffet = {
home.sessionVariables = { home.sessionVariables = {
EDITOR = "nvim"; EDITOR = "nvim";
@ -13,11 +13,20 @@
# TODO: options # TODO: options
programs.neovim = { programs.neovim = {
enable = true; enable = true;
plugins = with pkgs.vimPlugins; [ plugins = let
# TODO: vimplugin lsp-trouble buildPlugin = name:
# TODO: vimplugin nvim-lspconfig pkgs.vimUtils.buildNeovimPluginFrom2Nix {
inherit name;
src = inputs."${name}";
};
buildPlugins = names: lib.attrsets.genAttrs names buildPlugin;
plugins = buildPlugins ["lsp-trouble"];
in
with pkgs.vimPlugins;
with plugins; [
{plugin = editorconfig-nvim;} {plugin = editorconfig-nvim;}
{plugin = fugitive;} {plugin = fugitive;}
{plugin = lsp-trouble;}
{plugin = nvim-autopairs;} {plugin = nvim-autopairs;}
{plugin = rust-vim;} {plugin = rust-vim;}
{plugin = tabular;} {plugin = tabular;}