diff options
Diffstat (limited to 'lua')
-rw-r--r-- | lua/nv-utils/init.lua (renamed from lua/utils.lua) | 34 | ||||
-rw-r--r-- | lua/settings.lua | 4 |
2 files changed, 36 insertions, 2 deletions
diff --git a/lua/utils.lua b/lua/nv-utils/init.lua index cc5bd855..fff4ded7 100644 --- a/lua/utils.lua +++ b/lua/nv-utils/init.lua @@ -159,6 +159,39 @@ end -- git signs +function function_wrapper.next_hunk() + require('gitsigns').next_hunk() +end + +function function_wrapper.prev_hunk() + require('gitsigns').prev_hunk() +end + +function function_wrapper.stage_hunk() + require('gitsigns').stage_hunk() +end + +function function_wrapper.undo_stage_hunk() + require('gitsigns').undo_stage_hunk() +end + +function function_wrapper.reset_hunk() + require('gitsigns').reset_hunk() +end + +function function_wrapper.reset_buffer() + require('gitsigns').reset_buffer() +end + +function function_wrapper.preview_hunk() + require('gitsigns').preview_hunk() +end + +function function_wrapper.blame_line() + require('gitsigns').blame_line() +end + + -- misc @@ -166,3 +199,4 @@ end -- autocmd BufWritePre *.rs lua vim.lsp.buf.formatting_sync(nil, 1000) return function_wrapper + diff --git a/lua/settings.lua b/lua/settings.lua index b4657987..5c5945cf 100644 --- a/lua/settings.lua +++ b/lua/settings.lua @@ -12,8 +12,8 @@ vim.o.termguicolors=true vim.o.splitright=true --Vertical splits will automatically be to the right vim.o.t_Co="256" --Support 256 colors vim.o.conceallevel=0 --So that I can see `` in markdown files -vim.bo.tabstop=2 --Insert 2 spaces for a tab -vim.bo.shiftwidth=2 --Change the number of space characters inserted for indentation +vim.cmd('set ts=4') --Insert 2 spaces for a tab +vim.cmd('set sw=4') --Change the number of space characters inserted for indentation vim.bo.expandtab=true --Converts tabs to spaces vim.bo.smartindent=true --Makes indenting smart vim.wo.number = true |