From 187bebcbf93a82c29f12d946136b8d35ab695c64 Mon Sep 17 00:00:00 2001 From: Luiz Antonio Calliari Filho Date: Sun, 26 Feb 2023 23:03:34 -0300 Subject: [PATCH 01/33] Adding [+c and ]+c to move to diffs and leader+ph to show a pop up with the preview diff value. --- init.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/init.lua b/init.lua index aeca6d2..427af75 100644 --- a/init.lua +++ b/init.lua @@ -109,6 +109,19 @@ require('lazy').setup({ topdelete = { text = '‾' }, changedelete = { text = '~' }, }, + on_attach = function(bufnr) + local function map(mode, lhs, rhs, opts) + opts = vim.tbl_extend('force', {noremap = true, silent = true}, opts or {}) + vim.api.nvim_buf_set_keymap(bufnr, mode, lhs, rhs, opts) + end + + -- Navigation + map('n', ']c', "&diff ? ']c' : 'Gitsigns next_hunk'", {expr=true}) + map('n', '[c', "&diff ? '[c' : 'Gitsigns prev_hunk'", {expr=true}) + + -- Actions + map('n', 'ph', 'Gitsigns preview_hunk') + end }, }, From 66dc5b896d47ed58e9821b8b39588ce431bfd83a Mon Sep 17 00:00:00 2001 From: Luiz Antonio Calliari Filho Date: Mon, 6 Mar 2023 23:26:20 -0300 Subject: [PATCH 02/33] Feat: Simplifying code --- init.lua | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/init.lua b/init.lua index 427af75..9ce29c6 100644 --- a/init.lua +++ b/init.lua @@ -110,17 +110,9 @@ require('lazy').setup({ changedelete = { text = '~' }, }, on_attach = function(bufnr) - local function map(mode, lhs, rhs, opts) - opts = vim.tbl_extend('force', {noremap = true, silent = true}, opts or {}) - vim.api.nvim_buf_set_keymap(bufnr, mode, lhs, rhs, opts) - end - - -- Navigation - map('n', ']c', "&diff ? ']c' : 'Gitsigns next_hunk'", {expr=true}) - map('n', '[c', "&diff ? '[c' : 'Gitsigns prev_hunk'", {expr=true}) - - -- Actions - map('n', 'ph', 'Gitsigns preview_hunk') + vim.keymap.set('n', '[c', require('gitsigns').prev_hunk, { buffer = bufnr, desc = 'Go to [P]revious [H]unk' }) + vim.keymap.set('n', ']c', require('gitsigns').next_hunk, { buffer = bufnr, desc = 'Go to [N]ext [H]unk' }) + vim.keymap.set('n', 'ph', require('gitsigns').preview_hunk, { buffer = bufnr, desc = '[P]review [H]unk' }) end }, }, From 986aa82cd63a104e0930c17f747518d6449ac11a Mon Sep 17 00:00:00 2001 From: Luiz Antonio Calliari Filho Date: Sun, 12 Mar 2023 20:45:26 -0300 Subject: [PATCH 03/33] FIX: Updating command description. --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index e3ddbd2..b4a7881 100644 --- a/init.lua +++ b/init.lua @@ -110,8 +110,8 @@ require('lazy').setup({ changedelete = { text = '~' }, }, on_attach = function(bufnr) - vim.keymap.set('n', '[c', require('gitsigns').prev_hunk, { buffer = bufnr, desc = 'Go to [P]revious [H]unk' }) - vim.keymap.set('n', ']c', require('gitsigns').next_hunk, { buffer = bufnr, desc = 'Go to [N]ext [H]unk' }) + vim.keymap.set('n', '[c', require('gitsigns').prev_hunk, { buffer = bufnr, desc = 'Go to Previous Hunk' }) + vim.keymap.set('n', ']c', require('gitsigns').next_hunk, { buffer = bufnr, desc = 'Go to Next Hunk' }) vim.keymap.set('n', 'ph', require('gitsigns').preview_hunk, { buffer = bufnr, desc = '[P]review [H]unk' }) end }, From 0278862ea142c37eec827b61a189f1649f3ea939 Mon Sep 17 00:00:00 2001 From: Antoine Stevan <44101798+amtoine@users.noreply.github.com> Date: Thu, 13 Apr 2023 15:22:59 +0200 Subject: [PATCH 04/33] minor modifications on the issue template (#244) * use real markdown headers for section titles * add a newline after the initial comment for readability * make hint indications comments --- .github/ISSUE_TEMPLATE/bug_report.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 6999d51..2ad4d31 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -8,19 +8,21 @@ assignees: '' --- -**Describe the bug** -A clear and concise description of what the bug is. -**To Reproduce** -Steps to reproduce the behavior: +## Describe the bug + + +## To Reproduce + 1. ... -**Desktop (please complete the following information):** +## Desktop + - OS: - Terminal: -** Neovim Version ** - - Output of running `:version` from inside of neovim: +## Neovim Version + ``` ``` From 06192307f3302b75a6d9d2ac5ba382cafccf9c3f Mon Sep 17 00:00:00 2001 From: Jon Earnshaw <1021321+jpearnshaw@users.noreply.github.com> Date: Thu, 13 Apr 2023 14:28:44 +0100 Subject: [PATCH 05/33] Correct command for neo-tree (#216) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ce72ebb..f6c0ac5 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ return { } ``` -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. You can explore the documentation at [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim) for more information. #### Example: Adding a file to change default options From 8d8fbd15bfefde43303ffa41b4c0d9047c0dae5a Mon Sep 17 00:00:00 2001 From: KudoLayton Date: Thu, 13 Apr 2023 22:34:06 +0900 Subject: [PATCH 06/33] fix: move the Mason setup time forward from before (#210) This commit fix the Mason [#1045](https://github.com/williamboman/mason.nvim/issues/1045) issue. Quickly set up Mason to avoid DAP-related startup error messages. --- init.lua | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 56975a6..1cfa228 100644 --- a/init.lua +++ b/init.lua @@ -79,7 +79,7 @@ require('lazy').setup({ 'neovim/nvim-lspconfig', dependencies = { -- Automatically install LSPs to stdpath for neovim - 'williamboman/mason.nvim', + { 'williamboman/mason.nvim', config = true }, 'williamboman/mason-lspconfig.nvim', -- Useful status updates for LSP @@ -426,9 +426,6 @@ require('neodev').setup() local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) --- Setup mason so it can manage external tooling -require('mason').setup() - -- Ensure the servers above are installed local mason_lspconfig = require 'mason-lspconfig' From 9924f7e0a0fbc2caea91007a5d66cb9aa74827db Mon Sep 17 00:00:00 2001 From: Tsanko Tsanev Date: Thu, 13 Apr 2023 16:34:27 +0300 Subject: [PATCH 07/33] Fix typo "documention" into "documentation" (#209) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f6c0ac5..21fcab3 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,7 @@ Each PR, especially those which increase the line count, should have a descripti Installation may require installing build tools, and updating the run command for `telescope-fzf-native` -See `telescope-fzf-native` documention for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation) +See `telescope-fzf-native` documentation for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation) This requires: From 9004013a8da9abac30dc17ff71d6b5fee137076a Mon Sep 17 00:00:00 2001 From: SamPosh Date: Mon, 24 Apr 2023 16:40:07 +0530 Subject: [PATCH 08/33] Dapui.toggle is added --- lua/kickstart/plugins/debug.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/kickstart/plugins/debug.lua b/lua/kickstart/plugins/debug.lua index 000bcb8..14f422f 100644 --- a/lua/kickstart/plugins/debug.lua +++ b/lua/kickstart/plugins/debug.lua @@ -72,7 +72,9 @@ return { }, }, } - + -- toggle to see last session result. Without this ,you can't see session output in case of unhandled exception. + vim.keymap.set("n", "", dapui.toggle) + dap.listeners.after.event_initialized['dapui_config'] = dapui.open dap.listeners.before.event_terminated['dapui_config'] = dapui.close dap.listeners.before.event_exited['dapui_config'] = dapui.close From 0dfc1592862c145f72a0844521542d1522f33607 Mon Sep 17 00:00:00 2001 From: liepieshov Date: Mon, 24 Apr 2023 17:57:47 +0100 Subject: [PATCH 09/33] setup a standard binding for searching git files using telescope --- init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/init.lua b/init.lua index 1cfa228..22d90cd 100644 --- a/init.lua +++ b/init.lua @@ -276,6 +276,7 @@ vim.keymap.set('n', '/', function() }) end, { desc = '[/] Fuzzily search in current buffer' }) +vim.keymap.set('n', 'gf', require('telescope.builtin').git_files, { desc = 'Search [G]it [F]iles' }) vim.keymap.set('n', 'sf', require('telescope.builtin').find_files, { desc = '[S]earch [F]iles' }) vim.keymap.set('n', 'sh', require('telescope.builtin').help_tags, { desc = '[S]earch [H]elp' }) vim.keymap.set('n', 'sw', require('telescope.builtin').grep_string, { desc = '[S]earch current [W]ord' }) From 2eff982e1ef7b7c1e7a052c5338a4a09bec396cd Mon Sep 17 00:00:00 2001 From: nPHYN1T3 <38122105+nPHYN1T3@users.noreply.github.com> Date: Mon, 24 Apr 2023 15:21:53 -0600 Subject: [PATCH 10/33] Update README.md --- README.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 21fcab3..52a62fc 100644 --- a/README.md +++ b/README.md @@ -11,14 +11,27 @@ A starting point for Neovim that is: 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. +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. + Distribution Alternatives: - [LazyVim](https://www.lazyvim.org/): A delightful distribution maintained by @folke (the author of lazy.nvim, the package manager used here) ### Installation -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. +* Backup 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) + ??? (MacOS) + ??? (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. +* Run nvim and allow the kickstart process to download files and set up the basics. + +### GIT Clone Installation + -* Backup your previous configuration * (Recommended) 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 `~/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 From b5c0b25398409465006732f1f29aafff73ee42af Mon Sep 17 00:00:00 2001 From: nPHYN1T3 <38122105+nPHYN1T3@users.noreply.github.com> Date: Mon, 24 Apr 2023 15:28:27 -0600 Subject: [PATCH 11/33] Update README.md --- README.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 52a62fc..29df719 100644 --- a/README.md +++ b/README.md @@ -23,21 +23,25 @@ Distribution Alternatives: ### 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) - ??? (MacOS) - ??? (Windows) + `~/.config/nvim` (Linux) + `~/.config/nvim` (MacOS) + `~/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. -* Run nvim and allow the kickstart process to download files and set up the basics. ### GIT Clone Installation +* From a terminal cd/dir to: + `~/.config/nvim` (Linux) + `~/.config/nvim` (MacOS) + `~/AppData/Local/nvim/` (Windows) +* run: git clone https://github.com/nvim-lua/kickstart.nvim.git OR: gh repo clone nvim-lua/kickstart.nvim +* Run neovim (from terminal or shortcut) and allow the kickstart process to download files and set up the basics. +* Once the setup is complete restart Neovim. +* **You're ready to go!** -* (Recommended) Fork this repo (so that you have your own copy that you can modify). +* (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 `~/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 -* Start Neovim (`nvim`) and allow `lazy.nvim` to complete installation. -* Restart Neovim -* **You're ready to go!** Additional system requirements: - Make sure to review the readmes of the plugins if you are experiencing errors. In particular: From f3ad4bb518949e5945f0034c6aa5611b602e53c7 Mon Sep 17 00:00:00 2001 From: nPHYN1T3 <38122105+nPHYN1T3@users.noreply.github.com> Date: Mon, 24 Apr 2023 15:29:58 -0600 Subject: [PATCH 12/33] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 29df719..dd4f70c 100644 --- a/README.md +++ b/README.md @@ -129,7 +129,7 @@ Each PR, especially those which increase the line count, should have a descripti * See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information * Are there any cool videos about this plugin? * Current iteration of kickstart (coming soon) - * Here is one about the previous iteration of kickstart: [video introduction to Kickstart.nvim](https://youtu.be/stqUbv-5u2s). + * Here is one about the previous iteration of kickstart: [video introduction to Kickstart.nvim](https://youtu.be/stqUbv-5u2s). Note the install via init.lua no longer works. ### Windows Installation From ad6351a650685b9c4e856a2a832a379551aebc86 Mon Sep 17 00:00:00 2001 From: nPHYN1T3 <38122105+nPHYN1T3@users.noreply.github.com> Date: Tue, 25 Apr 2023 10:21:31 -0600 Subject: [PATCH 13/33] Should fix the win paths I fear adding bits like "Your paths may differ, these are just for reference." but the core behind the kickstart is getting "noobs" past big hurdles fast. This however means things need to be super spoon fed or basic things like not understanding relative paths and such might end up right where things started...ambiguous to some user instructions because they don't understand they need to know certain things because this is supposed to help them bypass knowing that for now...and the snake eats its tail. :) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dd4f70c..81a9e0a 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Distribution Alternatives: * Extract the archive to: `~/.config/nvim` (Linux) `~/.config/nvim` (MacOS) - `~/AppData/Local/nvim/` (Windows) + `C:\User\YourName\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 @@ -40,7 +40,7 @@ Distribution Alternatives: * **You're ready to go!** * (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 `~/AppData/Local/nvim/` (Windows) +* Clone the kickstart repo into `$HOME/.config/nvim/` (Linux/Mac) or `C:\User\YourName\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: From 545577b9a13feb21cf0270084a5d20692f3af26a Mon Sep 17 00:00:00 2001 From: nPHYN1T3 <38122105+nPHYN1T3@users.noreply.github.com> Date: Tue, 25 Apr 2023 10:43:15 -0600 Subject: [PATCH 14/33] Fixed Windows style path for home --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 81a9e0a..0b617b1 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Distribution Alternatives: * Extract the archive to: `~/.config/nvim` (Linux) `~/.config/nvim` (MacOS) - `C:\User\YourName\AppData\Local\nvim\` (Windows) + `%userprofile%\User\YourName\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 @@ -40,7 +40,7 @@ Distribution Alternatives: * **You're ready to go!** * (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 `C:\User\YourName\AppData\Local\nvim\` (Windows) +* Clone the kickstart repo into `$HOME/.config/nvim/` (Linux/Mac) or `%userprofile%\User\YourName\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: From 604e92ef74f099dedcf232f27bf6640bd4282d13 Mon Sep 17 00:00:00 2001 From: nPHYN1T3 <38122105+nPHYN1T3@users.noreply.github.com> Date: Tue, 25 Apr 2023 13:14:17 -0600 Subject: [PATCH 15/33] Hmmm Tested on a win10VM for location and such because I remembered %appdata% should be a thing but it's the wrong location and the win MSI creates nvim-data rather than just nvim. Then I noticed my previous changes weren't all saved...so here I go again heh. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0b617b1..96d3a0f 100644 --- a/README.md +++ b/README.md @@ -25,14 +25,14 @@ Distribution Alternatives: * Extract the archive to: `~/.config/nvim` (Linux) `~/.config/nvim` (MacOS) - `%userprofile%\User\YourName\AppData\Local\nvim\` (Windows) + `%userprofile%\User\YourName\AppData\Local\nvim-data\` (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 * From a terminal cd/dir to: `~/.config/nvim` (Linux) `~/.config/nvim` (MacOS) - `~/AppData/Local/nvim/` (Windows) + `%userprofile%\AppData\Local\nvim-data\` (Windows) * run: git clone https://github.com/nvim-lua/kickstart.nvim.git OR: gh repo clone nvim-lua/kickstart.nvim * Run neovim (from terminal or shortcut) and allow the kickstart process to download files and set up the basics. @@ -40,7 +40,7 @@ Distribution Alternatives: * **You're ready to go!** * (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%\User\YourName\AppData\Local\nvim\` (Windows) +* Clone the kickstart repo into `$HOME/.config/nvim/` (Linux/Mac) or `%userprofile%\AppData\Local\nvim-data\` (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: From 821ad95565a293d6d52ef2f07941472ab75ef00f Mon Sep 17 00:00:00 2001 From: nPHYN1T3 <38122105+nPHYN1T3@users.noreply.github.com> Date: Tue, 25 Apr 2023 13:15:10 -0600 Subject: [PATCH 16/33] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 96d3a0f..0b878eb 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Distribution Alternatives: * Extract the archive to: `~/.config/nvim` (Linux) `~/.config/nvim` (MacOS) - `%userprofile%\User\YourName\AppData\Local\nvim-data\` (Windows) + `%userprofile%\AppData\Local\nvim-data\` (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 From df10841febe952c3482da7ce54233eea6cf02905 Mon Sep 17 00:00:00 2001 From: nPHYN1T3 <38122105+nPHYN1T3@users.noreply.github.com> Date: Tue, 25 Apr 2023 13:21:31 -0600 Subject: [PATCH 17/33] ARG! My browser should not be caching yet github seems to fight some changes. I'm also still unable to see why the formatting (line height) differs between the Archive Install section and the Git Clone Install section. Hopefully this will at least save the correct changes to the Win stuff. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0b878eb..02df1b8 100644 --- a/README.md +++ b/README.md @@ -33,8 +33,8 @@ Distribution Alternatives: `~/.config/nvim` (Linux) `~/.config/nvim` (MacOS) `%userprofile%\AppData\Local\nvim-data\` (Windows) -* run: git clone https://github.com/nvim-lua/kickstart.nvim.git OR: gh repo clone nvim-lua/kickstart.nvim +* run: git clone https://github.com/nvim-lua/kickstart.nvim.git OR: gh repo clone nvim-lua/kickstart.nvim * Run neovim (from terminal or shortcut) and allow the kickstart process to download files and set up the basics. * Once the setup is complete restart Neovim. * **You're ready to go!** From e78ad01dd284273b19dd6295a2be53b1f7e2c6d2 Mon Sep 17 00:00:00 2001 From: Keiwan Jamaly <33158209+keiwanjamaly@users.noreply.github.com> Date: Wed, 26 Apr 2023 17:37:48 +0200 Subject: [PATCH 18/33] Added disconnect emoji for nvim-dap-ui --- lua/kickstart/plugins/debug.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/kickstart/plugins/debug.lua b/lua/kickstart/plugins/debug.lua index 14f422f..deeda56 100644 --- a/lua/kickstart/plugins/debug.lua +++ b/lua/kickstart/plugins/debug.lua @@ -69,6 +69,7 @@ return { step_back = 'b', run_last = '▶▶', terminate = '⏹', + disconnect = "⏏", }, }, } From 5b74a016b39a26aaea061aa3637411160472250a Mon Sep 17 00:00:00 2001 From: Chris Patti Date: Wed, 26 Apr 2023 12:24:52 -0400 Subject: [PATCH 19/33] Update README.md Tiny wording changes I requested from https://github.com/nvim-lua/kickstart.nvim/pull/283 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 02df1b8..ad3d7db 100644 --- a/README.md +++ b/README.md @@ -129,7 +129,7 @@ Each PR, especially those which increase the line count, should have a descripti * See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information * Are there any cool videos about this plugin? * Current iteration of kickstart (coming soon) - * Here is one about the previous iteration of kickstart: [video introduction to Kickstart.nvim](https://youtu.be/stqUbv-5u2s). Note the install via init.lua no longer works. + * Here is one about the previous iteration of kickstart: [video introduction to Kickstart.nvim](https://youtu.be/stqUbv-5u2s). Note the install via init.lua no longer works as specified. Please follow the install instructions in this file instead as they're up to date. ### Windows Installation From 7e39ab77c6fa3497a3f362915381870721be9582 Mon Sep 17 00:00:00 2001 From: Sumanth Lingappa <42572246+sumanth-lingappa@users.noreply.github.com> Date: Wed, 26 Apr 2023 23:49:32 +0530 Subject: [PATCH 20/33] corrected git clone command --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ad3d7db..ef119d2 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Distribution Alternatives: `~/.config/nvim` (MacOS) `%userprofile%\AppData\Local\nvim-data\` (Windows) -* run: git clone https://github.com/nvim-lua/kickstart.nvim.git 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 the kickstart process to download files and set up the basics. * Once the setup is complete restart Neovim. * **You're ready to go!** From efdfd6ed82c5d3c069f9b9240407375669f71e25 Mon Sep 17 00:00:00 2001 From: Victor Wallsten <94681407+victorwallsten@users.noreply.github.com> Date: Thu, 27 Apr 2023 09:33:10 +0200 Subject: [PATCH 21/33] Add , mappings to nvim-cmp setup --- init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/init.lua b/init.lua index 22d90cd..7fd9c54 100644 --- a/init.lua +++ b/init.lua @@ -457,6 +457,8 @@ cmp.setup { end, }, mapping = cmp.mapping.preset.insert { + [''] = cmp.mapping.select_next_item(), + [''] = cmp.mapping.select_prev_item(), [''] = cmp.mapping.scroll_docs(-4), [''] = cmp.mapping.scroll_docs(4), [''] = cmp.mapping.complete {}, From 55c52ce45bea8395e79d43dc6e5490c23b06a95b Mon Sep 17 00:00:00 2001 From: SamPosh Date: Tue, 2 May 2023 16:01:46 +0530 Subject: [PATCH 22/33] Added friendly snippet support --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 7fd9c54..2d377d2 100644 --- a/init.lua +++ b/init.lua @@ -93,7 +93,7 @@ require('lazy').setup({ { -- Autocompletion 'hrsh7th/nvim-cmp', - dependencies = { 'hrsh7th/cmp-nvim-lsp', 'L3MON4D3/LuaSnip', 'saadparwaiz1/cmp_luasnip' }, + dependencies = { 'hrsh7th/cmp-nvim-lsp', 'L3MON4D3/LuaSnip', 'saadparwaiz1/cmp_luasnip',"rafamadriz/friendly-snippets", }, }, -- Useful plugin to show you pending keybinds. @@ -447,7 +447,7 @@ mason_lspconfig.setup_handlers { -- nvim-cmp setup local cmp = require 'cmp' local luasnip = require 'luasnip' - +require("luasnip.loaders.from_vscode").lazy_load() luasnip.config.setup {} cmp.setup { From 1c02cec98b9192d8c7e990b8243e3ae007325bad Mon Sep 17 00:00:00 2001 From: Gaurav Bhatnagar <11798509+mech-a@users.noreply.github.com> Date: Sun, 7 May 2023 16:28:13 -0700 Subject: [PATCH 23/33] change luasnip tab jumping to locally jumpable --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 7fd9c54..f4d8d0f 100644 --- a/init.lua +++ b/init.lua @@ -469,7 +469,7 @@ cmp.setup { [''] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_next_item() - elseif luasnip.expand_or_jumpable() then + elseif luasnip.expand_or_locally_jumpable() then luasnip.expand_or_jump() else fallback() From 2844f61d968501b531758e8a301a53a77b2fb69e Mon Sep 17 00:00:00 2001 From: Gaurav Bhatnagar <11798509+mech-a@users.noreply.github.com> Date: Sun, 7 May 2023 16:38:44 -0700 Subject: [PATCH 24/33] add local jumping to shift tab --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index f4d8d0f..1496d24 100644 --- a/init.lua +++ b/init.lua @@ -478,7 +478,7 @@ cmp.setup { [''] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_prev_item() - elseif luasnip.jumpable(-1) then + elseif luasnip.locally_jumpable(-1) then luasnip.jump(-1) else fallback() From fa4bf9c378a7ae17264abc42782f0628e3a3acf3 Mon Sep 17 00:00:00 2001 From: dec Date: Mon, 8 May 2023 11:02:37 +0100 Subject: [PATCH 25/33] Udated tree sitter to use latest release branch --- init.lua | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/init.lua b/init.lua index 7fd9c54..f9c8607 100644 --- a/init.lua +++ b/init.lua @@ -35,7 +35,6 @@ I hope you enjoy your Neovim journey, P.S. You can delete this when you're done too. It's your config now :) --]] - -- Set as the leader key -- See `:help mapleader` -- NOTE: Must happen before plugins are required (otherwise wrong leader will be used) @@ -75,7 +74,8 @@ require('lazy').setup({ -- NOTE: This is where your plugins related to LSP can be installed. -- The configuration is done below. Search for lspconfig to find it below. - { -- LSP Configuration & Plugins + { + -- LSP Configuration & Plugins 'neovim/nvim-lspconfig', dependencies = { -- Automatically install LSPs to stdpath for neovim @@ -84,21 +84,23 @@ require('lazy').setup({ -- Useful status updates for LSP -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` - { 'j-hui/fidget.nvim', opts = {} }, + { 'j-hui/fidget.nvim', opts = {} }, -- Additional lua configuration, makes nvim stuff amazing! 'folke/neodev.nvim', }, }, - { -- Autocompletion + { + -- Autocompletion 'hrsh7th/nvim-cmp', dependencies = { 'hrsh7th/cmp-nvim-lsp', 'L3MON4D3/LuaSnip', 'saadparwaiz1/cmp_luasnip' }, }, -- 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 + { 'folke/which-key.nvim', opts = {} }, + { + -- Adds git releated signs to the gutter, as well as utilities for managing changes 'lewis6991/gitsigns.nvim', opts = { -- See `:help gitsigns.txt` @@ -112,7 +114,8 @@ require('lazy').setup({ }, }, - { -- Theme inspired by Atom + { + -- Theme inspired by Atom 'navarasu/onedark.nvim', priority = 1000, config = function() @@ -120,7 +123,8 @@ require('lazy').setup({ end, }, - { -- Set lualine as statusline + { + -- Set lualine as statusline 'nvim-lualine/lualine.nvim', -- See `:help lualine.txt` opts = { @@ -133,7 +137,8 @@ require('lazy').setup({ }, }, - { -- Add indentation guides even on blank lines + { + -- Add indentation guides even on blank lines 'lukas-reineke/indent-blankline.nvim', -- Enable `lukas-reineke/indent-blankline.nvim` -- See `:help indent_blankline.txt` @@ -144,10 +149,10 @@ require('lazy').setup({ }, -- "gc" to comment visual regions/lines - { 'numToStr/Comment.nvim', opts = {} }, + { 'numToStr/Comment.nvim', opts = {} }, -- Fuzzy Finder (files, lsp, etc) - { 'nvim-telescope/telescope.nvim', version = '*', dependencies = { 'nvim-lua/plenary.nvim' } }, + { '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 @@ -162,7 +167,8 @@ require('lazy').setup({ end, }, - { -- Highlight, edit, and navigate code + { + -- Highlight, edit, and navigate code 'nvim-treesitter/nvim-treesitter', dependencies = { 'nvim-treesitter/nvim-treesitter-textobjects', From 455691bd8d15064531d2db31a77b54f83ce2898d Mon Sep 17 00:00:00 2001 From: Gaurav Bhatnagar Date: Tue, 16 May 2023 12:38:56 -0700 Subject: [PATCH 26/33] refact: stylua --- init.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/init.lua b/init.lua index 71e1ae5..c77ff26 100644 --- a/init.lua +++ b/init.lua @@ -84,7 +84,7 @@ require('lazy').setup({ -- Useful status updates for LSP -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` - { 'j-hui/fidget.nvim', opts = {} }, + { 'j-hui/fidget.nvim', opts = {} }, -- Additional lua configuration, makes nvim stuff amazing! 'folke/neodev.nvim', @@ -94,11 +94,11 @@ require('lazy').setup({ { -- Autocompletion 'hrsh7th/nvim-cmp', - dependencies = { 'hrsh7th/cmp-nvim-lsp', 'L3MON4D3/LuaSnip', 'saadparwaiz1/cmp_luasnip',"rafamadriz/friendly-snippets", }, + dependencies = { 'hrsh7th/cmp-nvim-lsp', 'L3MON4D3/LuaSnip', 'saadparwaiz1/cmp_luasnip', 'rafamadriz/friendly-snippets' }, }, -- Useful plugin to show you pending keybinds. - { 'folke/which-key.nvim', opts = {} }, + { 'folke/which-key.nvim', opts = {} }, { -- Adds git releated signs to the gutter, as well as utilities for managing changes 'lewis6991/gitsigns.nvim', @@ -115,7 +115,7 @@ require('lazy').setup({ vim.keymap.set('n', '[c', require('gitsigns').prev_hunk, { buffer = bufnr, desc = 'Go to Previous Hunk' }) vim.keymap.set('n', ']c', require('gitsigns').next_hunk, { buffer = bufnr, desc = 'Go to Next Hunk' }) vim.keymap.set('n', 'ph', require('gitsigns').preview_hunk, { buffer = bufnr, desc = '[P]review [H]unk' }) - end + end, }, }, @@ -154,10 +154,10 @@ require('lazy').setup({ }, -- "gc" to comment visual regions/lines - { 'numToStr/Comment.nvim', opts = {} }, + { 'numToStr/Comment.nvim', opts = {} }, -- Fuzzy Finder (files, lsp, etc) - { 'nvim-telescope/telescope.nvim', branch = '0.1.x', dependencies = { 'nvim-lua/plenary.nvim' } }, + { '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 @@ -178,7 +178,7 @@ require('lazy').setup({ dependencies = { 'nvim-treesitter/nvim-treesitter-textobjects', }, - build = ":TSUpdate", + build = ':TSUpdate', }, -- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart @@ -361,10 +361,10 @@ require('nvim-treesitter.configs').setup { } -- Diagnostic keymaps -vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = "Go to previous diagnostic message" }) -vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = "Go to next diagnostic message" }) -vim.keymap.set('n', 'e', vim.diagnostic.open_float, { desc = "Open floating diagnostic message" }) -vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = "Open diagnostics list" }) +vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous diagnostic message' }) +vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnostic message' }) +vim.keymap.set('n', 'e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' }) +vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' }) -- LSP settings. -- This function gets run when an LSP connects to a particular buffer. @@ -458,7 +458,7 @@ mason_lspconfig.setup_handlers { -- nvim-cmp setup local cmp = require 'cmp' local luasnip = require 'luasnip' -require("luasnip.loaders.from_vscode").lazy_load() +require('luasnip.loaders.from_vscode').lazy_load() luasnip.config.setup {} cmp.setup { From 8a647f4384eb7d38259474db042b9e5291b6f6b5 Mon Sep 17 00:00:00 2001 From: Chris Patti Date: Sun, 21 May 2023 22:13:02 -0400 Subject: [PATCH 27/33] Update README.md Fix for #314 - there's no -data at the end of the nvim dir. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ef119d2..9bab48d 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Distribution Alternatives: * From a terminal cd/dir to: `~/.config/nvim` (Linux) `~/.config/nvim` (MacOS) - `%userprofile%\AppData\Local\nvim-data\` (Windows) + `%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 neovim (from terminal or shortcut) and allow the kickstart process to download files and set up the basics. From 8e8ba26a96a4b2306b90dbaadf86eb7cb43f56d8 Mon Sep 17 00:00:00 2001 From: Gaurav Bhatnagar Date: Sun, 21 May 2023 23:46:09 -0700 Subject: [PATCH 28/33] refact: add cmp comments, other --- init.lua | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index c77ff26..bc60ef8 100644 --- a/init.lua +++ b/init.lua @@ -94,7 +94,17 @@ require('lazy').setup({ { -- Autocompletion 'hrsh7th/nvim-cmp', - dependencies = { 'hrsh7th/cmp-nvim-lsp', 'L3MON4D3/LuaSnip', 'saadparwaiz1/cmp_luasnip', 'rafamadriz/friendly-snippets' }, + dependencies = { + -- Snippet Engine & its associated nvim-cmp source + 'L3MON4D3/LuaSnip', + 'saadparwaiz1/cmp_luasnip', + + -- Adds LSP completion capabilities + 'hrsh7th/cmp-nvim-lsp', + + -- Adds a number of user-friendly snippets + 'rafamadriz/friendly-snippets', + }, }, -- Useful plugin to show you pending keybinds. @@ -366,7 +376,7 @@ vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnos vim.keymap.set('n', 'e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' }) vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' }) --- LSP settings. +-- [[ Configure LSP ]] -- This function gets run when an LSP connects to a particular buffer. local on_attach = function(_, bufnr) -- NOTE: Remember that lua is a real programming language, and as such it is possible @@ -455,7 +465,8 @@ mason_lspconfig.setup_handlers { end, } --- nvim-cmp setup +-- [[ Configure nvim-cmp ]] +-- See `:help cmp` local cmp = require 'cmp' local luasnip = require 'luasnip' require('luasnip.loaders.from_vscode').lazy_load() From 8d97b11dd8fb7bda1857ab30bb45b067947da797 Mon Sep 17 00:00:00 2001 From: Gaurav Bhatnagar Date: Mon, 22 May 2023 11:29:42 -0700 Subject: [PATCH 29/33] refact: remove after/ reference in readme, other clean-up items --- README.md | 42 +++++++++++++++++++++--------------------- init.lua | 8 +++----- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 9bab48d..265c2be 100644 --- a/README.md +++ b/README.md @@ -28,15 +28,15 @@ Distribution Alternatives: `%userprofile%\AppData\Local\nvim-data\` (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 +### Git Clone Installation * 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 -* Run neovim (from terminal or shortcut) and allow the kickstart process to download files and set up the basics. -* Once the setup is complete restart Neovim. +* 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!** * (Recommended/Optional) Fork this repo (so that you have your own copy that you can modify). @@ -46,17 +46,18 @@ Distribution Alternatives: 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 as well [Windows Installation](#Windows-Installation) +- See [Windows Installation](#Windows-Installation) if you have trouble with `telescope-fzf-native` ### Configuration And Extension -* Inside of your fork, feel free to modify any file you like! It's your fork! -* Then there are two primary configuration options available: - * Include the `lua/kickstart/plugins/*` files in your configuration. +* 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` - * NOTE: To enable this, you need to uncomment `{ import = 'custom.plugins' }` in your `init.lua` + * Modify `init.lua` with additional plugins. + * Include the `lua/kickstart/plugins/*` files in your configuration. -You can also merge updates/changes from the repo back into your fork, to keep up-to-date with any changes for the default configuration +You can also merge updates/changes from the repo back into your fork, to keep up-to-date with any changes for the default configuration. #### Example: Adding an autopairs plugin @@ -67,14 +68,23 @@ In the file: `lua/custom/plugins/autopairs.lua`, add: return { "windwp/nvim-autopairs", + -- Optional dependency + dependencies = { 'hrsh7th/nvim-cmp' }, config = function() require("nvim-autopairs").setup {} + -- If you want to automatically add `(` after selecting a function or method + local cmp_autopairs = require('nvim-autopairs.completion.cmp') + local cmp = require('cmp') + cmp.event:on( + 'confirm_done', + cmp_autopairs.on_confirm_done() + ) end, } ``` -This will automatically install `nvim-autopairs` and enable it on startup. For more information, see documentation for [lazy.nvim](https://github.com/folke/lazy.nvim). +This will automatically install [windwp/nvim-autopairs](https://github.com/windwp/nvim-autopairs) and enable it on startup. For more information, see documentation for [lazy.nvim](https://github.com/folke/lazy.nvim). #### Example: Adding a file tree plugin @@ -100,16 +110,6 @@ return { 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. -#### Example: Adding a file to change default options - -To change default options, you can add a file in the `/after/plugin/` folder (see `:help load-plugins`) to include your own options, keymaps, autogroups, and more. The following is an example `defaults.lua` file (located at `$HOME/.config/nvim/after/plugin/defaults.lua`). - -```lua -vim.opt.relativenumber = true - -vim.keymap.set('n', 'sr', require('telescope.builtin').resume, { desc = '[S]earch [R]esume' }) -``` - ### Contribution Pull-requests are welcome. The goal of this repo is not to create a Neovim configuration framework, but to offer a starting template that shows, by example, available features in Neovim. Some things that will not be included: diff --git a/init.lua b/init.lua index c77ff26..4719912 100644 --- a/init.lua +++ b/init.lua @@ -7,8 +7,8 @@ Kickstart.nvim is *not* a distribution. Kickstart.nvim is a template for your own configuration. - The goal is that you can read every line of code, top-to-bottom, and understand - what your configuration is doing. + The goal is that you can read every line of code, top-to-bottom, understand + what your configuration is doing, and modify it to suit your needs. Once you've done that, you should start exploring, configuring and tinkering to explore Neovim! @@ -192,14 +192,12 @@ require('lazy').setup({ -- up-to-date with whatever is in the kickstart repo. -- -- For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins - -- - -- An additional note is that if you only copied in the `init.lua`, you can just comment this line - -- to get rid of the warning telling you that there are not plugins in `lua/custom/plugins/`. { import = 'custom.plugins' }, }, {}) -- [[ Setting options ]] -- See `:help vim.o` +-- NOTE: You can change these options as you wish! -- Set highlight on search vim.o.hlsearch = false From 83b65a1c7d4a5ae9454426e88be823c203d14a73 Mon Sep 17 00:00:00 2001 From: Luiz Antonio Calliari Filho Date: Thu, 25 May 2023 22:09:34 -0300 Subject: [PATCH 30/33] FIX: Conflict with vimdiff keybinding --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index fb0252c..ca2da6e 100644 --- a/init.lua +++ b/init.lua @@ -122,8 +122,8 @@ require('lazy').setup({ changedelete = { text = '~' }, }, on_attach = function(bufnr) - vim.keymap.set('n', '[c', require('gitsigns').prev_hunk, { buffer = bufnr, desc = 'Go to Previous Hunk' }) - vim.keymap.set('n', ']c', require('gitsigns').next_hunk, { buffer = bufnr, desc = 'Go to Next Hunk' }) + 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' }) end, }, From f2b09aaac7cd6e93f857f4faf33329a095da4797 Mon Sep 17 00:00:00 2001 From: Pavel 'PK' Kaminsky Date: Mon, 29 May 2023 23:35:45 +0300 Subject: [PATCH 31/33] fix(docs): update windows path to a correct folder --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 265c2be..e4a841e 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Distribution Alternatives: * **You're ready to go!** * (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-data\` (Windows) +* 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: From 1d52d1e68b8aa7e399b218bf2faf363e5c093254 Mon Sep 17 00:00:00 2001 From: Pavel 'PK' Kaminsky Date: Tue, 30 May 2023 11:04:01 +0300 Subject: [PATCH 32/33] Update README.md fix(docs): whoops missed another instance of `nvim-data` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e4a841e..64f386c 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Distribution Alternatives: * Extract the archive to: `~/.config/nvim` (Linux) `~/.config/nvim` (MacOS) - `%userprofile%\AppData\Local\nvim-data\` (Windows) + `%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 From cdaa750c86cfc0c8f2fc1c8638b7296c327bf5a9 Mon Sep 17 00:00:00 2001 From: Chris Patti Date: Sat, 3 Jun 2023 10:11:10 -0400 Subject: [PATCH 33/33] Refactor theme and status line into their own file --- init.lua | 29 ++++++---------------------- lua/kickstart/plugins/autoformat.lua | 14 +++----------- lua/kickstart/plugins/statusline.lua | 14 ++++++++++++++ lua/kickstart/plugins/theme.lua | 10 ++++++++++ 4 files changed, 33 insertions(+), 34 deletions(-) create mode 100644 lua/kickstart/plugins/statusline.lua create mode 100644 lua/kickstart/plugins/theme.lua diff --git a/init.lua b/init.lua index ca2da6e..5e9e567 100644 --- a/init.lua +++ b/init.lua @@ -122,35 +122,18 @@ 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', '[c', require('gitsigns').prev_hunk, { buffer = bufnr, desc = 'Go to Previous Hunk' }) + vim.keymap.set('n', ']c', require('gitsigns').next_hunk, { buffer = bufnr, desc = 'Go to Next Hunk' }) vim.keymap.set('n', 'ph', require('gitsigns').preview_hunk, { buffer = bufnr, desc = '[P]review [H]unk' }) end, }, }, - { - -- Theme inspired by Atom - 'navarasu/onedark.nvim', - priority = 1000, - config = function() - vim.cmd.colorscheme 'onedark' - end, - }, + -- Theme related configs go here + require 'kickstart.plugins.theme', - { - -- Set lualine as statusline - 'nvim-lualine/lualine.nvim', - -- See `:help lualine.txt` - opts = { - options = { - icons_enabled = false, - theme = 'onedark', - component_separators = '|', - section_separators = '', - }, - }, - }, + -- Status line related configs go here + require 'kickstart.plugins.statusline', { -- Add indentation guides even on blank lines diff --git a/lua/kickstart/plugins/autoformat.lua b/lua/kickstart/plugins/autoformat.lua index bc56b15..855f350 100644 --- a/lua/kickstart/plugins/autoformat.lua +++ b/lua/kickstart/plugins/autoformat.lua @@ -5,6 +5,7 @@ return { 'neovim/nvim-lspconfig', + config = function() -- Switch for controlling whether you want autoformatting. -- Use :KickstartFormatToggle to toggle autoformatting on or off @@ -28,11 +29,9 @@ return { return _augroups[client.id] end - -- Whenever an LSP attaches to a buffer, we will run this function. - -- - -- See `:help LspAttach` for more information about this autocmd event. vim.api.nvim_create_autocmd('LspAttach', { group = vim.api.nvim_create_augroup('kickstart-lsp-attach-format', { clear = true }), + -- This is where we attach the autoformatting for reasonable clients callback = function(args) local client_id = args.data.client_id @@ -50,8 +49,6 @@ return { return end - -- Create an autocmd that will run *before* we save the buffer. - -- Run the formatting command for the LSP that has just attached. vim.api.nvim_create_autocmd('BufWritePre', { group = get_augroup(client), buffer = bufnr, @@ -60,12 +57,7 @@ return { return end - vim.lsp.buf.format { - async = false, - filter = function(c) - return c.id == client.id - end, - } + vim.lsp.buf.format { async = false } end, }) end, diff --git a/lua/kickstart/plugins/statusline.lua b/lua/kickstart/plugins/statusline.lua new file mode 100644 index 0000000..f54393f --- /dev/null +++ b/lua/kickstart/plugins/statusline.lua @@ -0,0 +1,14 @@ +return { + -- Set lualine as statusline + 'nvim-lualine/lualine.nvim', + -- See `:help lualine.txt` + opts = { + options = { + icons_enabled = false, + theme = 'tokyonight', + component_separators = '|', + section_separators = '', + }, + }, +} + diff --git a/lua/kickstart/plugins/theme.lua b/lua/kickstart/plugins/theme.lua new file mode 100644 index 0000000..794aa4d --- /dev/null +++ b/lua/kickstart/plugins/theme.lua @@ -0,0 +1,10 @@ +return { + "folke/tokyonight.nvim", + lazy = false, + priority = 1000, + opts = {}, + config = function() + vim.cmd.colorscheme 'tokyonight-storm' + end, +} +