Skip to content

Commit

Permalink
Revert "Make the Nerd Font an optional requirement (nvim-lua#716)"
Browse files Browse the repository at this point in the history
This reverts commit 66e2a5a.

redo
  • Loading branch information
andrew-r-thomas committed Mar 9, 2024
1 parent d588b50 commit 7d9a133
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 31 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ 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`
Expand Down
36 changes: 7 additions & 29 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@ 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 ]]
-- See `:help vim.opt`
-- NOTE: You can change these options as you wish!
Expand Down Expand Up @@ -221,7 +218,7 @@ vim.opt.rtp:prepend(lazypath)
-- :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

Expand Down Expand Up @@ -315,8 +312,10 @@ require('lazy').setup({
},
{ 'nvim-telescope/telescope-ui-select.nvim' },

-- Useful for getting pretty icons, but requires a Nerd Font.
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
-- 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' }
},
config = function()
-- Telescope is a fuzzy finder that comes with a lot of different things that
Expand Down Expand Up @@ -761,8 +760,7 @@ require('lazy').setup({
-- You could remove this setup call if you don't like it,
-- and try some other statusline plugin
local statusline = require 'mini.statusline'
-- set use_icons to true if you have a Nerd Font
statusline.setup { use_icons = vim.g.have_nerd_font }
statusline.setup()

-- You can configure sections in the statusline by overriding their
-- default behavior. For example, here we set the section for
Expand Down Expand Up @@ -819,27 +817,7 @@ 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 = '💤 ',
},
},
})
}

-- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et

0 comments on commit 7d9a133

Please sign in to comment.