feat(nvim): uprade kickstart.nvim #14

Merged
joao.dubas merged 2 commits from jpd-upgrade-nvim-kickstart into main 2023-11-10 15:07:53 +00:00
3 changed files with 10 additions and 12 deletions

View File

@ -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

View File

@ -86,7 +86,7 @@ return {
local status_ok, which_key = pcall(require, 'which-key')
if status_ok then
which_key.register({
['<leader>o'] = { name = 'T[o]ggle terminal', _ = 'which_key_ignore' }
['<leader>m'] = { name = 'Toggle ter[m]inal', _ = 'which_key_ignore' }
})
end
vim.api.nvim_create_autocmd('TermOpen', {
@ -104,10 +104,8 @@ return {
end
})
return {
{ '<leader>oh', '<cmd>ToggleTerm direction=horizontal size=' .. tostring(vim.o.lines * 0.3) .. '<cr>', desc = 'Open terminal horizontally' },
{ '<leader>oc', '<cmd>ToggleTermSendCurrentLine<cr>', desc = 'Send current line under the cursor' },
{ '<leader>ov', '<cmd>ToggleTermSendVisualLines<cr>', desc = 'Send all lines visually selected' },
{ '<leader>os', '<cmd>ToggleTermSendVisualSelection<cr>', desc = 'Send visually selected text' }
{ '<leader>mh', '<cmd>ToggleTerm direction=horizontal size=' .. tostring(vim.o.lines * 0.4) .. '<cr>', desc = 'Open ter[m]inal [h]orizontally', noremap = true },
{ '<leader>mc', '<cmd>ToggleTermSendCurrentLine<cr>', desc = 'Send [c]urrent line under the cursor', noremap = true }
}
end
}

View File

@ -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', '<leader>sr', require('telescope.builtin').resume, { desc =
@@ -378,11 +387,29 @@ vim.keymap.set('n', '<leader>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 = {