I have been struggling to enable a Powerline font for Lightline in NeoVim with Kitty. This is my NeoVim config:
-- Ensure Packer.nvim is installed and load it
local ensure_packer = function()
local fn = vim.fn
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
-- Check if Packer.nvim is already installed
if fn.empty(fn.glob(install_path)) > 0 then
-- If not installed, clone it from GitHub
fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
-- Load Packer.nvim
vim.cmd [[packadd packer.nvim]]
return true
end
return false
end
local packer_bootstrap = ensure_packer()
-- Check if Packer.nvim was bootstrapped successfully and sync plugins
if packer_bootstrap then
require('packer').sync()
end
-- Define and configure plugins using Packer.nvim
require('packer').startup(function(use)
use 'wbthomason/packer.nvim'
use 'junegunn/goyo.vim' -- Zen mode for distraction-free writing
use 'ii14/onedark.nvim' -- One Dark color scheme
use 'numToStr/Comment.nvim' -- Commenting utility
use {
'kyazdani42/nvim-tree.lua', -- Filesystem navigation
requires = 'kyazdani42/nvim-web-devicons' -- Filesystem icons
}
use 'mhinz/vim-startify' -- Start screen
use 'DanilaMihailov/beacon.nvim' -- Cursor jump indicator
use 'itchyny/lightline.vim' -- Lightline
use {
'nvim-telescope/telescope.nvim', -- Fuzzy finder
requires = { {'nvim-lua/plenary.nvim'} }
}
use 'majutsushi/tagbar' -- Code structure
use 'Yggdroot/indentLine' -- See indentation
use 'tpope/vim-fugitive' -- Git integration
use 'junegunn/gv.vim' -- Commit history
use 'windwp/nvim-autopairs' -- Auto close brackets, etc.
-- Configure the package_root for Neovim packages
config = {
package_root = vim.fn.stdpath('config') .. '/site/pack'
}
end)
-- Set colorscheme to 'onedark'
vim.cmd [[let g:onedark_termcolors=16]]
vim.cmd [[colorscheme onedark]]
-- Load Lightline
vim.cmd [[set laststatus=2]]
vim.cmd [[set noshowmode]]
-- Set colorscheme for lightline
vim.g.lightline = {
colorscheme = 'onedark',
}
-- Enable Comment.nvim plugin and set up its configuration
require('Comment').setup()
-- Nvim-Tree configuration
-- Enable Nvim-Tree
require('nvim-tree').setup{}
-- Vim Commands
vim.cmd [[set clipboard+=unnamedplus]]
-- Key mappings
local map = vim.api.nvim_set_keymap
-- Remap the key used to leave insert mode to 'jk'
map('i', 'jk', '', {})
-- Toggle Nvim-Tree with 'n' key
map('n', 'n', ':NvimTreeToggle<CR>', {})
-- Insert Mode Bindings
-- Move right by a word in insert mode
vim.api.nvim_set_keymap('i', '<C-Right>', '<Esc>ea', { noremap = true, silent = true })
-- Move left by a word
vim.api.nvim_set_keymap('i', '<C-Left>', '<Esc>bi', { noremap = true, silent = true })
-- Map Ctrl + Delete to delete the word to the right
vim.api.nvim_set_keymap('i', '<C-Delete>', '<C-w>', { noremap = true, silent = true })
-- Map Ctrl + Backspace to delete the word to the left
vim.api.nvim_set_keymap('i', '<C-Backspace>', '<C-w><Left><Del>', { noremap = true, silent = true })
This is my Kitty config:
# Padding #
# Rounded corners
window_padding_width 5 25
# Sharp corners
#window_padding_width 6.7 18.374385
# Font #
font_family DejaVuSansM Nerd Font Mono
bold_font DejaVuSansM Nerd Font Mono Bold
italic_font DejaVuSansM Nerd Font Mono Oblique
bold_italic_font DejaVuSansM Nerd Font Mono Bold Oblique
# Terminal Bell #
enable_audio_bell no
# Keybindings #
# Copy the last output to the clipboard
map ctrl+shift+o cat ~/.Output | wl-copy
# Theme #
# BEGIN_KITTY_THEME
# One Dark
include current-theme.conf
# END_KITTY_THEME
background_opacity 0.69
Thanks for the help.
I need to know how to enable the font specifically for Lighline and the Lightline characters. I want to enable the DejaVu Sans Mono varient.