aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamjan 9000 <damjan.9000@gmail.com>2024-03-06 19:44:10 +0100
committerDamjan 9000 <damjan.9000@gmail.com>2024-03-06 19:44:10 +0100
commit56942efafbbeafbfe77f8234acd1eefc55b4e322 (patch)
tree0f064bc7ad529e8956b7567b568642eef12326de
parent586bdec3b9d03795cdf9dc30dc25401994a100d4 (diff)
parent66e2a5a425a4f3b2e4f9456d82b29718c24a8993 (diff)
Merge 'upstream/master' Make the Nerd Font an optional requirement
-rw-r--r--README.md2
-rw-r--r--init.lua3
-rw-r--r--lua/kickstart/plugins/mini.lua3
-rw-r--r--lua/kickstart/plugins/telescope.lua6
-rw-r--r--lua/lazy-plugins.lua24
5 files changed, 31 insertions, 7 deletions
diff --git a/README.md b/README.md
index c2188c9..7e3e508 100644
--- a/README.md
+++ b/README.md
@@ -29,6 +29,8 @@ If you are experiencing issues, please make sure you have the latest versions.
External Requirements:
- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`)
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation)
+- A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons
+ - if you have it set `vim.g.have_nerd_font` in `init.lua` to true
- Language Setup:
- If want to write Typescript, you need `npm`
- If want to write Golang, you will need `go`
diff --git a/init.lua b/init.lua
index 7412b61..a5e5fe0 100644
--- a/init.lua
+++ b/init.lua
@@ -90,6 +90,9 @@ P.S. You can delete this when you're done too. It's your config now! :)
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
+-- Set to true if you have a Nerd Font installed
+vim.g.have_nerd_font = false
+
-- [[ Setting options ]]
require 'options'
diff --git a/lua/kickstart/plugins/mini.lua b/lua/kickstart/plugins/mini.lua
index 94de556..3e924a8 100644
--- a/lua/kickstart/plugins/mini.lua
+++ b/lua/kickstart/plugins/mini.lua
@@ -21,7 +21,8 @@ return {
-- You could remove this setup call if you don't like it,
-- and try some other statusline plugin
local statusline = require 'mini.statusline'
- statusline.setup()
+ -- set use_icons to true if you have a Nerd Font
+ statusline.setup { use_icons = vim.g.have_nerd_font }
-- You can configure sections in the statusline by overriding their
-- default behavior. For example, here we set the section for
diff --git a/lua/kickstart/plugins/telescope.lua b/lua/kickstart/plugins/telescope.lua
index f73e12d..a88b52b 100644
--- a/lua/kickstart/plugins/telescope.lua
+++ b/lua/kickstart/plugins/telescope.lua
@@ -27,10 +27,8 @@ return {
},
{ 'nvim-telescope/telescope-ui-select.nvim' },
- -- Useful for getting pretty icons, but requires special font.
- -- If you already have a Nerd Font, or terminal set up with fallback fonts
- -- you can enable this
- -- { 'nvim-tree/nvim-web-devicons' }
+ -- Useful for getting pretty icons, but requires a Nerd Font.
+ { 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
},
config = function()
-- Telescope is a fuzzy finder that comes with a lot of different things that
diff --git a/lua/lazy-plugins.lua b/lua/lazy-plugins.lua
index f06094d..a321594 100644
--- a/lua/lazy-plugins.lua
+++ b/lua/lazy-plugins.lua
@@ -9,7 +9,7 @@
-- :Lazy update
--
-- NOTE: Here is where you install your plugins.
-require('lazy').setup {
+require('lazy').setup({
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
@@ -66,6 +66,26 @@ require('lazy').setup {
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
-- { import = 'custom.plugins' },
-}
+}, {
+ ui = {
+ -- If you have a Nerd Font, set icons to an empty table which will use the
+ -- default lazy.nvim defined Nerd Font icons otherwise define a unicode icons table
+ icons = vim.g.have_nerd_font and {} or {
+ cmd = '⌘',
+ config = 'πŸ› ',
+ event = 'πŸ“…',
+ ft = 'πŸ“‚',
+ init = 'βš™',
+ keys = 'πŸ—',
+ plugin = 'πŸ”Œ',
+ runtime = 'πŸ’»',
+ require = 'πŸŒ™',
+ source = 'πŸ“„',
+ start = 'πŸš€',
+ task = 'πŸ“Œ',
+ lazy = 'πŸ’€ ',
+ },
+ },
+})
-- vim: ts=2 sts=2 sw=2 et