Add fav keybindings and VimBeGood plugin
This commit is contained in:
		
							parent
							
								
									b115814916
								
							
						
					
					
						commit
						720b7190f6
					
				
							
								
								
									
										32
									
								
								init.lua
								
								
								
								
							
							
						
						
									
										32
									
								
								init.lua
								
								
								
								
							|  | @ -193,13 +193,8 @@ require('lazy').setup({ | ||||||
|     -- Theme inspired by Atom |     -- Theme inspired by Atom | ||||||
|     'navarasu/onedark.nvim', |     'navarasu/onedark.nvim', | ||||||
|     priority = 1000, |     priority = 1000, | ||||||
|     lazy = false, |  | ||||||
|     config = function() |     config = function() | ||||||
|       require('onedark').setup { |       vim.cmd.colorscheme 'onedark' | ||||||
|         -- Set a style preset. 'dark' is default. |  | ||||||
|         style = 'dark', -- dark, darker, cool, deep, warm, warmer, light |  | ||||||
|       } |  | ||||||
|       require('onedark').load() |  | ||||||
|     end, |     end, | ||||||
|   }, |   }, | ||||||
| 
 | 
 | ||||||
|  | @ -210,7 +205,7 @@ require('lazy').setup({ | ||||||
|     opts = { |     opts = { | ||||||
|       options = { |       options = { | ||||||
|         icons_enabled = false, |         icons_enabled = false, | ||||||
|         theme = 'auto', |         theme = 'onedark', | ||||||
|         component_separators = '|', |         component_separators = '|', | ||||||
|         section_separators = '', |         section_separators = '', | ||||||
|       }, |       }, | ||||||
|  | @ -258,6 +253,7 @@ require('lazy').setup({ | ||||||
|     }, |     }, | ||||||
|     build = ':TSUpdate', |     build = ':TSUpdate', | ||||||
|   }, |   }, | ||||||
|  |   { 'ThePrimeagen/vim-be-good' }, | ||||||
| 
 | 
 | ||||||
|   -- 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. | ||||||
|  | @ -315,6 +311,17 @@ vim.o.completeopt = 'menuone,noselect' | ||||||
| -- NOTE: You should make sure your terminal supports this | -- NOTE: You should make sure your terminal supports this | ||||||
| vim.o.termguicolors = true | vim.o.termguicolors = true | ||||||
| 
 | 
 | ||||||
|  | -- my vim keybindings | ||||||
|  | 
 | ||||||
|  | vim.o.nu = true | ||||||
|  | vim.o.relativenumber = true | ||||||
|  | vim.o.tabstop = 2 | ||||||
|  | vim.o.softtabstop = 2 | ||||||
|  | vim.o.shiftwidth = 2 | ||||||
|  | vim.o.expandtab = true | ||||||
|  | 
 | ||||||
|  | vim.o.scrolloff = 10 | ||||||
|  | 
 | ||||||
| -- [[ Basic Keymaps ]] | -- [[ Basic Keymaps ]] | ||||||
| 
 | 
 | ||||||
| -- Keymaps for better default experience | -- Keymaps for better default experience | ||||||
|  | @ -331,6 +338,15 @@ vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnos | ||||||
| vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' }) | vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' }) | ||||||
| vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' }) | vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' }) | ||||||
| 
 | 
 | ||||||
|  | -- my keymaps  | ||||||
|  | -- ctrl u/d and center  | ||||||
|  | vim.keymap.set('n', '<C-d>', '<C-d>zz') | ||||||
|  | vim.keymap.set('n', '<C-u>', '<C-u>zz') | ||||||
|  | 
 | ||||||
|  | -- cursor in middle when search | ||||||
|  | vim.keymap.set('n', 'n', 'nzzzv') | ||||||
|  | vim.keymap.set('n', 'N', 'Nzzzv') | ||||||
|  | 
 | ||||||
| -- [[ Highlight on yank ]] | -- [[ Highlight on yank ]] | ||||||
| -- See `:help vim.highlight.on_yank()` | -- See `:help vim.highlight.on_yank()` | ||||||
| local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true }) | local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true }) | ||||||
|  | @ -428,7 +444,7 @@ vim.keymap.set('n', '<leader>sr', require('telescope.builtin').resume, { desc = | ||||||
| vim.defer_fn(function() | vim.defer_fn(function() | ||||||
|   require('nvim-treesitter.configs').setup { |   require('nvim-treesitter.configs').setup { | ||||||
|     -- Add languages to be installed here that you want installed for treesitter |     -- Add languages to be installed here that you want installed for treesitter | ||||||
|     ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim', 'bash' }, |     ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim', 'bash', 'ruby' }, | ||||||
| 
 | 
 | ||||||
|     -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) |     -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) | ||||||
|     auto_install = false, |     auto_install = false, | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue