mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2024-12-23 03:57:46 +00:00
Add gps
This commit is contained in:
parent
45f840144e
commit
7eaf0ee267
@ -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
|
||||||
|
@ -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 = {
|
||||||
|
Loading…
Reference in New Issue
Block a user