mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-07 10:51:36 +00:00
modules/lsp: switch to explicit lib calls
This commit is contained in:
parent
dfc7c6737f
commit
c488f0490f
33 changed files with 285 additions and 273 deletions
|
@ -1,16 +1,16 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf nvim;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
|
||||
cfg = config.vim.lsp;
|
||||
in {
|
||||
config = mkIf (cfg.enable && cfg.lspkind.enable) {
|
||||
vim.startPlugins = ["lspkind"];
|
||||
vim.luaConfigRC.lspkind = nvim.dag.entryAnywhere ''
|
||||
vim.luaConfigRC.lspkind = entryAnywhere ''
|
||||
local lspkind = require'lspkind'
|
||||
local lspkind_opts = {
|
||||
mode = '${cfg.lspkind.mode}'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
_: {
|
||||
{
|
||||
imports = [
|
||||
./config.nix
|
||||
./lspkind.nix
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkOption types;
|
||||
|
||||
cfg = config.vim.lsp;
|
||||
{lib, ...}: let
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.types) enum;
|
||||
in {
|
||||
options.vim.lsp = {
|
||||
lspkind = {
|
||||
|
@ -14,7 +8,7 @@ in {
|
|||
|
||||
mode = mkOption {
|
||||
description = "Defines how annotations are shown";
|
||||
type = with types; enum ["text" "text_symbol" "symbol_text" "symbol"];
|
||||
type = enum ["text" "text_symbol" "symbol_text" "symbol"];
|
||||
default = "symbol_text";
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue