mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-19 12:09:48 +01:00
b499151527
* ui: allow custom listOf str border type * lib: extract shared borderType * remove TODO * allow ["|" "HighlightGroup"] for border char * docs: update rl notes --------- Co-authored-by: raf <raf@notashelf.dev>
36 lines
853 B
Nix
36 lines
853 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}: let
|
|
inherit (lib.modules) mkIf mkMerge;
|
|
inherit (lib.strings) optionalString;
|
|
inherit (lib.attrsets) mapAttrs;
|
|
inherit (lib.nvim.dag) entryAfter;
|
|
inherit (lib.nvim.lua) toLuaObject;
|
|
|
|
cfg = config.vim.lsp;
|
|
in {
|
|
config = mkIf cfg.lspconfig.enable (mkMerge [
|
|
{
|
|
vim = {
|
|
lsp.enable = true;
|
|
|
|
startPlugins = ["nvim-lspconfig"];
|
|
|
|
pluginRC.lspconfig = entryAfter ["lsp-setup"] ''
|
|
local lspconfig = require('lspconfig')
|
|
|
|
${
|
|
optionalString config.vim.ui.borders.enable ''
|
|
require('lspconfig.ui.windows').default_options.border = ${toLuaObject config.vim.ui.borders.globalStyle}
|
|
''
|
|
}
|
|
'';
|
|
};
|
|
}
|
|
{
|
|
vim.pluginRC = mapAttrs (_: v: (entryAfter ["lspconfig"] v)) cfg.lspconfig.sources;
|
|
}
|
|
]);
|
|
}
|