From 957655ddb8be837a37c8e1fd0dd7f5c49705986e Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy Date: Sat, 1 Jul 2023 12:34:20 -0400 Subject: [PATCH 01/31] Make init.lua copy-paste friendly --- init.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index fd36919c..f8d9383f 100644 --- a/init.lua +++ b/init.lua @@ -197,12 +197,13 @@ require('lazy').setup({ -- require 'kickstart.plugins.autoformat', -- require 'kickstart.plugins.debug', - -- NOTE: The import below automatically adds 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 -- up-to-date with whatever is in the kickstart repo. + -- 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 - { import = 'custom.plugins' }, + -- { import = 'custom.plugins' }, }, {}) -- [[ Setting options ]] From a73b2e5f57059aeff4f6a4cc5ea15f9b012ec9b8 Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy Date: Sat, 1 Jul 2023 11:21:10 -0400 Subject: [PATCH 02/31] =?UTF-8?q?docs:=20Update=20README.md=20=F0=9F=93=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 64f386c6..99914cf1 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # kickstart.nvim +https://github.com/kdheepak/kickstart.nvim/assets/1813121/f3ff9a2b-c31f-44df-a4fa-8a0d7b17cf7b + ### Introduction A starting point for Neovim that is: From 93ef2e8078900d2a19936beb8cd37706cdb7dbdb Mon Sep 17 00:00:00 2001 From: Andres Lowrie Date: Fri, 7 Jul 2023 08:37:12 -0500 Subject: [PATCH 03/31] correct typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hey y'all 👋 I think there may have been a typo? --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 64f386c6..e0b0470a 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ A starting point for Neovim that is: * Documented * Modular -This repo is meant to be used as by **YOU** to begin your Neovim journey; remove the things you don't use and add what you miss. +This repo is meant to be used by **YOU** to begin your Neovim journey; remove the things you don't use and add what you miss. Kickstart.nvim targets *only* the latest ['stable'](https://github.com/neovim/neovim/releases/tag/stable) and latest ['nightly'](https://github.com/neovim/neovim/releases/tag/nightly) of Neovim. If you are experiencing issues, please make sure you have the latest versions. From 31f867a69947f96f7b3ae1a9d49d2a12a3220a8f Mon Sep 17 00:00:00 2001 From: Andrew Stewart Date: Mon, 17 Jul 2023 10:21:44 -0400 Subject: [PATCH 04/31] Remove timeout --- init.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/init.lua b/init.lua index f8d9383f..859d9d2a 100644 --- a/init.lua +++ b/init.lua @@ -239,7 +239,6 @@ vim.wo.signcolumn = 'yes' -- Decrease update time vim.o.updatetime = 250 -vim.o.timeout = true vim.o.timeoutlen = 300 -- Set completeopt to have a better completion experience From 78ab7ee09411676d01138faafc03a3e638d5f560 Mon Sep 17 00:00:00 2001 From: Dennis-Rall <56480601+Dennis-Rall@users.noreply.github.com> Date: Thu, 20 Jul 2023 10:56:15 +0200 Subject: [PATCH 05/31] Add hint to uncomment line to autodetect plugins --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4a128bcf..b38867dd 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ Additional system requirements: * Inside of your copy, feel free to modify any file you like! It's your copy! * Feel free to change any of the default options in `init.lua` to better suit your needs. * For adding plugins, there are 3 primary options: - * Add new configuration in `lua/custom/plugins/*` files, which will be auto sourced using `lazy.nvim` + * Add new configuration in `lua/custom/plugins/*` files, which will be auto sourced using `lazy.nvim` (uncomment line 206 in init.lua therefore) * Modify `init.lua` with additional plugins. * Include the `lua/kickstart/plugins/*` files in your configuration. From c151235551781459fdb60af17c8d5c5f3ee94170 Mon Sep 17 00:00:00 2001 From: Dennis-Rall <56480601+Dennis-Rall@users.noreply.github.com> Date: Thu, 20 Jul 2023 16:42:46 +0200 Subject: [PATCH 06/31] Remove fixed line number and describe line --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b38867dd..ef597600 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ Additional system requirements: * Inside of your copy, feel free to modify any file you like! It's your copy! * Feel free to change any of the default options in `init.lua` to better suit your needs. * For adding plugins, there are 3 primary options: - * Add new configuration in `lua/custom/plugins/*` files, which will be auto sourced using `lazy.nvim` (uncomment line 206 in init.lua therefore) + * Add new configuration in `lua/custom/plugins/*` files, which will be auto sourced using `lazy.nvim` (uncomment the line importing the `custom/plugins` directory in the `init.lua` file to enable this) * Modify `init.lua` with additional plugins. * Include the `lua/kickstart/plugins/*` files in your configuration. From 29aa5bf42df01c6983c5ea7b464e0535de46f628 Mon Sep 17 00:00:00 2001 From: Numkil Date: Mon, 24 Jul 2023 20:41:14 +0200 Subject: [PATCH 07/31] setup more language servers i use + allow customizing filetypes --- init.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 859d9d2a..e5cbed98 100644 --- a/init.lua +++ b/init.lua @@ -424,12 +424,16 @@ end -- -- Add any additional override configuration in the following tables. They will be passed to -- the `settings` field of the server config. You must look up that documentation yourself. +-- +-- If you want to override the default filetypes that your language server will attach to you can +-- define the property 'filetypes' to the map in question. local servers = { -- clangd = {}, -- gopls = {}, -- pyright = {}, -- rust_analyzer = {}, -- tsserver = {}, + -- html = { filetypes = { 'html', 'twig', 'hbs'} }, lua_ls = { Lua = { @@ -459,8 +463,9 @@ mason_lspconfig.setup_handlers { capabilities = capabilities, on_attach = on_attach, settings = servers[server_name], + filetypes = servers[server_name].filetypes, } - end, + end } -- [[ Configure nvim-cmp ]] From 734cc4e94aec64c8cb3504711978c51b092f2542 Mon Sep 17 00:00:00 2001 From: Merel Jossart Date: Tue, 25 Jul 2023 17:06:04 +0200 Subject: [PATCH 08/31] Fix bug when server not explicitely defined in configuration but installed --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index e5cbed98..c6e7a981 100644 --- a/init.lua +++ b/init.lua @@ -463,7 +463,7 @@ mason_lspconfig.setup_handlers { capabilities = capabilities, on_attach = on_attach, settings = servers[server_name], - filetypes = servers[server_name].filetypes, + filetypes = (servers[server_name] or {}).filetypes, } end } From c2fb482ec14041f4537d2269b554818894de7f8e Mon Sep 17 00:00:00 2001 From: Ikko Eltociear Ashimine Date: Mon, 31 Jul 2023 02:46:27 +0900 Subject: [PATCH 09/31] Fix typo in init.lua releated -> related --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index c6e7a981..160d9400 100644 --- a/init.lua +++ b/init.lua @@ -110,7 +110,7 @@ require('lazy').setup({ -- Useful plugin to show you pending keybinds. { 'folke/which-key.nvim', opts = {} }, { - -- Adds git releated signs to the gutter, as well as utilities for managing changes + -- Adds git related signs to the gutter, as well as utilities for managing changes 'lewis6991/gitsigns.nvim', opts = { -- See `:help gitsigns.txt` From b06980a8da1a02f8c123197668998e279c313a5d Mon Sep 17 00:00:00 2001 From: Peter Benjamin Date: Sat, 5 Aug 2023 17:28:18 -0700 Subject: [PATCH 10/31] fix(init): turn telescope-fzf-native into a dependecy --- init.lua | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/init.lua b/init.lua index 160d9400..933f5f16 100644 --- a/init.lua +++ b/init.lua @@ -167,19 +167,24 @@ require('lazy').setup({ { 'numToStr/Comment.nvim', opts = {} }, -- Fuzzy Finder (files, lsp, etc) - { 'nvim-telescope/telescope.nvim', branch = '0.1.x', dependencies = { 'nvim-lua/plenary.nvim' } }, - - -- Fuzzy Finder Algorithm which requires local dependencies to be built. - -- Only load if `make` is available. Make sure you have the system - -- requirements installed. { - 'nvim-telescope/telescope-fzf-native.nvim', - -- NOTE: If you are having trouble with this installation, - -- refer to the README for telescope-fzf-native for more instructions. - build = 'make', - cond = function() - return vim.fn.executable 'make' == 1 - end, + 'nvim-telescope/telescope.nvim', + branch = '0.1.x', + dependencies = { + 'nvim-lua/plenary.nvim' + } + -- Fuzzy Finder Algorithm which requires local dependencies to be built. + -- Only load if `make` is available. Make sure you have the system + -- requirements installed. + { + 'nvim-telescope/telescope-fzf-native.nvim', + -- NOTE: If you are having trouble with this installation, + -- refer to the README for telescope-fzf-native for more instructions. + build = 'make', + cond = function() + return vim.fn.executable 'make' == 1 + end, + }, }, { From 8ee4d24b36334bbf92ae6553baac435687c99969 Mon Sep 17 00:00:00 2001 From: Peter Benjamin Date: Sat, 5 Aug 2023 17:31:01 -0700 Subject: [PATCH 11/31] fix: fix brackets --- init.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/init.lua b/init.lua index 933f5f16..f5389e47 100644 --- a/init.lua +++ b/init.lua @@ -172,18 +172,18 @@ require('lazy').setup({ branch = '0.1.x', dependencies = { 'nvim-lua/plenary.nvim' - } - -- Fuzzy Finder Algorithm which requires local dependencies to be built. - -- Only load if `make` is available. Make sure you have the system - -- requirements installed. - { - 'nvim-telescope/telescope-fzf-native.nvim', - -- NOTE: If you are having trouble with this installation, - -- refer to the README for telescope-fzf-native for more instructions. - build = 'make', - cond = function() - return vim.fn.executable 'make' == 1 - end, + -- Fuzzy Finder Algorithm which requires local dependencies to be built. + -- Only load if `make` is available. Make sure you have the system + -- requirements installed. + { + 'nvim-telescope/telescope-fzf-native.nvim', + -- NOTE: If you are having trouble with this installation, + -- refer to the README for telescope-fzf-native for more instructions. + build = 'make', + cond = function() + return vim.fn.executable 'make' == 1 + end, + }, }, }, From a4ec83a43328232175f5a68bdd188ad4ba8e8981 Mon Sep 17 00:00:00 2001 From: daan Date: Sun, 6 Aug 2023 16:27:05 +0100 Subject: [PATCH 12/31] fix: missing comma --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index f5389e47..1192c463 100644 --- a/init.lua +++ b/init.lua @@ -171,7 +171,7 @@ require('lazy').setup({ 'nvim-telescope/telescope.nvim', branch = '0.1.x', dependencies = { - 'nvim-lua/plenary.nvim' + 'nvim-lua/plenary.nvim', -- Fuzzy Finder Algorithm which requires local dependencies to be built. -- Only load if `make` is available. Make sure you have the system -- requirements installed. From d0b47ce9581499785aab8ed6772128ad67c95a4b Mon Sep 17 00:00:00 2001 From: Smig <89040888+smiggiddy@users.noreply.github.com> Date: Thu, 10 Aug 2023 15:00:15 -0400 Subject: [PATCH 13/31] Update init.lua added a URL to the lua-guide may help others who miss the :help lua-guide --- init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/init.lua b/init.lua index 1192c463..1332c3b9 100644 --- a/init.lua +++ b/init.lua @@ -17,7 +17,9 @@ Kickstart.nvim is a template for your own configuration. a guide. One possible example: - https://learnxinyminutes.com/docs/lua/ + And then you can explore or search through `:help lua-guide` + - https://neovim.io/doc/user/lua-guide.html Kickstart Guide: From 555dd8ed27890ffa29b30921b46614e5cbf21a09 Mon Sep 17 00:00:00 2001 From: Erik Date: Sat, 19 Aug 2023 13:38:31 +0200 Subject: [PATCH 14/31] Fix typo in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ef597600..4a312bc9 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Distribution Alternatives: `~/.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` +* Run: `git clone https://github.com/nvim-lua/kickstart.nvim.git ~/.config/nvim` OR: `gh repo clone nvim-lua/kickstart.nvim` * 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. * **You're ready to go!** From f00ff6f6ab6a94e3d49b2e8efa94eed855bc6623 Mon Sep 17 00:00:00 2001 From: "E. Aakash" <09e.aakash@gmail.com> Date: Sun, 20 Aug 2023 14:43:34 +0530 Subject: [PATCH 15/31] Use telescope for goto implementation --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 1332c3b9..7eb1d231 100644 --- a/init.lua +++ b/init.lua @@ -403,7 +403,7 @@ local on_attach = function(_, bufnr) nmap('gd', vim.lsp.buf.definition, '[G]oto [D]efinition') 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_implementaitons, '[G]oto [I]mplementation') nmap('D', vim.lsp.buf.type_definition, 'Type [D]efinition') nmap('ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols') nmap('ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols') From 1283a0bbe7424b44a38dc983f1ba0fbe33e80978 Mon Sep 17 00:00:00 2001 From: Chris Patti Date: Mon, 21 Aug 2023 17:19:13 -0400 Subject: [PATCH 16/31] Update init.lua Fix typo in original. Co-authored-by: Luis G Estrades --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 7eb1d231..d9967930 100644 --- a/init.lua +++ b/init.lua @@ -403,7 +403,7 @@ local on_attach = function(_, bufnr) nmap('gd', vim.lsp.buf.definition, '[G]oto [D]efinition') nmap('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences') - nmap('gI', require('telescope.builtin').lsp_implementaitons, '[G]oto [I]mplementation') + nmap('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation') nmap('D', vim.lsp.buf.type_definition, 'Type [D]efinition') nmap('ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols') nmap('ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols') From 38a0f0323196c406e6e81d52052b2ac213bfe709 Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Tue, 22 Aug 2023 07:17:15 +0300 Subject: [PATCH 17/31] Revert gitsigns keymaps but fix vimdiff and fugitive conflict Originally, the keymaps for jumping to next and previous git hunks were ]c and [c. This was changed in #323 (83b65a1) because they overwrote the built-in vimdiff keymaps. However, the more traditional solution is to have ]c and [c *extend* the built-in keymap. This is what fugitive and gitgutter have been doing for years. Gitsigns doesn't do this by itself, but it has a recommended keymap configuration on which the present patch is based: https://github.com/lewis6991/gitsigns.nvim#keymaps The only thing I've added is to have the keymaps work in visual mode as well, which is the same behavior as the built in vimdiff keymaps. --- init.lua | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 1332c3b9..8c213667 100644 --- a/init.lua +++ b/init.lua @@ -124,9 +124,20 @@ require('lazy').setup({ changedelete = { text = '~' }, }, on_attach = function(bufnr) - vim.keymap.set('n', 'gp', require('gitsigns').prev_hunk, { buffer = bufnr, desc = '[G]o to [P]revious Hunk' }) - vim.keymap.set('n', 'gn', require('gitsigns').next_hunk, { buffer = bufnr, desc = '[G]o to [N]ext Hunk' }) - vim.keymap.set('n', 'ph', require('gitsigns').preview_hunk, { buffer = bufnr, desc = '[P]review [H]unk' }) + vim.keymap.set('n', '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 '' + 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 '' + end, {expr=true, buffer = bufnr, desc = "Jump to previous hunk"}) end, }, }, From a347bb401e53e3c89ff7cc484c44864af5edcae1 Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Sun, 27 Aug 2023 06:48:22 +0300 Subject: [PATCH 18/31] treesitter: ensure 'javascript' installed along with typescript and tsx This parser is actually needed for some *JSX* parsing, and since typescript and tsx are already getting installed, it makes sense to also install the javascript parser. --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 1332c3b9..ad993ea7 100644 --- a/init.lua +++ b/init.lua @@ -313,7 +313,7 @@ vim.keymap.set('n', 'sd', require('telescope.builtin').diagnostics, { de -- See `:help nvim-treesitter` require('nvim-treesitter.configs').setup { -- Add languages to be installed here that you want installed for treesitter - ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'vimdoc', 'vim' }, + ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim' }, -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) auto_install = false, From ac9b167860479982feddf9795c24165d75f1847b Mon Sep 17 00:00:00 2001 From: Dilshod Temirkhodjaev Date: Mon, 4 Sep 2023 17:36:28 +0500 Subject: [PATCH 19/31] Add telescope search resume key binding --- init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/init.lua b/init.lua index ad993ea7..be651546 100644 --- a/init.lua +++ b/init.lua @@ -308,6 +308,7 @@ vim.keymap.set('n', 'sh', require('telescope.builtin').help_tags, { desc vim.keymap.set('n', 'sw', require('telescope.builtin').grep_string, { desc = '[S]earch current [W]ord' }) vim.keymap.set('n', 'sg', require('telescope.builtin').live_grep, { desc = '[S]earch by [G]rep' }) vim.keymap.set('n', 'sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' }) +vim.keymap.set('n', 'sr', require('telescope.builtin').resume, { desc = '[S]earch [R]resume' }) -- [[ Configure Treesitter ]] -- See `:help nvim-treesitter` From f3f6a595a27af4a1762d5623ca9e8ce49b02e915 Mon Sep 17 00:00:00 2001 From: Luca Saccarola Date: Tue, 5 Sep 2023 14:12:56 +0200 Subject: [PATCH 20/31] docs: restructure README --- README.md | 65 +++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 4a312bc9..963883d4 100644 --- a/README.md +++ b/README.md @@ -20,35 +20,52 @@ Distribution Alternatives: ### Installation -* Backup your previous configuration (if any exists) +> **NOTE** +> [Backup](#FAQ) your previous configuration (if any exists) -### Archive Installation -* On the home/landing page for the project find the blue "<> CODE" button click it and select Local > Download ZIP. -* Extract the archive to: - `~/.config/nvim` (Linux) - `~/.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. +Requirements: +* Make sure to review the readmes of the plugins if you are experiencing errors. In particular: + * [ripgrep](https://github.com/BurntSushi/ripgrep#installation) is required for multiple [telescope](https://github.com/nvim-telescope/telescope.nvim#suggested-dependencies) pickers. +* See [Windows Installation](#Windows-Installation) if you have trouble with `telescope-fzf-native` -### Git Clone Installation -* From a terminal cd/dir to: - `~/.config/nvim` (Linux) - `~/.config/nvim` (MacOS) - `%userprofile%\AppData\Local\nvim\` (Windows) +Neovim's configurations are located under the following paths, depending on your OS: -* Run: `git clone https://github.com/nvim-lua/kickstart.nvim.git ~/.config/nvim` OR: `gh repo clone nvim-lua/kickstart.nvim` -* 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. -* **You're ready to go!** +| OS | PATH | +| :- | :--- | +| Linux | `~/.config/nvim` | +| MacOS | `~/.config/nvim` | +| Windows | `%userprofile%\AppData\Local\nvim\` | -* (Recommended/Optional) Fork this repo (so that you have your own copy that you can modify). -* 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 +#### Archive Installation -Additional system requirements: -- Make sure to review the readmes of the plugins if you are experiencing errors. In particular: - - [ripgrep](https://github.com/BurntSushi/ripgrep#installation) is required for multiple [telescope](https://github.com/nvim-telescope/telescope.nvim#suggested-dependencies) pickers. -- See [Windows Installation](#Windows-Installation) if you have trouble with `telescope-fzf-native` +* On the home/landing page for the project find the green "`<> CODE`" button click it and select `Local > Download ZIP`. +* Extract the archive to the appropriate configuration path. +* 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 + +From a terminal `cd`/`dir` to the configuration path and then run: + +```sh +git clone https://github.com/nvim-lua/kickstart.nvim.git ~/.config/nvim +# OR +gh repo clone nvim-lua/kickstart.nvim +``` + +### Post Installation + +Run the following command and then **you are ready to go**! + +```sh +nvim --headless "+Lazy! sync" +qa +``` + +### Recommended Optional + +[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//kickstart.nvim.git` ### Configuration And Extension From 24885f24831434425145ae5c998cc25f00ffdc52 Mon Sep 17 00:00:00 2001 From: Luca Saccarola Date: Thu, 7 Sep 2023 18:36:05 +0200 Subject: [PATCH 21/31] docs: remove archive installation --- README.md | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 963883d4..49fa0f31 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Distribution Alternatives: ### Installation -> **NOTE** +> **NOTE** > [Backup](#FAQ) your previous configuration (if any exists) Requirements: @@ -32,24 +32,17 @@ Neovim's configurations are located under the following paths, depending on your | OS | PATH | | :- | :--- | -| Linux | `~/.config/nvim` | -| MacOS | `~/.config/nvim` | +| Linux | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` | +| MacOS | `$XDG_CONFIG_HOME/nvim`, '~/.config/nvim` | | Windows | `%userprofile%\AppData\Local\nvim\` | -#### Archive Installation - -* On the home/landing page for the project find the green "`<> CODE`" button click it and select `Local > Download ZIP`. -* Extract the archive to the appropriate configuration path. -* 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 - -From a terminal `cd`/`dir` to the configuration path and then run: +Clone kickstart.nvim: ```sh -git clone https://github.com/nvim-lua/kickstart.nvim.git ~/.config/nvim -# OR -gh repo clone nvim-lua/kickstart.nvim +# on Linux and Mac +git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim +# on Windows +git clone https://github.com/nvim-lua/kickstart.nvim.git %userprofile%\AppData\Local\nvim\ ``` ### Post Installation @@ -60,7 +53,7 @@ Run the following command and then **you are ready to go**! nvim --headless "+Lazy! sync" +qa ``` -### Recommended Optional +### 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. From 8443853cfece1763a2cd9ef677fdf6e80a590bbd Mon Sep 17 00:00:00 2001 From: Christopher Gillis <771603+Chris-Gillis@users.noreply.github.com> Date: Sat, 23 Sep 2023 12:10:51 -0400 Subject: [PATCH 22/31] Remove extra "r" Search Resume description --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index ea330eb1..cec3084e 100644 --- a/init.lua +++ b/init.lua @@ -319,7 +319,7 @@ vim.keymap.set('n', 'sh', require('telescope.builtin').help_tags, { desc vim.keymap.set('n', 'sw', require('telescope.builtin').grep_string, { desc = '[S]earch current [W]ord' }) vim.keymap.set('n', 'sg', require('telescope.builtin').live_grep, { desc = '[S]earch by [G]rep' }) vim.keymap.set('n', 'sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' }) -vim.keymap.set('n', 'sr', require('telescope.builtin').resume, { desc = '[S]earch [R]resume' }) +vim.keymap.set('n', 'sr', require('telescope.builtin').resume, { desc = '[S]earch [R]esume' }) -- [[ Configure Treesitter ]] -- See `:help nvim-treesitter` From 0340f772007d8a2fcca0cb172c0fc9b17ec33ea3 Mon Sep 17 00:00:00 2001 From: tcld Date: Sun, 24 Sep 2023 10:24:33 +0200 Subject: [PATCH 23/31] Add documentation for custom which-key groups --- init.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/init.lua b/init.lua index cec3084e..6f8f7146 100644 --- a/init.lua +++ b/init.lua @@ -438,6 +438,17 @@ local on_attach = function(_, bufnr) end, { desc = 'Format current buffer with LSP' }) end +-- document existing key chains +require('which-key').register({ + ['c'] = { name = '[C]ode', _ = 'which_key_ignore' }, + ['d'] = { name = '[D]ocument', _ = 'which_key_ignore' }, + ['g'] = { name = '[G]it', _ = 'which_key_ignore' }, + ['h'] = { name = 'More git', _ = 'which_key_ignore' }, + ['r'] = { name = '[R]ename', _ = 'which_key_ignore' }, + ['s'] = { name = '[S]earch', _ = 'which_key_ignore' }, + ['w'] = { name = '[W]orkspace', _ = 'which_key_ignore' }, +}) + -- Enable the following language servers -- Feel free to add/remove any LSPs that you want here. They will automatically be installed. -- From aff064f714a701a565332d1e8758ab317387c1c9 Mon Sep 17 00:00:00 2001 From: Anthony Fiddes <11233666+Anthony-Fiddes@users.noreply.github.com> Date: Wed, 27 Sep 2023 16:44:03 -0700 Subject: [PATCH 24/31] Remove lazy-lock.json from .gitignore --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index ea93edad..d699e1d6 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,3 @@ tags test.sh .luarc.json nvim -lazy-lock.json From 878ec12318c675caaa3055b60c54294206fda9fd Mon Sep 17 00:00:00 2001 From: Emmanuel Chucks <31349069+emmanuelchucks@users.noreply.github.com> Date: Thu, 28 Sep 2023 05:57:53 +0000 Subject: [PATCH 25/31] fix(init.lua): indent blankline v3 setup --- init.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index cec3084e..8ec8d54e 100644 --- a/init.lua +++ b/init.lua @@ -170,10 +170,12 @@ require('lazy').setup({ 'lukas-reineke/indent-blankline.nvim', -- Enable `lukas-reineke/indent-blankline.nvim` -- See `:help indent_blankline.txt` - opts = { - char = '┊', - show_trailing_blankline_indent = false, - }, + config = function() + require('ibl').setup { + char = '┊', + show_trailing_blankline_indent = false, + } + end, }, -- "gc" to comment visual regions/lines From 7a58588a92f3b0c7c0d8ff92ce6ff278f6092d93 Mon Sep 17 00:00:00 2001 From: Lukas Reineke Date: Thu, 28 Sep 2023 23:11:05 +0900 Subject: [PATCH 26/31] fix: fix indent-blankline config --- init.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/init.lua b/init.lua index 8ec8d54e..3a00dea2 100644 --- a/init.lua +++ b/init.lua @@ -170,12 +170,8 @@ require('lazy').setup({ 'lukas-reineke/indent-blankline.nvim', -- Enable `lukas-reineke/indent-blankline.nvim` -- See `:help indent_blankline.txt` - config = function() - require('ibl').setup { - char = '┊', - show_trailing_blankline_indent = false, - } - end, + main = "ibl", + opts = {}, }, -- "gc" to comment visual regions/lines From 4d5f24d6c1ecd1c77aded7fc4e59a329d27509b8 Mon Sep 17 00:00:00 2001 From: Ashraf Michail Date: Sat, 30 Sep 2023 00:35:22 +0000 Subject: [PATCH 27/31] Defer Treesitter setup to improve startup time of nvim {filename} --- init.lua | 113 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 58 insertions(+), 55 deletions(-) diff --git a/init.lua b/init.lua index 52571130..e5bc576e 100644 --- a/init.lua +++ b/init.lua @@ -321,69 +321,72 @@ vim.keymap.set('n', 'sr', require('telescope.builtin').resume, { desc = -- [[ Configure Treesitter ]] -- See `:help nvim-treesitter` -require('nvim-treesitter.configs').setup { - -- 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' }, - - -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) - auto_install = false, - - highlight = { enable = true }, - indent = { enable = true }, - incremental_selection = { - enable = true, - keymaps = { - init_selection = '', - node_incremental = '', - scope_incremental = '', - node_decremental = '', - }, - }, - textobjects = { - select = { +-- Defer Treesitter setup after first render to improve startup time of 'nvim {filename}' +vim.defer_fn(function() + require('nvim-treesitter.configs').setup { + -- 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' }, + + -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) + auto_install = false, + + highlight = { enable = true }, + indent = { enable = true }, + incremental_selection = { enable = true, - lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim keymaps = { - -- You can use the capture groups defined in textobjects.scm - ['aa'] = '@parameter.outer', - ['ia'] = '@parameter.inner', - ['af'] = '@function.outer', - ['if'] = '@function.inner', - ['ac'] = '@class.outer', - ['ic'] = '@class.inner', + init_selection = '', + node_incremental = '', + scope_incremental = '', + node_decremental = '', }, }, - move = { - enable = true, - set_jumps = true, -- whether to set jumps in the jumplist - goto_next_start = { - [']m'] = '@function.outer', - [']]'] = '@class.outer', + textobjects = { + select = { + enable = true, + lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim + keymaps = { + -- You can use the capture groups defined in textobjects.scm + ['aa'] = '@parameter.outer', + ['ia'] = '@parameter.inner', + ['af'] = '@function.outer', + ['if'] = '@function.inner', + ['ac'] = '@class.outer', + ['ic'] = '@class.inner', + }, }, - goto_next_end = { - [']M'] = '@function.outer', - [']['] = '@class.outer', + move = { + enable = true, + set_jumps = true, -- whether to set jumps in the jumplist + goto_next_start = { + [']m'] = '@function.outer', + [']]'] = '@class.outer', + }, + goto_next_end = { + [']M'] = '@function.outer', + [']['] = '@class.outer', + }, + goto_previous_start = { + ['[m'] = '@function.outer', + ['[['] = '@class.outer', + }, + goto_previous_end = { + ['[M'] = '@function.outer', + ['[]'] = '@class.outer', + }, }, - goto_previous_start = { - ['[m'] = '@function.outer', - ['[['] = '@class.outer', - }, - goto_previous_end = { - ['[M'] = '@function.outer', - ['[]'] = '@class.outer', + swap = { + enable = true, + swap_next = { + ['a'] = '@parameter.inner', + }, + swap_previous = { + ['A'] = '@parameter.inner', + }, }, }, - swap = { - enable = true, - swap_next = { - ['a'] = '@parameter.inner', - }, - swap_previous = { - ['A'] = '@parameter.inner', - }, - }, - }, -} + } +end, 0) -- Diagnostic keymaps vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous diagnostic message' }) From 313bd75ca04cb2cef48a79ac3ad697a1b9a2daab Mon Sep 17 00:00:00 2001 From: Chris Patti Date: Sat, 30 Sep 2023 20:06:22 -0400 Subject: [PATCH 28/31] Fix git clone instruction - separate code blocks for Windows and UNIX. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 49fa0f31..4d27756c 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,10 @@ Clone kickstart.nvim: ```sh # on Linux and Mac git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim +``` + + +``` # on Windows git clone https://github.com/nvim-lua/kickstart.nvim.git %userprofile%\AppData\Local\nvim\ ``` From 6ffc5a169f090b0b4359deb6deff0b99ab123679 Mon Sep 17 00:00:00 2001 From: Anthony Fiddes <11233666+Anthony-Fiddes@users.noreply.github.com> Date: Fri, 6 Oct 2023 16:25:57 -0700 Subject: [PATCH 29/31] Fix Mason setup issue and run stylua. --- init.lua | 43 ++++++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/init.lua b/init.lua index e5bc576e..4438ca19 100644 --- a/init.lua +++ b/init.lua @@ -81,7 +81,7 @@ require('lazy').setup({ 'neovim/nvim-lspconfig', dependencies = { -- Automatically install LSPs to stdpath for neovim - { 'williamboman/mason.nvim', config = true }, + 'williamboman/mason.nvim', 'williamboman/mason-lspconfig.nvim', -- Useful status updates for LSP @@ -128,16 +128,24 @@ require('lazy').setup({ -- 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) + vim.keymap.set({ 'n', 'v' }, ']c', function() + if vim.wo.diff then + return ']c' + end + vim.schedule(function() + gs.next_hunk() + end) return '' - 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) + 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 '' - end, {expr=true, buffer = bufnr, desc = "Jump to previous hunk"}) + end, { expr = true, buffer = bufnr, desc = 'Jump to previous hunk' }) end, }, }, @@ -170,7 +178,7 @@ require('lazy').setup({ 'lukas-reineke/indent-blankline.nvim', -- Enable `lukas-reineke/indent-blankline.nvim` -- See `:help indent_blankline.txt` - main = "ibl", + main = 'ibl', opts = {}, }, @@ -326,10 +334,10 @@ vim.defer_fn(function() require('nvim-treesitter.configs').setup { -- 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' }, - + -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) auto_install = false, - + highlight = { enable = true }, indent = { enable = true }, incremental_selection = { @@ -440,7 +448,7 @@ local on_attach = function(_, bufnr) end -- document existing key chains -require('which-key').register({ +require('which-key').register { ['c'] = { name = '[C]ode', _ = 'which_key_ignore' }, ['d'] = { name = '[D]ocument', _ = 'which_key_ignore' }, ['g'] = { name = '[G]it', _ = 'which_key_ignore' }, @@ -448,7 +456,7 @@ require('which-key').register({ ['r'] = { name = '[R]ename', _ = 'which_key_ignore' }, ['s'] = { name = '[S]earch', _ = 'which_key_ignore' }, ['w'] = { name = '[W]orkspace', _ = 'which_key_ignore' }, -}) +} -- Enable the following language servers -- Feel free to add/remove any LSPs that you want here. They will automatically be installed. @@ -481,6 +489,11 @@ require('neodev').setup() local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) +-- mason-lspconfig requires that these setup functions are called in this order +-- before setting up the servers. +require('mason').setup() +require('mason-lspconfig').setup() + -- Ensure the servers above are installed local mason_lspconfig = require 'mason-lspconfig' @@ -496,7 +509,7 @@ mason_lspconfig.setup_handlers { settings = servers[server_name], filetypes = (servers[server_name] or {}).filetypes, } - end + end, } -- [[ Configure nvim-cmp ]] From 21b175d21b5ff07a7b5cf8e846cad1c31d20547c Mon Sep 17 00:00:00 2001 From: amtoine Date: Sat, 7 Oct 2023 13:49:47 +0200 Subject: [PATCH 30/31] remove spaces in empty lines --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index e5bc576e..5c8372a6 100644 --- a/init.lua +++ b/init.lua @@ -326,10 +326,10 @@ vim.defer_fn(function() require('nvim-treesitter.configs').setup { -- 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' }, - + -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) auto_install = false, - + highlight = { enable = true }, indent = { enable = true }, incremental_selection = { From 36224daa1bfff3b2fe7067952f305111f99b356f Mon Sep 17 00:00:00 2001 From: Anthony Fiddes <11233666+Anthony-Fiddes@users.noreply.github.com> Date: Sat, 7 Oct 2023 16:14:26 -0700 Subject: [PATCH 31/31] Move mason setup up further This helps if a user needs to find a mason executable --- init.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index 4438ca19..11f55d05 100644 --- a/init.lua +++ b/init.lua @@ -458,6 +458,11 @@ require('which-key').register { ['w'] = { name = '[W]orkspace', _ = 'which_key_ignore' }, } +-- mason-lspconfig requires that these setup functions are called in this order +-- before setting up the servers. +require('mason').setup() +require('mason-lspconfig').setup() + -- Enable the following language servers -- Feel free to add/remove any LSPs that you want here. They will automatically be installed. -- @@ -489,11 +494,6 @@ require('neodev').setup() local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) --- mason-lspconfig requires that these setup functions are called in this order --- before setting up the servers. -require('mason').setup() -require('mason-lspconfig').setup() - -- Ensure the servers above are installed local mason_lspconfig = require 'mason-lspconfig'