modules/lsp: switch to explicit lib calls

This commit is contained in:
raf 2024-03-12 03:46:29 +03:00
commit c488f0490f
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
33 changed files with 285 additions and 273 deletions

View file

@ -3,13 +3,14 @@
lib,
...
}: let
inherit (lib) mkIf nvim;
inherit (lib.modules) mkIf;
inherit (lib.nvim.dag) entryAfter;
cfg = config.vim.lsp;
in {
config = mkIf (cfg.enable && cfg.lsplines.enable) {
vim.startPlugins = ["lsp-lines"];
vim.luaConfigRC.lsplines = nvim.dag.entryAfter ["lspconfig"] ''
vim.luaConfigRC.lsplines = entryAfter ["lspconfig"] ''
require("lsp_lines").setup()
vim.diagnostic.config({

View file

@ -1,4 +1,4 @@
_: {
{
imports = [
./config.nix
./lsplines.nix

View file

@ -1,9 +1,11 @@
{lib, ...}: let
inherit (lib) mkEnableOption;
inherit (lib.options) mkEnableOption;
in {
options.vim.lsp = {
lsplines = {
enable = mkEnableOption "diagnostics using virtual lines on top of the real line of code. [lsp_lines]";
enable = mkEnableOption ''
diagnostics using virtual lines on top of the real line of code. [lsp_lines]
'';
};
};
}