From 56ae95c8aeb2d7adc179f91986cad226803c9198 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Wed, 20 Apr 2022 22:43:14 +0200 Subject: [PATCH] Add nvim-gps --- nvim/nvim/config/nvim.ln/lua/colorscheme.lua | 2 +- nvim/nvim/config/nvim.ln/lua/plugins.lua | 2 +- .../config/nvim.ln/lua/windows/lualine.lua | 58 +++++++++++++------ 3 files changed, 41 insertions(+), 21 deletions(-) diff --git a/nvim/nvim/config/nvim.ln/lua/colorscheme.lua b/nvim/nvim/config/nvim.ln/lua/colorscheme.lua index d7f61bf..169f5ae 100644 --- a/nvim/nvim/config/nvim.ln/lua/colorscheme.lua +++ b/nvim/nvim/config/nvim.ln/lua/colorscheme.lua @@ -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 diff --git a/nvim/nvim/config/nvim.ln/lua/plugins.lua b/nvim/nvim/config/nvim.ln/lua/plugins.lua index 69b42dd..0edce10 100644 --- a/nvim/nvim/config/nvim.ln/lua/plugins.lua +++ b/nvim/nvim/config/nvim.ln/lua/plugins.lua @@ -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" } } diff --git a/nvim/nvim/config/nvim.ln/lua/windows/lualine.lua b/nvim/nvim/config/nvim.ln/lua/windows/lualine.lua index ca67e32..92c0654 100644 --- a/nvim/nvim/config/nvim.ln/lua/windows/lualine.lua +++ b/nvim/nvim/config/nvim.ln/lua/windows/lualine.lua @@ -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", + }, })