From 5eff1787a91b338f1dbc1eab8cb06fb3e3fa375b Mon Sep 17 00:00:00 2001 From: kanishka-sahoo Date: Fri, 8 Nov 2024 08:50:46 +0530 Subject: [PATCH 1/5] Changed default completion from C-Space to C-y --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 4ce35f4b5c4..9d480c662fc 100644 --- a/init.lua +++ b/init.lua @@ -784,7 +784,7 @@ require('lazy').setup({ -- Accept ([y]es) the completion. -- This will auto-import if your LSP supports it. -- This will expand snippets if the LSP sent a snippet. - [''] = cmp.mapping.confirm { select = true }, + [''] = cmp.mapping.confirm { select = true }, -- If you prefer more traditional completion keymaps, -- you can uncomment the following lines @@ -795,7 +795,7 @@ require('lazy').setup({ -- Manually trigger a completion from nvim-cmp. -- Generally you don't need this, because nvim-cmp will display -- completions whenever it has completion options available. - [''] = cmp.mapping.complete {}, + [' as moving to the right of your snippet expansion. -- So if you have a snippet that's like: From c31b222a8b18766f1dd4b4fecff7b6dc25e53ea5 Mon Sep 17 00:00:00 2001 From: kanishka-sahoo Date: Fri, 8 Nov 2024 09:04:44 +0530 Subject: [PATCH 2/5] Added neotree and keybind to open it --- init.lua | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 9d480c662fc..8f1bc8e1b9a 100644 --- a/init.lua +++ b/init.lua @@ -91,7 +91,7 @@ vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' -- Set to true if you have a Nerd Font installed and selected in the terminal -vim.g.have_nerd_font = false +vim.g.have_nerd_font = true -- [[ Setting options ]] -- See `:help vim.opt` @@ -102,7 +102,7 @@ vim.g.have_nerd_font = false vim.opt.number = true -- You can also add relative line numbers, to help with jumping. -- Experiment for yourself to see if you like it! --- vim.opt.relativenumber = true +vim.opt.relativenumber = true -- Enable mouse mode, can be useful for resizing splits for example! vim.opt.mouse = 'a' @@ -255,6 +255,20 @@ require('lazy').setup({ }, }, }, + -- Add file browser tree to left side + { + 'nvim-neo-tree/neo-tree.nvim', + branch = 'v3.x', + dependencies = { + 'nvim-lua/plenary.nvim', + 'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended + 'MunifTanjim/nui.nvim', + -- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information + }, + config = function() + vim.keymap.set('n', 'e', 'Neotree toggle') + end, + }, -- NOTE: Plugins can also be configured to run Lua code when they are loaded. -- @@ -411,7 +425,6 @@ require('lazy').setup({ vim.keymap.set('n', 'sr', builtin.resume, { desc = '[S]earch [R]esume' }) vim.keymap.set('n', 's.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' }) vim.keymap.set('n', '', builtin.buffers, { desc = '[ ] Find existing buffers' }) - -- Slightly advanced example of overriding default behavior and theme vim.keymap.set('n', '/', function() -- You can pass additional configuration to Telescope to change the theme, layout, etc. From 6688e75c9286932f88bf8811e85085d40d7f3d16 Mon Sep 17 00:00:00 2001 From: kanishka-sahoo Date: Fri, 8 Nov 2024 09:16:48 +0530 Subject: [PATCH 3/5] Changed the lazy loading properties of some plugins --- init.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 8f1bc8e1b9a..4c8ca85eeaf 100644 --- a/init.lua +++ b/init.lua @@ -265,6 +265,7 @@ require('lazy').setup({ 'MunifTanjim/nui.nvim', -- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information }, + event = 'UIEnter', config = function() vim.keymap.set('n', 'e', 'Neotree toggle') end, @@ -287,7 +288,7 @@ require('lazy').setup({ { -- Useful plugin to show you pending keybinds. 'folke/which-key.nvim', - event = 'VimEnter', -- Sets the loading event to 'VimEnter' + event = 'UIEnter', -- Sets the loading event to 'VimEnter' opts = { icons = { -- set icon mappings to true if you have a Nerd Font @@ -348,7 +349,7 @@ require('lazy').setup({ { -- Fuzzy Finder (files, lsp, etc) 'nvim-telescope/telescope.nvim', - event = 'VimEnter', + event = 'UIEnter', branch = '0.1.x', dependencies = { 'nvim-lua/plenary.nvim', From 4d350610cb0756ef4104ba416f3554f6036cb25c Mon Sep 17 00:00:00 2001 From: kanishka-sahoo Date: Fri, 8 Nov 2024 10:02:45 +0530 Subject: [PATCH 4/5] revert commits --- init.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 4c8ca85eeaf..faf9c152f77 100644 --- a/init.lua +++ b/init.lua @@ -19,7 +19,6 @@ ======== ======== ===================================================================== ===================================================================== - What is Kickstart? Kickstart.nvim is *not* a distribution. @@ -798,7 +797,7 @@ require('lazy').setup({ -- Accept ([y]es) the completion. -- This will auto-import if your LSP supports it. -- This will expand snippets if the LSP sent a snippet. - [''] = cmp.mapping.confirm { select = true }, + [' as moving to the right of your snippet expansion. -- So if you have a snippet that's like: From b6987c58c1cec6b73c245bb3c735c752a2c6424a Mon Sep 17 00:00:00 2001 From: kanishka-sahoo Date: Fri, 8 Nov 2024 12:20:10 +0530 Subject: [PATCH 5/5] Changed theme to catppuccin --- init.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/init.lua b/init.lua index faf9c152f77..90efa3733f6 100644 --- a/init.lua +++ b/init.lua @@ -797,13 +797,13 @@ require('lazy').setup({ -- Accept ([y]es) the completion. -- This will auto-import if your LSP supports it. -- This will expand snippets if the LSP sent a snippet. - [''] = cmp.mapping.confirm { select = true }, -- If you prefer more traditional completion keymaps, -- you can uncomment the following lines - --[''] = cmp.mapping.confirm { select = true }, - --[''] = cmp.mapping.select_next_item(), - --[''] = cmp.mapping.select_prev_item(), + [''] = cmp.mapping.confirm { select = true }, + [''] = cmp.mapping.select_next_item(), + [''] = cmp.mapping.select_prev_item(), -- Manually trigger a completion from nvim-cmp. -- Generally you don't need this, because nvim-cmp will display @@ -851,13 +851,13 @@ require('lazy').setup({ -- change the command in the config to whatever the name of that colorscheme is. -- -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`. - 'folke/tokyonight.nvim', + 'catppuccin/nvim', priority = 1000, -- Make sure to load this before all the other start plugins. init = function() -- Load the colorscheme here. -- Like many other themes, this one has different styles, and you could load -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. - vim.cmd.colorscheme 'tokyonight-night' + vim.cmd.colorscheme 'catppuccin-mocha' -- You can configure highlights by doing something like: vim.cmd.hi 'Comment gui=none'