From 0fda6dc3e5e4c9c456d4c16a5d0f0ec081f7355a Mon Sep 17 00:00:00 2001 From: Sean Villars Date: Tue, 4 Jun 2024 15:33:32 -0500 Subject: [PATCH] Add hotkey for adding newlines --- init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index f0101ea5..ef08de9d 100644 --- a/init.lua +++ b/init.lua @@ -168,6 +168,10 @@ vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next [D]iagn vim.keymap.set('n', 'e', vim.diagnostic.open_float, { desc = 'Show diagnostic [E]rror messages' }) vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' }) +-- new line on shift enter +vim.keymap.set('n', '', 'm`o``') +vim.keymap.set('n', '', 'm`O``') + -- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier -- for people to discover. Otherwise, you normally need to press , which -- is not what someone will guess without a bit more experience. @@ -892,7 +896,7 @@ require('lazy').setup({ config = function() require('treesitter-context').setup { enable = true, -- Enable this plugin (Can be enabled/disabled later via commands) - max_lines = 1, -- How many lines the window should span. Values <= 0 mean no limit. + max_lines = 3, -- 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