This commit is contained in:
ViViDboarder 2021-12-08 22:13:53 -08:00
parent 45f840144e
commit 7eaf0ee267
2 changed files with 20 additions and 4 deletions

View File

@ -84,6 +84,9 @@ return require('packer').startup(function()
use { use {
"nvim-lualine/lualine.nvim", "nvim-lualine/lualine.nvim",
config = function() require("plugins.lualine").config_lualine() end, config = function() require("plugins.lualine").config_lualine() end,
requires = {
"SmiteshP/nvim-gps",
}
} }
use { use {
"cormacrelf/dark-notify", "cormacrelf/dark-notify",
@ -119,12 +122,10 @@ return require('packer').startup(function()
requires = "neovim/nvim-lspconfig", requires = "neovim/nvim-lspconfig",
config = function() require("plugins.lsp").config_lsp_saga() end, config = function() require("plugins.lsp").config_lsp_saga() end,
} }
--[[
use { use {
"SmiteshP/nvim-gps", "SmiteshP/nvim-gps",
requires = "nvim-treesitter/nvim-treesitter" requires = "nvim-treesitter/nvim-treesitter",
} }
--]]
-- Writing -- Writing
-- abolish/pencil -- abolish/pencil

View File

@ -1,4 +1,5 @@
local M = {} local M = {}
local utils = require("utils")
-- Only return interesting ffenc (not utf-8[unix]) -- Only return interesting ffenc (not utf-8[unix])
function M.custom_ffenc() function M.custom_ffenc()
@ -45,6 +46,20 @@ function M.config_lualine(theme_name)
theme_name = "wombat" theme_name = "wombat"
end end
local gps = {}
if utils.is_plugin_loaded("nvim-gps") then
gps = require("nvim-gps")
gps.setup{
icons = {
["class-name"] = "(c) ",
["function-name"] = "(ƒ) ",
["method-name"] = "(m) ",
["container-name"] = "",
["tag-name"] = "(t) ",
}
}
end
require("lualine").setup { require("lualine").setup {
options = { options = {
theme = theme_name, theme = theme_name,
@ -55,7 +70,7 @@ function M.config_lualine(theme_name)
sections = { sections = {
lualine_a = {{"mode", fmt = function(str) return str:sub(1, 1) end}}, lualine_a = {{"mode", fmt = function(str) return str:sub(1, 1) end}},
lualine_b = {"FugitiveHead", "diff"}, lualine_b = {"FugitiveHead", "diff"},
lualine_c = {"filename"}, lualine_c = {"filename", { gps.get_location, cond = gps.is_available }},
lualine_x = {M.custom_ffenc, "filetype"}, lualine_x = {M.custom_ffenc, "filetype"},
lualine_y = {"progress", "location"}, lualine_y = {"progress", "location"},
lualine_z = { lualine_z = {