mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-22 15:29:49 +01:00
26 lines
480 B
Nix
26 lines
480 B
Nix
|
{
|
||
|
pkgs,
|
||
|
config,
|
||
|
lib,
|
||
|
...
|
||
|
}:
|
||
|
with lib;
|
||
|
with builtins; let
|
||
|
cfg = config.vim.lsp;
|
||
|
in {
|
||
|
config = mkIf cfg.lspconfig.enable (mkMerge [
|
||
|
{
|
||
|
vim.lsp.enable = true;
|
||
|
|
||
|
vim.startPlugins = ["nvim-lspconfig"];
|
||
|
|
||
|
vim.luaConfigRC.lspconfig = nvim.dag.entryAfter ["lsp-setup"] ''
|
||
|
local lspconfig = require('lspconfig')
|
||
|
'';
|
||
|
}
|
||
|
{
|
||
|
vim.luaConfigRC = mapAttrs (_: v: (nvim.dag.entryAfter ["lspconfig"] v)) cfg.lspconfig.sources;
|
||
|
}
|
||
|
]);
|
||
|
}
|