2022-11-19 00:56:53 +03:00
|
|
|
{ lib
|
|
|
|
, plugins
|
|
|
|
, nvim-lspconfig
|
2022-11-10 00:01:34 +03:00
|
|
|
, nlsp-settings-nvim
|
2022-09-19 20:43:20 +03:00
|
|
|
, lspsaga-nvim
|
|
|
|
, luasnip
|
|
|
|
, nvim-cmp
|
|
|
|
, cmp-nvim-lsp
|
2022-11-01 11:23:55 +03:00
|
|
|
, cmp-luasnip
|
2022-09-19 20:43:20 +03:00
|
|
|
, ...
|
|
|
|
}:
|
2022-09-16 23:42:53 +03:00
|
|
|
|
2022-09-19 20:43:20 +03:00
|
|
|
let
|
2022-10-22 23:35:27 +03:00
|
|
|
inherit (builtins) readFile;
|
2022-11-10 00:01:34 +03:00
|
|
|
lsp = [ nvim-lspconfig nlsp-settings-nvim lspsaga-nvim ];
|
2022-09-19 20:43:20 +03:00
|
|
|
snippets = [ luasnip ];
|
|
|
|
completions = [
|
2022-09-16 23:42:53 +03:00
|
|
|
nvim-cmp # Autocompletion
|
|
|
|
cmp-nvim-lsp # LSP source for nvim-cmp
|
2022-11-01 11:23:55 +03:00
|
|
|
cmp-luasnip # Snippets source for nvim-cmp
|
2022-09-16 09:59:25 +03:00
|
|
|
];
|
2022-11-19 00:56:53 +03:00
|
|
|
|
|
|
|
lspConfigServers = lib.toLua (lib.attrByPath [ "lspConfig" "servers" ] [ ] plugins);
|
|
|
|
lspSagaSettings = lib.toLua (lib.attrByPath [ "lspSaga" "settings" ] { } plugins);
|
2022-09-19 20:43:20 +03:00
|
|
|
in
|
|
|
|
{
|
2022-11-19 00:56:53 +03:00
|
|
|
luaConfig = (readFile (lib.substituteAll { src = ./lspconfig.lua; inherit lspConfigServers lspSagaSettings; }))
|
2022-10-22 23:35:27 +03:00
|
|
|
+ (readFile ./nvim-cmp.lua);
|
2022-09-19 20:43:20 +03:00
|
|
|
|
|
|
|
plugins = lsp
|
|
|
|
++ snippets
|
|
|
|
++ completions;
|
2022-09-16 09:59:25 +03:00
|
|
|
}
|