From f9325ab469052fea21eb5ed8cdbee80a7c460295 Mon Sep 17 00:00:00 2001 From: Joao P Dubas Date: Fri, 10 Nov 2023 15:04:54 +0000 Subject: [PATCH 1/2] feat(nvim): upgrade kickstart to latest commit --- Dockerfile | 2 +- patch/kickstart.nvim/updates.patch | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index afb82d3..b00fc17 100644 --- a/Dockerfile +++ b/Dockerfile @@ -144,7 +144,7 @@ COPY ./patch/kickstart.nvim/updates.patch /tmp COPY ./config/nvim/lua/custom/plugins/init.lua /tmp RUN git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME}"/nvim \ && cd ${XDG_CONFIG_HOME}/nvim \ - && git reset --hard 9b256d93688b3d295dab89f06faeff741af58a68 \ + && git reset --hard a005f15cec8072c97201f86e15df62c7e4a4490e \ && git apply /tmp/updates.patch \ && cp /tmp/init.lua ${XDG_CONFIG_HOME}/nvim/lua/custom/plugins \ && nvim --headless "+Lazy! sync" +qa diff --git a/patch/kickstart.nvim/updates.patch b/patch/kickstart.nvim/updates.patch index 0ff7dc7..40419cf 100644 --- a/patch/kickstart.nvim/updates.patch +++ b/patch/kickstart.nvim/updates.patch @@ -1,8 +1,8 @@ diff --git a/init.lua b/init.lua -index a7667dd..6bf8654 100644 +index 748e7f8..47e327a 100644 --- a/init.lua +++ b/init.lua -@@ -227,7 +227,7 @@ require('lazy').setup({ +@@ -229,7 +229,7 @@ require('lazy').setup({ -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. -- -- For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins @@ -11,7 +11,7 @@ index a7667dd..6bf8654 100644 }, {}) -- [[ Setting options ]] -@@ -237,11 +237,12 @@ require('lazy').setup({ +@@ -239,11 +239,12 @@ require('lazy').setup({ -- Set highlight on search vim.o.hlsearch = false @@ -27,7 +27,7 @@ index a7667dd..6bf8654 100644 -- Sync clipboard between OS and Neovim. -- Remove this option if you want your OS clipboard to remain independent. -@@ -271,6 +272,14 @@ vim.o.completeopt = 'menuone,noselect' +@@ -273,6 +274,14 @@ vim.o.completeopt = 'menuone,noselect' -- NOTE: You should make sure your terminal supports this vim.o.termguicolors = true @@ -42,7 +42,7 @@ index a7667dd..6bf8654 100644 -- [[ Basic Keymaps ]] -- Keymaps for better default experience -@@ -333,11 +342,29 @@ vim.keymap.set('n', 'sr', require('telescope.builtin').resume, { desc = +@@ -378,11 +387,29 @@ vim.keymap.set('n', 'sr', require('telescope.builtin').resume, { desc = vim.defer_fn(function() require('nvim-treesitter.configs').setup { -- Add languages to be installed here that you want installed for treesitter @@ -75,7 +75,7 @@ index a7667dd..6bf8654 100644 highlight = { enable = true }, indent = { enable = true }, incremental_selection = { -@@ -472,19 +499,24 @@ require('mason-lspconfig').setup() +@@ -511,19 +538,24 @@ require('mason-lspconfig').setup() -- If you want to override the default filetypes that your language server will attach to you can -- define the property 'filetypes' to the map in question. local servers = { -- 2.47.2 From de1b0c6d5f3da2bc592fc87c1e2c76d7a5551ecc Mon Sep 17 00:00:00 2001 From: Joao P Dubas Date: Fri, 10 Nov 2023 15:05:36 +0000 Subject: [PATCH 2/2] chore(nvim): update toggleterm mapping keys --- config/nvim/lua/custom/plugins/init.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/config/nvim/lua/custom/plugins/init.lua b/config/nvim/lua/custom/plugins/init.lua index 27430dc..1c4f7d2 100644 --- a/config/nvim/lua/custom/plugins/init.lua +++ b/config/nvim/lua/custom/plugins/init.lua @@ -86,7 +86,7 @@ return { local status_ok, which_key = pcall(require, 'which-key') if status_ok then which_key.register({ - ['o'] = { name = 'T[o]ggle terminal', _ = 'which_key_ignore' } + ['m'] = { name = 'Toggle ter[m]inal', _ = 'which_key_ignore' } }) end vim.api.nvim_create_autocmd('TermOpen', { @@ -104,10 +104,8 @@ return { end }) return { - { 'oh', 'ToggleTerm direction=horizontal size=' .. tostring(vim.o.lines * 0.3) .. '', desc = 'Open terminal horizontally' }, - { 'oc', 'ToggleTermSendCurrentLine', desc = 'Send current line under the cursor' }, - { 'ov', 'ToggleTermSendVisualLines', desc = 'Send all lines visually selected' }, - { 'os', 'ToggleTermSendVisualSelection', desc = 'Send visually selected text' } + { 'mh', 'ToggleTerm direction=horizontal size=' .. tostring(vim.o.lines * 0.4) .. '', desc = 'Open ter[m]inal [h]orizontally', noremap = true }, + { 'mc', 'ToggleTermSendCurrentLine', desc = 'Send [c]urrent line under the cursor', noremap = true } } end } -- 2.47.2