Merge branch 'master' into master
This commit is contained in:
		
						commit
						fe02026355
					
				
							
								
								
									
										29
									
								
								README.md
								
								
								
								
							
							
						
						
									
										29
									
								
								README.md
								
								
								
								
							|  | @ -27,6 +27,8 @@ If you are experiencing issues, please make sure you have the latest versions. | |||
| External Requirements: | ||||
| - Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`) | ||||
| - [ripgrep](https://github.com/BurntSushi/ripgrep#installation) | ||||
| - A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons | ||||
|   - if you have it set `vim.g.have_nerd_font` in `init.lua` to true | ||||
| - Language Setup: | ||||
|   - If want to write Typescript, you need `npm` | ||||
|   - If want to write Golang, you will need `go` | ||||
|  | @ -92,8 +94,8 @@ information about extending and exploring Neovim. | |||
| ### 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. | ||||
| (so that you have your own copy that you can modify) and then install. You | ||||
| can install it on 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` | ||||
|  | @ -133,14 +135,11 @@ return { | |||
| <details> | ||||
|   <summary>Adding a file tree plugin</summary> | ||||
| 
 | ||||
| This will install the tree plugin and add the command `:Neotree` for you. You can explore the documentation at [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim) for more information. | ||||
| This will install the tree plugin and add the command `:Neotree` for you. For more information, see the documentation at [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim). | ||||
| 
 | ||||
| In the file: `lua/custom/plugins/filetree.lua`, add: | ||||
| 
 | ||||
| ```lua | ||||
| -- 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 = "*", | ||||
|  | @ -160,10 +159,10 @@ return { | |||
| ### FAQ | ||||
| 
 | ||||
| * What should I do if I already have a pre-existing neovim configuration? | ||||
|   * You should back it up, then delete all files associated with it. | ||||
|   * You should back it up and then delete all associated files. | ||||
|   * This includes your existing init.lua and the neovim files in `~/.local` which can be deleted with `rm -rf ~/.local/share/nvim/` | ||||
| * Can I keep my existing configuration in parallel to kickstart? | ||||
|   * Yes! You can use [NVIM_APPNAME](https://neovim.io/doc/user/starting.html#%24NVIM_APPNAME)`=nvim-NAME` to maintain multiple configurations. For example you can install the kickstart configuration in `~/.config/nvim-kickstart` and create an alias: | ||||
|   * Yes! You can use [NVIM_APPNAME](https://neovim.io/doc/user/starting.html#%24NVIM_APPNAME)`=nvim-NAME` to maintain multiple configurations. For example, you can install the kickstart configuration in `~/.config/nvim-kickstart` and create an alias: | ||||
|     ``` | ||||
|     alias nvim-kickstart='NVIM_APPNAME="nvim-kickstart" nvim' | ||||
|     ``` | ||||
|  | @ -172,9 +171,9 @@ return { | |||
|   * See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information | ||||
| * Why is the kickstart `init.lua` a single file? Wouldn't it make sense to split it into multiple files? | ||||
|   * The main purpose of kickstart is to serve as a teaching tool and a reference | ||||
|     configuration that someone can easily `git clone` as a basis for their own. | ||||
|     configuration that someone can easily use to `git clone` as a basis for their own. | ||||
|     As you progress in learning Neovim and Lua, you might consider splitting `init.lua` | ||||
|     into smaller parts. A fork of kickstart that does this while maintaining the exact | ||||
|     into smaller parts. A fork of kickstart that does this while maintaining the  | ||||
|     same functionality is available here: | ||||
|     * [kickstart-modular.nvim](https://github.com/dam9000/kickstart-modular.nvim) | ||||
|   * Discussions on this topic can be found here: | ||||
|  | @ -183,19 +182,19 @@ return { | |||
| 
 | ||||
| ### Windows Installation | ||||
| 
 | ||||
| Installation may require installing build tools, and updating the run command for `telescope-fzf-native` | ||||
| Installation may require installing build tools and updating the run command for `telescope-fzf-native` | ||||
| 
 | ||||
| See `telescope-fzf-native` documentation for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation) | ||||
| 
 | ||||
| This requires: | ||||
| 
 | ||||
| - Install CMake, and the Microsoft C++ Build Tools on Windows | ||||
| - Install CMake and the Microsoft C++ Build Tools on Windows | ||||
| 
 | ||||
| ```lua | ||||
| {'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' } | ||||
| ``` | ||||
| 
 | ||||
| Alternatively one can install gcc and make which don't require changing the config, | ||||
| Alternatively, one can install gcc and make which don't require changing the config, | ||||
| the easiest way is to use choco: | ||||
| 
 | ||||
| 1. install [chocolatey](https://chocolatey.org/install) | ||||
|  | @ -206,9 +205,9 @@ winget install --accept-source-agreements chocolatey.chocolatey | |||
| ``` | ||||
| 
 | ||||
| 2. install all requirements using choco, exit previous cmd and | ||||
| open a new one so that choco path is set, run in cmd as **admin**: | ||||
| open a new one so that choco path is set, and run in cmd as **admin**: | ||||
| ``` | ||||
| choco install -y neovim git ripgrep wget fd unzip gzip mingw make | ||||
| ``` | ||||
| 
 | ||||
| Then continue with the [Install Kickstart](#Install-Kickstart) step. | ||||
| Then, continue with the [Install Kickstart](#Install-Kickstart) step. | ||||
|  |  | |||
							
								
								
									
										54
									
								
								init.lua
								
								
								
								
							
							
						
						
									
										54
									
								
								init.lua
								
								
								
								
							|  | @ -90,6 +90,9 @@ P.S. You can delete this when you're done too. It's your config now! :) | |||
| vim.g.mapleader = ' ' | ||||
| vim.g.maplocalleader = ' ' | ||||
| 
 | ||||
| -- Set to true if you have a Nerd Font installed | ||||
| vim.g.have_nerd_font = false | ||||
| 
 | ||||
| -- [[ Setting options ]] | ||||
| -- See `:help vim.opt` | ||||
| -- NOTE: You can change these options as you wish! | ||||
|  | @ -218,7 +221,7 @@ vim.opt.rtp:prepend(lazypath) | |||
| --    :Lazy update | ||||
| -- | ||||
| -- NOTE: Here is where you install your plugins. | ||||
| require('lazy').setup { | ||||
| require('lazy').setup({ | ||||
|   -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). | ||||
|   'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically | ||||
| 
 | ||||
|  | @ -312,10 +315,8 @@ require('lazy').setup { | |||
|       }, | ||||
|       { 'nvim-telescope/telescope-ui-select.nvim' }, | ||||
| 
 | ||||
|       -- Useful for getting pretty icons, but requires special font. | ||||
|       --  If you already have a Nerd Font, or terminal set up with fallback fonts | ||||
|       --  you can enable this | ||||
|       -- { 'nvim-tree/nvim-web-devicons' } | ||||
|       -- Useful for getting pretty icons, but requires a Nerd Font. | ||||
|       { 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font }, | ||||
|     }, | ||||
|     config = function() | ||||
|       -- Telescope is a fuzzy finder that comes with a lot of different things that | ||||
|  | @ -455,7 +456,7 @@ require('lazy').setup { | |||
| 
 | ||||
|           -- Jump to the definition of the word under your cursor. | ||||
|           --  This is where a variable was first declared, or where a function is defined, etc. | ||||
|           --  To jump back, press <C-T>. | ||||
|           --  To jump back, press <C-t>. | ||||
|           map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition') | ||||
| 
 | ||||
|           -- Find references for the word under your cursor. | ||||
|  | @ -724,9 +725,8 @@ require('lazy').setup { | |||
|     -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme` | ||||
|     -- 'folke/tokyonight.nvim', | ||||
|     'rmehri01/onenord.nvim', | ||||
|     lazy = false, -- make sure we load this during startup if it is your main colorscheme | ||||
|     priority = 1000, -- make sure to load this before all the other start plugins | ||||
|     config = function() | ||||
|     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'. | ||||
|  | @ -765,7 +765,8 @@ require('lazy').setup { | |||
|       --  You could remove this setup call if you don't like it, | ||||
|       --  and try some other statusline plugin | ||||
|       local statusline = require 'mini.statusline' | ||||
|       statusline.setup() | ||||
|       -- set use_icons to true if you have a Nerd Font | ||||
|       statusline.setup { use_icons = vim.g.have_nerd_font } | ||||
| 
 | ||||
|       -- You can configure sections in the statusline by overriding their | ||||
|       -- default behavior. For example, here we set the section for | ||||
|  | @ -783,17 +784,18 @@ require('lazy').setup { | |||
|   { -- Highlight, edit, and navigate code | ||||
|     'nvim-treesitter/nvim-treesitter', | ||||
|     build = ':TSUpdate', | ||||
|     config = function() | ||||
|       -- [[ Configure Treesitter ]] See `:help nvim-treesitter` | ||||
| 
 | ||||
|       ---@diagnostic disable-next-line: missing-fields | ||||
|       require('nvim-treesitter.configs').setup { | ||||
|     opts = { | ||||
|       ensure_installed = { 'bash', 'c', 'html', 'lua', 'markdown', 'vim', 'vimdoc' }, | ||||
|       -- Autoinstall languages that are not installed | ||||
|       auto_install = true, | ||||
|       highlight = { enable = true }, | ||||
|       indent = { enable = true }, | ||||
|       } | ||||
|     }, | ||||
|     config = function(_, opts) | ||||
|       -- [[ Configure Treesitter ]] See `:help nvim-treesitter` | ||||
| 
 | ||||
|       ---@diagnostic disable-next-line: missing-fields | ||||
|       require('nvim-treesitter.configs').setup(opts) | ||||
| 
 | ||||
|       -- There are additional nvim-treesitter modules that you can use to interact | ||||
|       -- with nvim-treesitter. You should go explore a few and see what interests you: | ||||
|  | @ -822,7 +824,27 @@ require('lazy').setup { | |||
|   --  Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. | ||||
|   --    For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins` | ||||
|   { import = 'custom.plugins' }, | ||||
| } | ||||
| }, { | ||||
|   ui = { | ||||
|     -- If you have a Nerd Font, set icons to an empty table which will use the | ||||
|     -- default lazy.nvim defined Nerd Font icons otherwise define a unicode icons table | ||||
|     icons = vim.g.have_nerd_font and {} or { | ||||
|       cmd = '⌘', | ||||
|       config = '🛠', | ||||
|       event = '📅', | ||||
|       ft = '📂', | ||||
|       init = '⚙', | ||||
|       keys = '🗝', | ||||
|       plugin = '🔌', | ||||
|       runtime = '💻', | ||||
|       require = '🌙', | ||||
|       source = '📄', | ||||
|       start = '🚀', | ||||
|       task = '📌', | ||||
|       lazy = '💤 ', | ||||
|     }, | ||||
|   }, | ||||
| }) | ||||
| 
 | ||||
| -- The line beneath this is called `modeline`. See `:help modeline` | ||||
| -- vim: ts=2 sts=2 sw=2 et | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue