From 2b92614d0e674b9fafa3d38fc9c02b4a101853f8 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Thu, 18 Apr 2024 01:26:40 +0300 Subject: [PATCH] modules: enable devicons in nvim-tree --- modules/nvim-tree-lua.nix | 2 ++ neovim.nix | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/nvim-tree-lua.nix b/modules/nvim-tree-lua.nix index a72956b..be93a1e 100644 --- a/modules/nvim-tree-lua.nix +++ b/modules/nvim-tree-lua.nix @@ -14,6 +14,8 @@ let isEmptyVar = name: eq "" (var name); in { + nvim-web-devicons = true; + nvim-tree-lua = ( [ (pipe [ (require "nvim-tree") (call "setup" [ configs ]) ]) diff --git a/neovim.nix b/neovim.nix index 97b6ec7..e28868b 100644 --- a/neovim.nix +++ b/neovim.nix @@ -55,9 +55,10 @@ let with nix2lua.lib; "-- Plugin: ${builtins.trace "Plugin: ${name}" name}\n" + (if lib.isString cfg then cfg - else if lib.isAttrs cfg then toLua cfg + else if lib.isAttrs cfg && cfg ? _type then toLua cfg else if lib.isList cfg then toLua (concatLines cfg) - else abort "[neovim] mkPluginLuaConfig: unsupported type"); + else if lib.isBool cfg then "" # Just skip lua config. Only enable the plugin. + else abort "[neovim] mkPluginLuaConfig: '${name}' has unsupported type '${builtins.typeOf cfg}'"); pluginLuaConfigs = lib.mapAttrsToList mkPluginLuaConfig pluginsWithModules; basicLuaConfigs = map builtins.readFile [ ./config/basic.lua ];