Files
test/doc/neovim/2 - Font, icons, color-schema and status-line.md
T

1.9 KiB

2.1 - Font

The font we use in neovim is one from the nerd font collection. Those fonts contain special characters used as an icon in NeoVim. "SauceCodePro NF" is a derivation of the "SourceCodePro" font.

lua/roka/core/options.lua

vim.opt.guifont = { "SauceCodePro NF:h11:#e-subpixelantialias:#h-none" }

2.2 - Icons

The various icons can be used by many plugins, example nvim-tree or lualine.

lua/roka/core/plugins.lua

return require('packer').startup(function()
    -- other plugins...
    
	use "kyazdani42/nvim-web-devicons"
    
    -- other plugins...
end)

2.3 - Color-scheme

lua/roka/core/plugins.lua

return require('packer').startup(function()
    -- other plugins...
    
	use { "bluz71/vim-nightfly-colors", as = "nighfly" }
	use { "bluz71/vim-moonfly-colors",  as = "moonfly" }
    
    -- other plugins...
end)

lua/roka/plug/color.lua

init.lua

    -- other requires
    
    require( "roka.plug.color")
    
    -- other requires

2.4 - LuaLine

lua/roka/core/plugins.lua

return require('packer').startup(function()
    -- other plugins...
    
	use "nvim-lualine/lualine.nvim"
    
    -- other plugins...
end)

lua/roka/plug/lualine.lua

local status, lualine = pcall( require, "lualine")
if not status then
  return
end

local lualine_nightfly = require("lualine.themes.nightfly")

local new_colors = {
  blue    = "#65D1FF",
  green   = "#3EFFDC",
  violet  = "#FF61EF",
  yellow  = "#FFDA7B",
  black   = "#000000",
}

lualine_nightfly.normal.a.bg  = new_colors.blue
lualine_nightfly.insert.a.bg  = new_colors.green
lualine_nightfly.visual.a.bg  = new_colors.violet

lualine_nightfly.command = {
  a = {
    gui = "bold",
    bg  = new_colors.yellow,
    fg  = new_colors.black,
  },
}

lualine.setup({
  options = {
    theme = lualine_nightfly
  }
})

init.lua

    -- other requires
    
    require( "roka.plug.lualine")
    
    -- other requires