Add nvim-gps

This commit is contained in:
Zoe Roux
2022-04-20 22:43:14 +02:00
parent 73c020be2c
commit 56ae95c8ae
3 changed files with 41 additions and 21 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ vim.g.tokyonight_style = "night"
vim.cmd [[
try
colorscheme tokyonight
hi VertSplit guifg=#7aa2f7
hi VertSplit guifg=#3d59a1
catch /^Vim\%((\a\+)\)\=:E185/
colorscheme default
set background=dark
+1 -1
View File
@@ -113,7 +113,7 @@ return packer.startup(function(use)
use "numToStr/Comment.nvim"
use "JoosepAlviste/nvim-ts-context-commentstring"
use { "danymat/neogen", requires = "nvim-treesitter/nvim-treesitter",}
use { "SmiteshP/nvim-gps", requires = "nvim-treesitter/nvim-treesitter" }
use "mfussenegger/nvim-dap"
use { "theHamsta/nvim-dap-virtual-text", requires = { "nvim-treesitter/nvim-treesitter" } }
@@ -3,6 +3,17 @@ if not status_ok then
return
end
local gps_on, gps = pcall(require, "nvim-gps")
if gps_on then
gps.setup({
icons = {
["container-name"] = '',
}
})
end
vim.opt["showmode"] = false
lualine.setup({
options = {
theme = "auto",
@@ -10,41 +21,50 @@ lualine.setup({
section_separators = { left = '', right = '' },
always_divide_middle = true,
globalstatus = true,
disabled_filetypes = {},
},
sections = {
lualine_a = {
{
'mode',
separator = { left = '' },
right_padding = 2,
fmt = function(str) return string.format("%-7s", str) end
fmt = function(str) return string.format("%7s", str) end
},
},
lualine_b = { 'filename', 'branch' },
lualine_c = {},
lualine_x = {
lualine_b = {
{
"diagnostics",
sources = { "nvim_diagnostic" },
sections = { "error", "warn" },
symbols = { error = "", warn = "" },
symbols = { error = " ", warn = " " },
always_visible = false,
}
},
lualine_c = {
{ 'filetype', colored = true, icon_only = true, separator = "", padding = { left = 1, right = 0 } },
{
'filename',
separator = '>',
path = 0,
symbols = {
modified = '',
readonly = '[-]',
unnamed = '[No Name]',
},
},
'fileformat',
{ gps.get_location, cond = gps_on and gps.is_available },
},
lualine_y = { 'filetype', 'progress' },
lualine_x = { 'fileformat', },
lualine_y = { 'branch', 'progress' },
lualine_z = {
{ 'location', separator = { right = '' }, left_padding = 2 },
{
'location',
},
},
},
inactive_sections = {
lualine_a = { 'filename' },
lualine_b = {},
lualine_c = {},
lualine_x = {},
lualine_y = {},
lualine_z = { 'location' },
},
tabline = {},
extensions = {},
extensions = {
"quickfix",
"nvim-tree",
"fugitive",
},
})