@@ -90,6 +90,9 @@ P.S. You can delete this when you're done too. It's your config now! :)
90
90
vim .g .mapleader = ' '
91
91
vim .g .maplocalleader = ' '
92
92
93
+ -- Set to true if you have a Nerd Font installed
94
+ vim .g .have_nerd_font = false
95
+
93
96
-- [[ Setting options ]]
94
97
-- See `:help vim.opt`
95
98
-- NOTE: You can change these options as you wish!
@@ -218,7 +221,7 @@ vim.opt.rtp:prepend(lazypath)
218
221
-- :Lazy update
219
222
--
220
223
-- NOTE: Here is where you install your plugins.
221
- require (' lazy' ).setup {
224
+ require (' lazy' ).setup ( {
222
225
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
223
226
' tpope/vim-sleuth' , -- Detect tabstop and shiftwidth automatically
224
227
@@ -385,10 +388,8 @@ require('lazy').setup {
385
388
},
386
389
{ ' nvim-telescope/telescope-ui-select.nvim' },
387
390
388
- -- Useful for getting pretty icons, but requires special font.
389
- -- If you already have a Nerd Font, or terminal set up with fallback fonts
390
- -- you can enable this
391
- -- { 'nvim-tree/nvim-web-devicons' }
391
+ -- Useful for getting pretty icons, but requires a Nerd Font.
392
+ { ' nvim-tree/nvim-web-devicons' , enabled = vim .g .have_nerd_font },
392
393
},
393
394
config = function ()
394
395
-- Telescope is a fuzzy finder that comes with a lot of different things that
@@ -833,7 +834,8 @@ require('lazy').setup {
833
834
-- You could remove this setup call if you don't like it,
834
835
-- and try some other statusline plugin
835
836
local statusline = require ' mini.statusline'
836
- statusline .setup ()
837
+ -- set use_icons to true if you have a Nerd Font
838
+ statusline .setup { use_icons = vim .g .have_nerd_font }
837
839
838
840
-- You can configure sections in the statusline by overriding their
839
841
-- default behavior. For example, here we set the section for
@@ -890,7 +892,27 @@ require('lazy').setup {
890
892
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
891
893
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
892
894
-- { import = 'custom.plugins' },
893
- }
895
+ }, {
896
+ ui = {
897
+ -- If you have a Nerd Font, set icons to an empty table which will use the
898
+ -- default lazy.nvim defined Nerd Font icons otherwise define a unicode icons table
899
+ icons = vim .g .have_nerd_font and {} or {
900
+ cmd = ' ⌘' ,
901
+ config = ' 🛠' ,
902
+ event = ' 📅' ,
903
+ ft = ' 📂' ,
904
+ init = ' ⚙' ,
905
+ keys = ' 🗝' ,
906
+ plugin = ' 🔌' ,
907
+ runtime = ' 💻' ,
908
+ require = ' 🌙' ,
909
+ source = ' 📄' ,
910
+ start = ' 🚀' ,
911
+ task = ' 📌' ,
912
+ lazy = ' 💤 ' ,
913
+ },
914
+ },
915
+ })
894
916
895
917
-- The line beneath this is called `modeline`. See `:help modeline`
896
918
-- vim: ts=2 sts=2 sw=2 et
0 commit comments