diff --git a/init.lua b/init.lua index e2f0b6b6..327d9dbd 100644 --- a/init.lua +++ b/init.lua @@ -880,7 +880,7 @@ require('lazy').setup({ config = function() require('treesitter-context').setup { enable = true, -- Enable this plugin (Can be enabled/disabled later via commands) - max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit. + max_lines = 1, -- How many lines the window should span. Values <= 0 mean no limit. min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit. line_numbers = true, multiline_threshold = 10, -- Maximum number of lines to show for a single context @@ -894,6 +894,10 @@ require('lazy').setup({ } end, }, + { + 'mrjones2014/smart-splits.nvim', + lazy = false, + }, -- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the -- init.lua. If you want these files, they are in the repository, so you can just download them and -- place them in the correct locations. @@ -938,5 +942,19 @@ require('lazy').setup({ }, }) --- The line beneath this is called `modeline`. See `:help modeline` --- vim: ts=2 sts=2 sw=2 et +-- Smart Splits +vim.keymap.set('n', '', require('smart-splits').resize_left) +vim.keymap.set('n', '', require('smart-splits').resize_down) +vim.keymap.set('n', '', require('smart-splits').resize_up) +vim.keymap.set('n', '', require('smart-splits').resize_right) +-- moving between splits +vim.keymap.set('n', '', require('smart-splits').move_cursor_left) +vim.keymap.set('n', '', require('smart-splits').move_cursor_down) +vim.keymap.set('n', '', require('smart-splits').move_cursor_up) +vim.keymap.set('n', '', require('smart-splits').move_cursor_right) +vim.keymap.set('n', '', require('smart-splits').move_cursor_previous) +-- swapping buffers between windows +vim.keymap.set('n', 'h', require('smart-splits').swap_buf_left) +vim.keymap.set('n', 'j', require('smart-splits').swap_buf_down) +vim.keymap.set('n', 'k', require('smart-splits').swap_buf_up) +vim.keymap.set('n', 'l', require('smart-splits').swap_buf_right)