lazygit, zenmode and relativenumber

This commit is contained in:
José Iêdo 2023-09-02 11:03:01 -03:00
parent b365948225
commit de70762838
2 changed files with 132 additions and 103 deletions

128
init.lua
View File

@ -1,3 +1,4 @@
---@diagnostic disable: missing-fields
vim.g.mapleader = ' ' vim.g.mapleader = ' '
vim.g.maplocalleader = ' ' vim.g.maplocalleader = ' '
@ -31,6 +32,13 @@ require('lazy').setup({
-- Detect tabstop and shiftwidth automatically -- Detect tabstop and shiftwidth automatically
'tpope/vim-sleuth', 'tpope/vim-sleuth',
{
"kdheepak/lazygit.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
},
},
-- NOTE: This is where your plugins related to LSP can be installed. -- NOTE: This is where your plugins related to LSP can be installed.
-- The configuration is done below. Search for lspconfig to find it below. -- The configuration is done below. Search for lspconfig to find it below.
{ {
@ -81,19 +89,29 @@ require('lazy').setup({
changedelete = { text = '~' }, changedelete = { text = '~' },
}, },
on_attach = function(bufnr) on_attach = function(bufnr)
vim.keymap.set('n', '<leader>gp', require('gitsigns').prev_hunk, { buffer = bufnr, desc = '[G]o to [P]revious Hunk' }) vim.keymap.set('n', '<leader>gp', require('gitsigns').prev_hunk,
{ buffer = bufnr, desc = '[G]o to [P]revious Hunk' })
vim.keymap.set('n', '<leader>gn', require('gitsigns').next_hunk, { buffer = bufnr, desc = '[G]o to [N]ext Hunk' }) vim.keymap.set('n', '<leader>gn', require('gitsigns').next_hunk, { buffer = bufnr, desc = '[G]o to [N]ext Hunk' })
vim.keymap.set('n', '<leader>ph', require('gitsigns').preview_hunk, { buffer = bufnr, desc = '[P]review [H]unk' }) vim.keymap.set('n', '<leader>ph', require('gitsigns').preview_hunk, { buffer = bufnr, desc = '[P]review [H]unk' })
end, end,
}, },
}, },
-- THEMESSS
-- {
-- 'navarasu/onedark.nvim',
-- priority = 1000,
-- config = function()
-- vim.cmd.colorscheme 'onedark'
-- end,
-- },
{ {
-- Theme inspired by Atom "folke/tokyonight.nvim",
'navarasu/onedark.nvim',
priority = 1000, priority = 1000,
opts = {
style = "night"
},
config = function() config = function()
vim.cmd.colorscheme 'onedark' vim.cmd.colorscheme 'tokyonight'
end, end,
}, },
@ -104,23 +122,23 @@ require('lazy').setup({
opts = { opts = {
options = { options = {
icons_enabled = false, icons_enabled = false,
theme = 'onedark', theme = 'tokyonight',
component_separators = '|', component_separators = '|',
section_separators = '', section_separators = '',
}, },
}, },
}, },
{ -- {
-- Add indentation guides even on blank lines -- -- Add indentation guides even on blank lines
'lukas-reineke/indent-blankline.nvim', -- 'lukas-reineke/indent-blankline.nvim',
-- Enable `lukas-reineke/indent-blankline.nvim` -- -- Enable `lukas-reineke/indent-blankline.nvim`
-- See `:help indent_blankline.txt` -- -- See `:help indent_blankline.txt`
opts = { -- opts = {
char = '', -- char = '|',
show_trailing_blankline_indent = false, -- show_trailing_blankline_indent = false,
}, -- },
}, -- },
-- "gc" to comment visual regions/lines -- "gc" to comment visual regions/lines
{ 'numToStr/Comment.nvim', opts = {} }, { 'numToStr/Comment.nvim', opts = {} },
@ -167,58 +185,60 @@ require('lazy').setup({
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
-- --
-- For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins -- For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins
-- { import = 'custom.plugins' }, { import = 'custom.plugins' },
}, {}) }, {})
-- [[ Setting options ]] -- [[ Setting options ]]
-- See `:help vim.o` -- See `:help vim.o`
-- NOTE: You can change these options as you wish! -- NOTE: You can change these options as you wish!
-- Set highlight on search -- Set highlight on search
vim.o.hlsearch = false vim.o.hlsearch = false
-- Make line numbers default -- Make line numbers default
vim.wo.number = true vim.wo.number = true
-- Enable mouse mode -- Enable mouse mode
vim.o.mouse = 'a' vim.o.mouse = 'a'
-- Sync clipboard between OS and Neovim. vim.o.relativenumber = true
-- Remove this option if you want your OS clipboard to remain independent.
-- See `:help 'clipboard'`
vim.o.clipboard = 'unnamedplus'
-- Enable break indent -- Sync clipboard between OS and Neovim.
vim.o.breakindent = true -- Remove this option if you want your OS clipboard to remain independent.
-- See `:help 'clipboard'`
vim.o.clipboard = 'unnamedplus'
-- Save undo history -- Enable break indent
vim.o.undofile = true vim.o.breakindent = true
-- Case-insensitive searching UNLESS \C or capital in search -- Save undo history
vim.o.ignorecase = true vim.o.undofile = true
vim.o.smartcase = true
-- Keep signcolumn on by default -- Case-insensitive searching UNLESS \C or capital in search
vim.wo.signcolumn = 'yes' vim.o.ignorecase = true
vim.o.smartcase = true
-- Decrease update time -- Keep signcolumn on by default
vim.o.updatetime = 250 vim.wo.signcolumn = 'yes'
vim.o.timeoutlen = 300
-- Set completeopt to have a better completion experience -- Decrease update time
vim.o.completeopt = 'menuone,noselect' vim.o.updatetime = 250
vim.o.timeoutlen = 300
-- NOTE: You should make sure your terminal supports this -- Set completeopt to have a better completion experience
vim.o.termguicolors = true vim.o.completeopt = 'menuone,noselect'
-- [[ Basic Keymaps ]] -- NOTE: You should make sure your terminal supports this
vim.o.termguicolors = true
-- Keymaps for better default experience -- [[ Basic Keymaps ]]
-- See `:help vim.keymap.set()`
vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true }) -- Keymaps for better default experience
vim.keymap.set({ 'n', 'v' }, '<C-d>','<C-d>zz') -- See `:help vim.keymap.set()`
vim.keymap.set({ 'n', 'v' }, '<C-u>','<C-u>zz') vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
vim.keymap.set({ 'n', 'v' }, 's', '<C-w>') vim.keymap.set({ 'n', 'v' }, '<C-d>', '<C-d>zz')
vim.keymap.set({ 'n', 'v' }, '<C-u>', '<C-u>zz')
vim.keymap.set({ 'n', 'v' }, 's', '<C-w>')
-- Remap for dealing with word wrap -- Remap for dealing with word wrap
vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })

View File

@ -2,4 +2,13 @@
-- I promise not to create any merge conflicts in this directory :) -- I promise not to create any merge conflicts in this directory :)
-- --
-- See the kickstart.nvim README for more information -- See the kickstart.nvim README for more information
return {} return {
{
"folke/zen-mode.nvim",
opts = {}
},
{
"folke/twilight.nvim",
opts = {}
}
}