mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2024-12-22 23:27:34 +00:00
Add gps
This commit is contained in:
parent
45f840144e
commit
7eaf0ee267
@ -84,6 +84,9 @@ return require('packer').startup(function()
|
||||
use {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
config = function() require("plugins.lualine").config_lualine() end,
|
||||
requires = {
|
||||
"SmiteshP/nvim-gps",
|
||||
}
|
||||
}
|
||||
use {
|
||||
"cormacrelf/dark-notify",
|
||||
@ -119,12 +122,10 @@ return require('packer').startup(function()
|
||||
requires = "neovim/nvim-lspconfig",
|
||||
config = function() require("plugins.lsp").config_lsp_saga() end,
|
||||
}
|
||||
--[[
|
||||
use {
|
||||
"SmiteshP/nvim-gps",
|
||||
requires = "nvim-treesitter/nvim-treesitter"
|
||||
requires = "nvim-treesitter/nvim-treesitter",
|
||||
}
|
||||
--]]
|
||||
|
||||
-- Writing
|
||||
-- abolish/pencil
|
||||
|
@ -1,4 +1,5 @@
|
||||
local M = {}
|
||||
local utils = require("utils")
|
||||
|
||||
-- Only return interesting ffenc (not utf-8[unix])
|
||||
function M.custom_ffenc()
|
||||
@ -45,6 +46,20 @@ function M.config_lualine(theme_name)
|
||||
theme_name = "wombat"
|
||||
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 {
|
||||
options = {
|
||||
theme = theme_name,
|
||||
@ -55,7 +70,7 @@ function M.config_lualine(theme_name)
|
||||
sections = {
|
||||
lualine_a = {{"mode", fmt = function(str) return str:sub(1, 1) end}},
|
||||
lualine_b = {"FugitiveHead", "diff"},
|
||||
lualine_c = {"filename"},
|
||||
lualine_c = {"filename", { gps.get_location, cond = gps.is_available }},
|
||||
lualine_x = {M.custom_ffenc, "filetype"},
|
||||
lualine_y = {"progress", "location"},
|
||||
lualine_z = {
|
||||
|
Loading…
Reference in New Issue
Block a user