From 127924ccb4da0f4a9989a786d3044ac65ce4359b Mon Sep 17 00:00:00 2001 From: Squibid Date: Fri, 23 Dec 2022 21:10:04 -0500 Subject: more changes mostly qol and cleaning --- init.lua | 36 +++++++++++------------------------- 1 file changed, 11 insertions(+), 25 deletions(-) (limited to 'init.lua') diff --git a/init.lua b/init.lua index 4d14b2d..e2f4967 100644 --- a/init.lua +++ b/init.lua @@ -30,10 +30,6 @@ o.tabstop = 2 o.shiftwidth = 2 o.softtabstop = -1 -- If negative, shiftwidth value is used --- width line -o.colorcolumn = { 80 } -vim.cmd('highlight ColorColumn ctermbg=0 guibg=lightgrey') - -- colors o.termguicolors = true vim.cmd('colorscheme jellybeans-nvim') @@ -52,6 +48,10 @@ local colors = { purple = '#C678DD', } +-- width line +o.colorcolumn = { 80 } +a.nvim_set_hl(0, "ColorColumn", { bg = colors.grey }) + -- custom opts tablines = 'colored' -- false, colored, wrap minimapcolor = colors.grey @@ -107,14 +107,6 @@ a.nvim_create_autocmd('TermClose', { command = 'call nvim_input("")' }) --- close terminal buffer in normal mode -a.nvim_create_autocmd('FileType', { - pattern = 'term://*', - callback = function() - vim.keymap.set('n', '', 'q!', {remap = true, buffer = true}) - end -}) - -- start git messages in insert mode a.nvim_create_autocmd('FileType', { group = 'bufcheck', @@ -142,6 +134,12 @@ a.nvim_create_autocmd('BufRead', { 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 local packer_group = a.nvim_create_augroup('Packer', { clear = true }) vim.api.nvim_create_autocmd('BufWritePost', { @@ -181,12 +179,6 @@ a.nvim_set_keymap("n", "N", "Nzzzv", default_opts) -- execute order 111 a.nvim_set_keymap("n", "x", "!chmod +x %", default_opts) --- Resizing panes -a.nvim_set_keymap("n", '', "SmartResizeLeft", default_opts) -a.nvim_set_keymap("n", '', "SmartResizeDown", default_opts) -a.nvim_set_keymap("n", '', "SmartResizeUp", default_opts) -a.nvim_set_keymap("n", '', "SmartResizeRight", default_opts) - -- moving between splits a.nvim_set_keymap("n", '', "SmartCursorMoveLeft", default_opts) a.nvim_set_keymap("n", '', "SmartCursorMoveDown", default_opts) @@ -194,7 +186,6 @@ a.nvim_set_keymap("n", '', "SmartCursorMoveUp", default_opts) a.nvim_set_keymap("n", '', "SmartCursorMoveRight", default_opts) -- don't blame me pls -local title = "Nvim" a.nvim_set_keymap("n", "", ":Gitsigns toggle_current_line_blame", default_opts ) @@ -489,12 +480,7 @@ return require('packer').startup(function(use) -- the rest of the plugins use 'lukas-reineke/indent-blankline.nvim' - use { 'lukas-reineke/virt-column.nvim', - config = function() - require('virt-column').setup() - end - } - use { 'nvim-lualine/lualine.nvim' } + use 'nvim-lualine/lualine.nvim' use { 'nvchad/nvim-colorizer.lua', config = function() require('colorizer').setup { -- cgit v1.2.1