refactor(nvim): use Vim icon for Neovim mode
This commit is contained in:
parent
82aab57df8
commit
fce8f32313
@ -4,17 +4,6 @@ return {
|
|||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
opts = function()
|
opts = function()
|
||||||
local present, lualine = pcall(require, "lualine")
|
|
||||||
if not present then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Thanks to rockyzhang24 (github.com/rockyzhang24)
|
|
||||||
|
|
||||||
local function simplifiedMode(str)
|
|
||||||
return " " .. (str == "V-LINE" and "VL" or (str == "V-BLOCK" and "VB" or str:sub(1, 1)))
|
|
||||||
end
|
|
||||||
|
|
||||||
-- For location, show total lines
|
-- For location, show total lines
|
||||||
local function customLocation(str)
|
local function customLocation(str)
|
||||||
return string.gsub(str, "%w+", "%1" .. "/%%L", 1)
|
return string.gsub(str, "%w+", "%1" .. "/%%L", 1)
|
||||||
@ -156,8 +145,9 @@ return {
|
|||||||
sections = {
|
sections = {
|
||||||
lualine_a = {
|
lualine_a = {
|
||||||
{
|
{
|
||||||
"mode",
|
function()
|
||||||
fmt = simplifiedMode,
|
return ""
|
||||||
|
end
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color = {
|
color = {
|
||||||
|
Loading…
Reference in New Issue
Block a user