Skip to content

Commit

Permalink
feat: add neogit and lualine
Browse files Browse the repository at this point in the history
  • Loading branch information
adrielp committed Mar 23, 2024
1 parent 5f86122 commit b3ba813
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .config/nvim/lua/core/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ require('plugins')
-- load configs dependent on plugins
-- load terraform formatter which requires plugins to be installed (plenary.nvim)
require('core.terra_fmt')
require('core.fugitive')
--require('core.fugitive')
require('core.settings')
require('core.lsp')
require('core.harpoon')
require('core.treesitter')
require('core.lualine')
require('core.lazygit')
4 changes: 4 additions & 0 deletions .config/nvim/lua/core/lazygit.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- Description: Neogit plugin configuration
-- local neogit = require('neogit')

--vim.keymap.set("n", "<leader>gs", vim.cmd.Neogit)
40 changes: 40 additions & 0 deletions .config/nvim/lua/core/lualine.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
require('lualine').setup {
options = {
icons_enabled = true,
theme = 'papercolor_light',
component_separators = { left = '', right = ''},
section_separators = { left = '', right = ''},
disabled_filetypes = {
statusline = {},
winbar = {},
},
ignore_focus = {},
always_divide_middle = true,
globalstatus = false,
refresh = {
statusline = 1000,
tabline = 1000,
winbar = 1000,
}
},
sections = {
lualine_a = {'mode'},
lualine_b = {'branch', 'diff', 'diagnostics'},
lualine_c = {'filename'},
lualine_x = {'encoding', 'fileformat', 'filetype'},
lualine_y = {'progress'},
lualine_z = {'location'}
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = {'filename'},
lualine_x = {'location'},
lualine_y = {},
lualine_z = {}
},
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = {}
}
3 changes: 2 additions & 1 deletion .config/nvim/lua/plugins/config/whichkey.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,13 @@ wk.register({
s = { "<cmd>w<cr>", " Save" },
q = { "<cmd>q<cr>", " Quit" },
Q = { "<cmd>q!<cr>", " Force Quit" },
a = { "<cmd>qa<cr>", " Quit All" },
},
g = {
name = "۸ Git & </> LSP",
b = { "<cmd>Telescope git_branches<cr>", " Git Branches" },
c = { "<cmd>Telescope git_commits<cr>", " Git Commits" },
s = { vim.cmd.Git, " Git Status" },
s = { "<cmd>Neogit<cr>", " Git Status" },
},
}, {prefix = "<leader>"})

Expand Down
21 changes: 19 additions & 2 deletions .config/nvim/lua/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,22 @@ vim.opt.rtp:prepend(lazypath)
-- Plugins I use
local plugs = {
-- Essential Plugins
'tpope/vim-fugitive',
--'tpope/vim-fugitive',
{
'windwp/nvim-autopairs',
init = function()
require('nvim-autopairs').setup{}
end
},
'mbbill/undotree',
'vim-airline/vim-airline',
{
'nvim-lualine/lualine.nvim',
dependencies = {
'nvim-tree/nvim-web-devicons'
}

},
-- 'vim-airline/vim-airline',
'github/copilot.vim',
{
'nvim-treesitter/nvim-treesitter',
Expand Down Expand Up @@ -123,6 +130,16 @@ local plugs = {
"nvim-telescope/telescope.nvim"
}
},
-- NeoGit, a replacement for Vim Fugitive
{
"NeogitOrg/neogit",
dependencies = {
"nvim-lua/plenary.nvim",
"sindrets/diffview.nvim", -- git diff integration
"nvim-telescope/telescope.nvim"
},
config = true
}

-- Other Optionals
-- 'vim-airline/vim-airline-themes',
Expand Down

0 comments on commit b3ba813

Please sign in to comment.