Font, icons, color-scheme and status-line
This commit is contained in:
@@ -0,0 +1,105 @@
|
||||
## 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`
|
||||
```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`
|
||||
```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`
|
||||
```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`
|
||||
```lua
|
||||
-- other requires
|
||||
|
||||
require( "roka.plug.color")
|
||||
|
||||
-- other requires
|
||||
```
|
||||
|
||||
## 2.4 - LuaLine
|
||||
|
||||
`lua/roka/core/plugins.lua`
|
||||
```lua
|
||||
return require('packer').startup(function()
|
||||
-- other plugins...
|
||||
|
||||
use "nvim-lualine/lualine.nvim"
|
||||
|
||||
-- other plugins...
|
||||
end)
|
||||
```
|
||||
|
||||
`lua/roka/plug/lualine.lua`
|
||||
```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`
|
||||
```lua
|
||||
-- other requires
|
||||
|
||||
require( "roka.plug.lualine")
|
||||
|
||||
-- other requires
|
||||
```
|
||||
@@ -3,3 +3,5 @@
|
||||
require( "roka.core.options")
|
||||
require( "roka.core.keymaps")
|
||||
require( "roka.core.plugins")
|
||||
|
||||
require( "roka.plug.color" )
|
||||
@@ -62,6 +62,35 @@ return packer.startup(function(use)
|
||||
use "wbthomason/packer.nvim"
|
||||
|
||||
|
||||
use "lewis6991/impatient.nvim"
|
||||
|
||||
-- ----------------------------------------------------
|
||||
-- web devicons used by e.g.: nvim-tree, lualine, ...
|
||||
-- ----------------------------------------------------
|
||||
use "kyazdani42/nvim-web-devicons"
|
||||
|
||||
-- ----------------------------------------------------
|
||||
-- colorschemas
|
||||
-- ----------------------------------------------------
|
||||
use { "bluz71/vim-nightfly-colors", as = "nighfly" }
|
||||
use { "bluz71/vim-moonfly-colors", as = "moonfly" }
|
||||
|
||||
-- ----------------------------------------------------
|
||||
-- lualine (status line)
|
||||
-- ----------------------------------------------------
|
||||
use {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
|
||||
config = function()
|
||||
require( "roka.plug.lualine")
|
||||
end
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- -------------------------------------------------------------------
|
||||
-- Automatically set up your configuration after cloning packer.nvim.
|
||||
-- Put this at the end after all plugins.
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
local colorscheme = "nightfly"
|
||||
|
||||
local custom_highlight =
|
||||
vim.api.nvim_create_augroup( "CustomHighlight", {})
|
||||
vim.api.nvim_create_autocmd( "ColorScheme", {
|
||||
pattern = "nightfly",
|
||||
callback = function()
|
||||
vim.api.nvim_set_hl( 0, "String", { fg = "#00A000", italic = false })
|
||||
vim.api.nvim_set_hl( 0, "Comment", { fg = "#808080", italic = false })
|
||||
vim.api.nvim_set_hl( 0, "Function", { fg = "#82aaff", italic = false })
|
||||
vim.api.nvim_set_hl( 0, "CursorLineNr", { fg = "#82aaff", italic = false })
|
||||
vim.api.nvim_set_hl( 0, "Delimiter", { fg = "#ff0000", italic = false })
|
||||
end,
|
||||
|
||||
group = custom_highlight,
|
||||
})
|
||||
|
||||
local status, _ = pcall( vim.cmd, "colorscheme " .. colorscheme)
|
||||
|
||||
if not status then
|
||||
vim.notify( "Colorscheme " .. colorscheme .. " is not found!")
|
||||
return
|
||||
end
|
||||
|
||||
vim.cmd [[ set cursorline]]
|
||||
vim.cmd [[ highlight clear CursorLine]]
|
||||
@@ -0,0 +1,33 @@
|
||||
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
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user