more changes mostly qol and cleaning

This commit is contained in:
2022-12-23 21:10:04 -05:00
parent d98cce7d64
commit 127924ccb4

View File

@ -30,10 +30,6 @@ o.tabstop = 2
o.shiftwidth = 2 o.shiftwidth = 2
o.softtabstop = -1 -- If negative, shiftwidth value is used o.softtabstop = -1 -- If negative, shiftwidth value is used
-- width line
o.colorcolumn = { 80 }
vim.cmd('highlight ColorColumn ctermbg=0 guibg=lightgrey')
-- colors -- colors
o.termguicolors = true o.termguicolors = true
vim.cmd('colorscheme jellybeans-nvim') vim.cmd('colorscheme jellybeans-nvim')
@ -52,6 +48,10 @@ local colors = {
purple = '#C678DD', purple = '#C678DD',
} }
-- width line
o.colorcolumn = { 80 }
a.nvim_set_hl(0, "ColorColumn", { bg = colors.grey })
-- custom opts -- custom opts
tablines = 'colored' -- false, colored, wrap tablines = 'colored' -- false, colored, wrap
minimapcolor = colors.grey minimapcolor = colors.grey
@ -107,14 +107,6 @@ a.nvim_create_autocmd('TermClose', {
command = 'call nvim_input("<CR>")' command = 'call nvim_input("<CR>")'
}) })
-- close terminal buffer in normal mode
a.nvim_create_autocmd('FileType', {
pattern = 'term://*',
callback = function()
vim.keymap.set('n', '<C-d>', '<cmd>q!<CR>', {remap = true, buffer = true})
end
})
-- start git messages in insert mode -- start git messages in insert mode
a.nvim_create_autocmd('FileType', { a.nvim_create_autocmd('FileType', {
group = 'bufcheck', group = 'bufcheck',
@ -142,6 +134,12 @@ a.nvim_create_autocmd('BufRead', {
command = [[call setpos(".", getpos("'\""))]] command = [[call setpos(".", getpos("'\""))]]
}) })
-- disable color column in certain files
a.nvim_create_autocmd('FileType', {
pattern = { 'netrw', "help", "term", "gitcommit", "packer", "vim" },
command = 'set colorcolumn=0'
})
-- source and compile lua conf -- source and compile lua conf
local packer_group = a.nvim_create_augroup('Packer', { clear = true }) local packer_group = a.nvim_create_augroup('Packer', { clear = true })
vim.api.nvim_create_autocmd('BufWritePost', { vim.api.nvim_create_autocmd('BufWritePost', {
@ -181,12 +179,6 @@ a.nvim_set_keymap("n", "N", "Nzzzv", default_opts)
-- execute order 111 -- execute order 111
a.nvim_set_keymap("n", "<leader>x", "<cmd>!chmod +x %<CR>", default_opts) a.nvim_set_keymap("n", "<leader>x", "<cmd>!chmod +x %<CR>", default_opts)
-- Resizing panes
a.nvim_set_keymap("n", '<A-h>', "<cmd>SmartResizeLeft<CR>", default_opts)
a.nvim_set_keymap("n", '<A-j>', "<cmd>SmartResizeDown<CR>", default_opts)
a.nvim_set_keymap("n", '<A-k>', "<cmd>SmartResizeUp<CR>", default_opts)
a.nvim_set_keymap("n", '<A-l>', "<cmd>SmartResizeRight<CR>", default_opts)
-- moving between splits -- moving between splits
a.nvim_set_keymap("n", '<C-h>', "<cmd>SmartCursorMoveLeft<CR>", default_opts) a.nvim_set_keymap("n", '<C-h>', "<cmd>SmartCursorMoveLeft<CR>", default_opts)
a.nvim_set_keymap("n", '<C-j>', "<cmd>SmartCursorMoveDown<CR>", default_opts) a.nvim_set_keymap("n", '<C-j>', "<cmd>SmartCursorMoveDown<CR>", default_opts)
@ -194,7 +186,6 @@ a.nvim_set_keymap("n", '<C-k>', "<cmd>SmartCursorMoveUp<CR>", default_opts)
a.nvim_set_keymap("n", '<C-l>', "<cmd>SmartCursorMoveRight<CR>", default_opts) a.nvim_set_keymap("n", '<C-l>', "<cmd>SmartCursorMoveRight<CR>", default_opts)
-- don't blame me pls -- don't blame me pls
local title = "Nvim"
a.nvim_set_keymap("n", "<C-g>", a.nvim_set_keymap("n", "<C-g>",
":Gitsigns toggle_current_line_blame<CR>", default_opts ":Gitsigns toggle_current_line_blame<CR>", default_opts
) )
@ -489,12 +480,7 @@ return require('packer').startup(function(use)
-- the rest of the plugins -- the rest of the plugins
use 'lukas-reineke/indent-blankline.nvim' use 'lukas-reineke/indent-blankline.nvim'
use { 'lukas-reineke/virt-column.nvim', use 'nvim-lualine/lualine.nvim'
config = function()
require('virt-column').setup()
end
}
use { 'nvim-lualine/lualine.nvim' }
use { 'nvchad/nvim-colorizer.lua', use { 'nvchad/nvim-colorizer.lua',
config = function() config = function()
require('colorizer').setup { require('colorizer').setup {