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"
}
},
"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": {
"locked": {
"lastModified": 1660496378,
@ -56,6 +72,7 @@
"inputs": {
"home-manager": "home-manager",
"impermanence": "impermanence",
"lsp-trouble": "lsp-trouble",
"nixpkgs": "nixpkgs"
}
}

View file

@ -1,11 +1,17 @@
{
inputs = {
impermanence.url = "github:nix-community/impermanence";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.05";
home-manager = {
url = "github:nix-community/home-manager/release-22.05";
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: {

View file

@ -2,7 +2,7 @@
lib,
pkgs,
...
}: {
} @ inputs: {
home-manager.users.buffet = {
home.sessionVariables = {
EDITOR = "nvim";
@ -13,89 +13,98 @@
# TODO: options
programs.neovim = {
enable = true;
plugins = with pkgs.vimPlugins; [
# TODO: vimplugin lsp-trouble
# TODO: vimplugin nvim-lspconfig
{plugin = editorconfig-nvim;}
{plugin = fugitive;}
{plugin = nvim-autopairs;}
{plugin = rust-vim;}
{plugin = tabular;}
{plugin = vim-nix;}
{plugin = vim-repeat;}
{plugin = vimwiki;}
plugins = let
buildPlugin = name:
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 = fugitive;}
{plugin = lsp-trouble;}
{plugin = nvim-autopairs;}
{plugin = rust-vim;}
{plugin = tabular;}
{plugin = vim-nix;}
{plugin = vim-repeat;}
{plugin = vimwiki;}
{
plugin = gitsigns-nvim;
config = "lua require 'gitsigns'.setup()";
}
{
plugin = gitsigns-nvim;
config = "lua require 'gitsigns'.setup()";
}
# TODO: replace with own bar
{
plugin = lightline-vim;
config = "let g:lightline = { 'colorscheme': 'solarized' }";
}
# TODO: replace with own bar
{
plugin = lightline-vim;
config = "let g:lightline = { 'colorscheme': 'solarized' }";
}
{
plugin = lspsaga-nvim;
# TODO: lspsaga config
}
{
plugin = lspsaga-nvim;
# TODO: lspsaga config
}
{
plugin = NeoSolarized;
config = ''
set background=light
colorscheme NeoSolarized
'';
}
{
plugin = NeoSolarized;
config = ''
set background=light
colorscheme NeoSolarized
'';
}
{
plugin = nvim-lspconfig;
# TODO: lspconfig config
}
{
plugin = nvim-lspconfig;
# TODO: lspconfig config
}
{
plugin = telescope-nvim;
# TODO: telescope-nvim config
}
{
plugin = telescope-nvim;
# TODO: telescope-nvim config
}
{
plugin = nvim-treesitter.withPlugins (plugins:
with plugins; [
tree-sitter-bash
tree-sitter-bibtex
tree-sitter-c
tree-sitter-cmake
tree-sitter-comment
tree-sitter-cpp
tree-sitter-css
tree-sitter-devicetree
tree-sitter-dockerfile
tree-sitter-fennel
tree-sitter-go
tree-sitter-javascript
tree-sitter-json
tree-sitter-latex
tree-sitter-lua
tree-sitter-make
tree-sitter-markdown
tree-sitter-nix
tree-sitter-perl
tree-sitter-python
tree-sitter-regex
tree-sitter-rust
tree-sitter-toml
]);
config = lib.concatStrings (lib.splitString "\n" ''
lua require 'nvim-treesitter.configs'.setup {
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
}
'');
}
];
{
plugin = nvim-treesitter.withPlugins (plugins:
with plugins; [
tree-sitter-bash
tree-sitter-bibtex
tree-sitter-c
tree-sitter-cmake
tree-sitter-comment
tree-sitter-cpp
tree-sitter-css
tree-sitter-devicetree
tree-sitter-dockerfile
tree-sitter-fennel
tree-sitter-go
tree-sitter-javascript
tree-sitter-json
tree-sitter-latex
tree-sitter-lua
tree-sitter-make
tree-sitter-markdown
tree-sitter-nix
tree-sitter-perl
tree-sitter-python
tree-sitter-regex
tree-sitter-rust
tree-sitter-toml
]);
config = lib.concatStrings (lib.splitString "\n" ''
lua require 'nvim-treesitter.configs'.setup {
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
}
'');
}
];
};
};
}