added cycle keymaps
This commit is contained in:
		
							parent
							
								
									f6d67b69c3
								
							
						
					
					
						commit
						d22c524625
					
				
							
								
								
									
										6
									
								
								init.lua
								
								
								
								
							
							
						
						
									
										6
									
								
								init.lua
								
								
								
								
							| 
						 | 
					@ -199,8 +199,8 @@ require('lazy').setup({
 | 
				
			||||||
  -- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart
 | 
					  -- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart
 | 
				
			||||||
  --       These are some example plugins that I've included in the kickstart repository.
 | 
					  --       These are some example plugins that I've included in the kickstart repository.
 | 
				
			||||||
  --       Uncomment any of the lines below to enable them.
 | 
					  --       Uncomment any of the lines below to enable them.
 | 
				
			||||||
  -- require 'kickstart.plugins.autoformat',
 | 
					  require 'kickstart.plugins.autoformat',
 | 
				
			||||||
  -- require 'kickstart.plugins.debug',
 | 
					  require 'kickstart.plugins.debug',
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
 | 
					  -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
 | 
				
			||||||
  --    You can use this folder to prevent any conflicts with this init.lua if you're interested in keeping
 | 
					  --    You can use this folder to prevent any conflicts with this init.lua if you're interested in keeping
 | 
				
			||||||
| 
						 | 
					@ -208,7 +208,7 @@ require('lazy').setup({
 | 
				
			||||||
  --    Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
 | 
					  --    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
 | 
					  --    For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins
 | 
				
			||||||
  -- { import = 'custom.plugins' },
 | 
					  { import = 'custom.plugins' },
 | 
				
			||||||
}, {})
 | 
					}, {})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- [[ Setting options ]]
 | 
					-- [[ Setting options ]]
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,18 @@
 | 
				
			||||||
 | 
					-- Unless you are still migrating, remove the deprecated commands from v1.x
 | 
				
			||||||
 | 
					vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					return {
 | 
				
			||||||
 | 
					  "nvim-neo-tree/neo-tree.nvim",
 | 
				
			||||||
 | 
					  version = "*",
 | 
				
			||||||
 | 
					  dependencies = {
 | 
				
			||||||
 | 
					    "nvim-lua/plenary.nvim",
 | 
				
			||||||
 | 
					    "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
 | 
				
			||||||
 | 
					    "MunifTanjim/nui.nvim",
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  config = function ()
 | 
				
			||||||
 | 
					    require('neo-tree').setup {}
 | 
				
			||||||
 | 
					  end,
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- The line beneath this is called `modeline`. See `:help modeline`
 | 
				
			||||||
 | 
					-- vim: ts=2 sts=2 sw=2 et
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,103 @@
 | 
				
			||||||
 | 
					return {
 | 
				
			||||||
 | 
					  -- local function map(mode, lhs, rhs, opts)
 | 
				
			||||||
 | 
					  --   local options = { noremap=true, silent=true }
 | 
				
			||||||
 | 
					  --   if opts then
 | 
				
			||||||
 | 
					  --     options = vim.tbl_extend('force', options, opts)
 | 
				
			||||||
 | 
					  --   end
 | 
				
			||||||
 | 
					  --   vim.api.nvim_set_keymap(mode, lhs, rhs, options)
 | 
				
			||||||
 | 
					  -- end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  vim.keymap.set('n', '<leader>ff', ":Telescope find_files<cr>", {}),
 | 
				
			||||||
 | 
					  vim.keymap.set('n', '<leader>fg', ":Telescope live_grep<cr>", {}),
 | 
				
			||||||
 | 
					  vim.keymap.set('n', '<leader>fb', ":Telescope buffers<cr>", {}),
 | 
				
			||||||
 | 
					  vim.keymap.set('n', '<leader>fh', ":Telescope help_tags", {}),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  -- map("n", "<s-h>", ":bn")
 | 
				
			||||||
 | 
					  vim.keymap.set(
 | 
				
			||||||
 | 
					    'n',
 | 
				
			||||||
 | 
					    '<S-h>',
 | 
				
			||||||
 | 
					    ":bp<cr>",
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      buffer = bufnr,
 | 
				
			||||||
 | 
					      desc = '[G]o to [P]revious Buffer'
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  ),
 | 
				
			||||||
 | 
					  -- map("n", "<s-l>", ":bp")
 | 
				
			||||||
 | 
					  vim.keymap.set(
 | 
				
			||||||
 | 
					    'n',
 | 
				
			||||||
 | 
					    '<S-l>',
 | 
				
			||||||
 | 
					    ":bn<cr>",
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      buffer = bufnr,
 | 
				
			||||||
 | 
					      desc = '[G]o to [N]ext Buffer'
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  -- map("n", "<leader>bq", ":Bdelete")
 | 
				
			||||||
 | 
					  -- vim.keymap.set(
 | 
				
			||||||
 | 
					  --   'n',
 | 
				
			||||||
 | 
					  --   '<leader>bq',
 | 
				
			||||||
 | 
					  --   vim.cmd("bdelete"),
 | 
				
			||||||
 | 
					  --   {
 | 
				
			||||||
 | 
					  --     buffer = bufnr,
 | 
				
			||||||
 | 
					  --     desc = '[G]o to [D]elete Buffer'
 | 
				
			||||||
 | 
					  --   }
 | 
				
			||||||
 | 
					  -- ),
 | 
				
			||||||
 | 
					  -- map("n", "<leader>bd", ":bd")
 | 
				
			||||||
 | 
					  -- vim.keymap.set(
 | 
				
			||||||
 | 
					  --   'n',
 | 
				
			||||||
 | 
					  --   '<leader>bd',
 | 
				
			||||||
 | 
					  --   vim.cmd("bd"),
 | 
				
			||||||
 | 
					  --   {
 | 
				
			||||||
 | 
					  --     buffer = bufnr,
 | 
				
			||||||
 | 
					  --     desc = '[G]o to [D]elete Buffer'
 | 
				
			||||||
 | 
					  --   }
 | 
				
			||||||
 | 
					  -- ),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  -- map("n", "<leader>bu", ":bufdo :Bdelete")
 | 
				
			||||||
 | 
					  -- vim.keymap.set(
 | 
				
			||||||
 | 
					  --   'n',
 | 
				
			||||||
 | 
					  --   '<leader>bu',
 | 
				
			||||||
 | 
					  --   vim.cmd("bufdo :bdelete"),
 | 
				
			||||||
 | 
					  --   {
 | 
				
			||||||
 | 
					  --     buffer = bufnr,
 | 
				
			||||||
 | 
					  --     desc = '[G]o to [D]elete Buffer'
 | 
				
			||||||
 | 
					  --   }
 | 
				
			||||||
 | 
					  -- ),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  -- -- map("n", "<leader>bo", "func("buf_only_window_only")
 | 
				
			||||||
 | 
					  -- vim.keymap.set(
 | 
				
			||||||
 | 
					  --   'n',
 | 
				
			||||||
 | 
					  --   '<leader>bo',
 | 
				
			||||||
 | 
					  --   vim.call("buf_only_window_only"),
 | 
				
			||||||
 | 
					  --   {
 | 
				
			||||||
 | 
					  --     buffer = bufnr,
 | 
				
			||||||
 | 
					  --     desc = '[G]o to [D]elete Buffer'
 | 
				
			||||||
 | 
					  --   }
 | 
				
			||||||
 | 
					  -- ),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  -- map("n", "<leader>be", ":new")
 | 
				
			||||||
 | 
					  -- vim.keymap.set(
 | 
				
			||||||
 | 
					  --   'n',
 | 
				
			||||||
 | 
					  --   '<leader>be',
 | 
				
			||||||
 | 
					  --   vim.cmd("new"),
 | 
				
			||||||
 | 
					  --   {
 | 
				
			||||||
 | 
					  --     buffer = bufnr,
 | 
				
			||||||
 | 
					  --     desc = '[G]o to [D]elete Buffer'
 | 
				
			||||||
 | 
					  --   }
 | 
				
			||||||
 | 
					  -- )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  -- -- map("n", "<bs>", func("load_previous_buffer"))
 | 
				
			||||||
 | 
					  -- vim.keymap.set(
 | 
				
			||||||
 | 
					  --   'n',
 | 
				
			||||||
 | 
					  --   '<leader>be',
 | 
				
			||||||
 | 
					  --   vim.cmd("load_previous_buffer"),
 | 
				
			||||||
 | 
					  --   {
 | 
				
			||||||
 | 
					  --     buffer = bufnr,
 | 
				
			||||||
 | 
					  --     desc = '[G]o to [D]elete Buffer'
 | 
				
			||||||
 | 
					  --   }
 | 
				
			||||||
 | 
					  -- )
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- The line beneath this is called `modeline`. See `:help modeline`
 | 
				
			||||||
 | 
					-- vim: ts=2 sts=2 sw=2 et
 | 
				
			||||||
		Loading…
	
		Reference in New Issue