update the init.lua configs
This commit is contained in:
		
						commit
						7c84db0234
					
				
							
								
								
									
										58
									
								
								README.md
								
								
								
								
							
							
						
						
									
										58
									
								
								README.md
								
								
								
								
							| 
						 | 
					@ -20,35 +20,45 @@ Distribution Alternatives:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Installation
 | 
					### Installation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* Backup your previous configuration (if any exists)
 | 
					> **NOTE** 
 | 
				
			||||||
 | 
					> [Backup](#FAQ) your previous configuration (if any exists)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Archive Installation
 | 
					Requirements:
 | 
				
			||||||
* On the home/landing page for the project find the blue "<> CODE" button click it and select Local > Download ZIP.
 | 
					* Make sure to review the readmes of the plugins if you are experiencing errors. In particular:
 | 
				
			||||||
* Extract the archive to:
 | 
					  * [ripgrep](https://github.com/BurntSushi/ripgrep#installation) is required for multiple [telescope](https://github.com/nvim-telescope/telescope.nvim#suggested-dependencies) pickers.
 | 
				
			||||||
  `~/.config/nvim` (Linux)
 | 
					* See [Windows Installation](#Windows-Installation) if you have trouble with `telescope-fzf-native`
 | 
				
			||||||
  `~/.config/nvim` (MacOS)
 | 
					 | 
				
			||||||
  `%userprofile%\AppData\Local\nvim\` (Windows)
 | 
					 | 
				
			||||||
* Ensure your extraction method did not extract with a parent folder. For example in ~/.config/nvim you should have init.lua not another folder called kickstart.nvim.
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Git Clone Installation
 | 
					Neovim's configurations are located under the following paths, depending on your OS:
 | 
				
			||||||
* From a terminal cd/dir to:
 | 
					 | 
				
			||||||
    `~/.config/nvim` (Linux)
 | 
					 | 
				
			||||||
    `~/.config/nvim` (MacOS)
 | 
					 | 
				
			||||||
    `%userprofile%\AppData\Local\nvim\` (Windows)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
* Run: `git clone https://github.com/nvim-lua/kickstart.nvim.git ~/.config/nvim` OR: `gh repo clone nvim-lua/kickstart.nvim`
 | 
					| OS | PATH |
 | 
				
			||||||
* Run Neovim (from terminal or shortcut) and allow lazy.nvim to download files and set up the basics.
 | 
					| :- | :--- |
 | 
				
			||||||
* Once the setup is complete, restart Neovim.
 | 
					| Linux | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` |
 | 
				
			||||||
* **You're ready to go!**
 | 
					| MacOS | `$XDG_CONFIG_HOME/nvim`, '~/.config/nvim` |
 | 
				
			||||||
 | 
					| Windows | `%userprofile%\AppData\Local\nvim\` |
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* (Recommended/Optional) Fork this repo (so that you have your own copy that you can modify).
 | 
					Clone kickstart.nvim:
 | 
				
			||||||
* Clone the kickstart repo into `$HOME/.config/nvim/` (Linux/Mac) or `%userprofile%\AppData\Local\nvim\` (Windows)
 | 
					 | 
				
			||||||
  * If you don't want to include it as a git repo, you can just clone it and then move the files to this location
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
Additional system requirements:
 | 
					```sh
 | 
				
			||||||
- Make sure to review the readmes of the plugins if you are experiencing errors. In particular:
 | 
					# on Linux and Mac
 | 
				
			||||||
  - [ripgrep](https://github.com/BurntSushi/ripgrep#installation) is required for multiple [telescope](https://github.com/nvim-telescope/telescope.nvim#suggested-dependencies) pickers.
 | 
					git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim
 | 
				
			||||||
- See [Windows Installation](#Windows-Installation) if you have trouble with `telescope-fzf-native`
 | 
					# on Windows
 | 
				
			||||||
 | 
					git clone https://github.com/nvim-lua/kickstart.nvim.git %userprofile%\AppData\Local\nvim\ 
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Post Installation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Run the following command and then **you are ready to go**!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```sh
 | 
				
			||||||
 | 
					nvim --headless "+Lazy! sync" +qa
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Recommended Steps
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) this repo (so that you have your own copy that you can modify) and then installing you can install to your machine using the methods above.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					> **NOTE**  
 | 
				
			||||||
 | 
					> Your fork's url will be something like this: `https://github.com/<your_github_username>/kickstart.nvim.git`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Configuration And Extension
 | 
					### Configuration And Extension
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										24
									
								
								init.lua
								
								
								
								
							
							
						
						
									
										24
									
								
								init.lua
								
								
								
								
							| 
						 | 
					@ -85,10 +85,27 @@ require('lazy').setup({
 | 
				
			||||||
        changedelete = { text = '~' },
 | 
					        changedelete = { text = '~' },
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      on_attach = function(bufnr)
 | 
					      on_attach = function(bufnr)
 | 
				
			||||||
 | 
					<<<<<<< HEAD
 | 
				
			||||||
        vim.keymap.set('n', '<leader>gp', require('gitsigns').prev_hunk,
 | 
					        vim.keymap.set('n', '<leader>gp', require('gitsigns').prev_hunk,
 | 
				
			||||||
          { buffer = bufnr, desc = '[G]o to [P]revious Hunk' })
 | 
					          { buffer = bufnr, desc = '[G]o to [P]revious Hunk' })
 | 
				
			||||||
        vim.keymap.set('n', '<leader>gn', require('gitsigns').next_hunk, { buffer = bufnr, desc = '[G]o to [N]ext Hunk' })
 | 
					        vim.keymap.set('n', '<leader>gn', require('gitsigns').next_hunk, { buffer = bufnr, desc = '[G]o to [N]ext Hunk' })
 | 
				
			||||||
        vim.keymap.set('n', '<leader>ph', require('gitsigns').preview_hunk, { buffer = bufnr, desc = '[P]review [H]unk' })
 | 
					        vim.keymap.set('n', '<leader>ph', require('gitsigns').preview_hunk, { buffer = bufnr, desc = '[P]review [H]unk' })
 | 
				
			||||||
 | 
					=======
 | 
				
			||||||
 | 
					        vim.keymap.set('n', '<leader>hp', require('gitsigns').preview_hunk, { buffer = bufnr, desc = 'Preview git hunk' })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        -- don't override the built-in and fugitive keymaps
 | 
				
			||||||
 | 
					        local gs = package.loaded.gitsigns
 | 
				
			||||||
 | 
					        vim.keymap.set({'n', 'v'}, ']c', function()
 | 
				
			||||||
 | 
					          if vim.wo.diff then return ']c' end
 | 
				
			||||||
 | 
					          vim.schedule(function() gs.next_hunk() end)
 | 
				
			||||||
 | 
					          return '<Ignore>'
 | 
				
			||||||
 | 
					        end, {expr=true, buffer = bufnr, desc = "Jump to next hunk"})
 | 
				
			||||||
 | 
					        vim.keymap.set({'n', 'v'}, '[c', function()
 | 
				
			||||||
 | 
					          if vim.wo.diff then return '[c' end
 | 
				
			||||||
 | 
					          vim.schedule(function() gs.prev_hunk() end)
 | 
				
			||||||
 | 
					          return '<Ignore>'
 | 
				
			||||||
 | 
					        end, {expr=true, buffer = bufnr, desc = "Jump to previous hunk"})
 | 
				
			||||||
 | 
					>>>>>>> 4b31f8ef9e37f8a02739659a0a505927114c77af
 | 
				
			||||||
      end,
 | 
					      end,
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
| 
						 | 
					@ -332,12 +349,17 @@ vim.keymap.set('n', '<leader>sp', function()
 | 
				
			||||||
end, { desc = '[S]search [P]roject' })
 | 
					end, { desc = '[S]search [P]roject' })
 | 
				
			||||||
vim.keymap.set('n', '<leader>sg', require('telescope.builtin').live_grep, { desc = '[S]earch by [G]rep' })
 | 
					vim.keymap.set('n', '<leader>sg', require('telescope.builtin').live_grep, { desc = '[S]earch by [G]rep' })
 | 
				
			||||||
vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' })
 | 
					vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' })
 | 
				
			||||||
 | 
					vim.keymap.set('n', '<leader>sr', require('telescope.builtin').resume, { desc = '[S]earch [R]resume' })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- [[ Configure Treesitter ]]
 | 
					-- [[ Configure Treesitter ]]
 | 
				
			||||||
-- See `:help nvim-treesitter`
 | 
					-- See `:help nvim-treesitter`
 | 
				
			||||||
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
 | 
				
			||||||
 | 
					<<<<<<< HEAD
 | 
				
			||||||
  ensure_installed = { 'c', 'cpp', 'lua', 'python', 'vimdoc', 'vim' },
 | 
					  ensure_installed = { 'c', 'cpp', 'lua', 'python', 'vimdoc', 'vim' },
 | 
				
			||||||
 | 
					=======
 | 
				
			||||||
 | 
					  ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim' },
 | 
				
			||||||
 | 
					>>>>>>> 4b31f8ef9e37f8a02739659a0a505927114c77af
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  -- 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,
 | 
				
			||||||
| 
						 | 
					@ -427,7 +449,7 @@ local on_attach = function(_, bufnr)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  nmap('gd', vim.lsp.buf.definition, '[G]oto [D]efinition')
 | 
					  nmap('gd', vim.lsp.buf.definition, '[G]oto [D]efinition')
 | 
				
			||||||
  nmap('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
 | 
					  nmap('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
 | 
				
			||||||
  nmap('gI', vim.lsp.buf.implementation, '[G]oto [I]mplementation')
 | 
					  nmap('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation')
 | 
				
			||||||
  nmap('<leader>D', vim.lsp.buf.type_definition, 'Type [D]efinition')
 | 
					  nmap('<leader>D', vim.lsp.buf.type_definition, 'Type [D]efinition')
 | 
				
			||||||
  nmap('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
 | 
					  nmap('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
 | 
				
			||||||
  nmap('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
 | 
					  nmap('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue