From 5e4d24cb2faf37d341bc906affcc2cac21919c51 Mon Sep 17 00:00:00 2001 From: Chris Patti Date: Sun, 4 Jun 2023 16:10:59 +0000 Subject: [PATCH 01/19] Revert "Refactor theme and status line into their own file" This reverts commit cdaa750c86cfc0c8f2fc1c8638b7296c327bf5a9. --- init.lua | 29 ++++++++++++++++++++++------ lua/kickstart/plugins/autoformat.lua | 14 +++++++++++--- lua/kickstart/plugins/statusline.lua | 14 -------------- lua/kickstart/plugins/theme.lua | 10 ---------- 4 files changed, 34 insertions(+), 33 deletions(-) delete mode 100644 lua/kickstart/plugins/statusline.lua delete mode 100644 lua/kickstart/plugins/theme.lua diff --git a/init.lua b/init.lua index 5e9e567..ca2da6e 100644 --- a/init.lua +++ b/init.lua @@ -122,18 +122,35 @@ 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, }, }, - -- Theme related configs go here - require 'kickstart.plugins.theme', + { + -- Theme inspired by Atom + 'navarasu/onedark.nvim', + priority = 1000, + config = function() + vim.cmd.colorscheme 'onedark' + end, + }, - -- Status line related configs go here - require 'kickstart.plugins.statusline', + { + -- Set lualine as statusline + 'nvim-lualine/lualine.nvim', + -- See `:help lualine.txt` + opts = { + options = { + icons_enabled = false, + theme = 'onedark', + component_separators = '|', + section_separators = '', + }, + }, + }, { -- Add indentation guides even on blank lines diff --git a/lua/kickstart/plugins/autoformat.lua b/lua/kickstart/plugins/autoformat.lua index 855f350..bc56b15 100644 --- a/lua/kickstart/plugins/autoformat.lua +++ b/lua/kickstart/plugins/autoformat.lua @@ -5,7 +5,6 @@ return { 'neovim/nvim-lspconfig', - config = function() -- Switch for controlling whether you want autoformatting. -- Use :KickstartFormatToggle to toggle autoformatting on or off @@ -29,9 +28,11 @@ 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 @@ -49,6 +50,8 @@ 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, @@ -57,7 +60,12 @@ return { return end - vim.lsp.buf.format { async = false } + vim.lsp.buf.format { + async = false, + filter = function(c) + return c.id == client.id + end, + } end, }) end, diff --git a/lua/kickstart/plugins/statusline.lua b/lua/kickstart/plugins/statusline.lua deleted file mode 100644 index f54393f..0000000 --- a/lua/kickstart/plugins/statusline.lua +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 794aa4d..0000000 --- a/lua/kickstart/plugins/theme.lua +++ /dev/null @@ -1,10 +0,0 @@ -return { - "folke/tokyonight.nvim", - lazy = false, - priority = 1000, - opts = {}, - config = function() - vim.cmd.colorscheme 'tokyonight-storm' - end, -} - From e6cb90b2b33127dafdee351cc84a1d4ae06ce71f Mon Sep 17 00:00:00 2001 From: Chris Patti Date: Wed, 7 Jun 2023 20:41:30 -0400 Subject: [PATCH 02/19] Fixes #336 - Enabale treesitter indent for Python Tested in my local configuratoin. Indenting works great. --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 5e9e567..200bfe7 100644 --- a/init.lua +++ b/init.lua @@ -295,7 +295,7 @@ require('nvim-treesitter.configs').setup { auto_install = false, highlight = { enable = true }, - indent = { enable = true, disable = { 'python' } }, + indent = { enable = true }, incremental_selection = { enable = true, keymaps = { From ac07c5c59cb57688f0c63fa74a28bcc3d7795ecd Mon Sep 17 00:00:00 2001 From: Gavin Date: Wed, 14 Jun 2023 17:21:15 -0400 Subject: [PATCH 03/19] Add legacy tag to fidget to avoid deprecation warning --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 57c9af4..c621745 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', tag = 'legacy', opts = {} }, -- Additional lua configuration, makes nvim stuff amazing! 'folke/neodev.nvim', From be90f025de58b08871d866eab8e4d3baeb9f4f97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maria=20Jos=C3=A9=20Solano?= Date: Fri, 16 Jun 2023 21:12:11 -0700 Subject: [PATCH 04/19] Use call_parentheses --- .stylua.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stylua.toml b/.stylua.toml index 5d12dbd..139e939 100644 --- a/.stylua.toml +++ b/.stylua.toml @@ -3,4 +3,4 @@ line_endings = "Unix" indent_type = "Spaces" indent_width = 2 quote_style = "AutoPreferSingle" -no_call_parentheses = true +call_parentheses = "None" From c45b17ebab9da4913baa09f37c393a1a6962119b Mon Sep 17 00:00:00 2001 From: Juan Giordana Date: Sun, 18 Jun 2023 00:10:49 -0300 Subject: [PATCH 05/19] Add descriptions for debugging keybindings. Add descriptions for debugging key bindings. Improve formatting by changing double quotes to single quotes in order to keep compatibility with the rest of the kickstart.nvim project. --- lua/kickstart/plugins/debug.lua | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/lua/kickstart/plugins/debug.lua b/lua/kickstart/plugins/debug.lua index deeda56..7fc783f 100644 --- a/lua/kickstart/plugins/debug.lua +++ b/lua/kickstart/plugins/debug.lua @@ -43,14 +43,14 @@ return { } -- Basic debugging keymaps, feel free to change to your liking! - vim.keymap.set('n', '', dap.continue) - vim.keymap.set('n', '', dap.step_into) - vim.keymap.set('n', '', dap.step_over) - vim.keymap.set('n', '', dap.step_out) - vim.keymap.set('n', 'b', dap.toggle_breakpoint) + vim.keymap.set('n', '', dap.continue, { desc = 'Debug: Start/Continue' }) + vim.keymap.set('n', '', dap.step_into, { desc = 'Debug: Step Into' }) + vim.keymap.set('n', '', dap.step_over, { desc = 'Debug: Step Over' }) + vim.keymap.set('n', '', dap.step_out, { desc = 'Debug: Step Out' }) + vim.keymap.set('n', 'b', dap.toggle_breakpoint, { desc = 'Debug: Toggle Breakpoint' }) vim.keymap.set('n', 'B', function() dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ') - end) + end, { desc = 'Debug: Set Breakpoint' }) -- Dap UI setup -- For more information, see |:help nvim-dap-ui| @@ -69,13 +69,14 @@ return { step_back = 'b', run_last = '▶▶', terminate = '⏹', - disconnect = "⏏", + disconnect = '⏏', }, }, } - -- 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) - + + -- 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, { desc = 'Debug: See last session result.' }) + 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 d8b3b774bb642a9bdb2930f2ef0dd09e29a2f00c Mon Sep 17 00:00:00 2001 From: ilian Date: Sun, 18 Jun 2023 16:20:34 +0200 Subject: [PATCH 06/19] Fix typo in ignorecase comment In order to perform a case-sensitive search with ignorecase, the pattern should contain `\C` instead of `/C`. --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index c621745..fd36919 100644 --- a/init.lua +++ b/init.lua @@ -229,7 +229,7 @@ vim.o.breakindent = true -- Save undo history vim.o.undofile = true --- Case insensitive searching UNLESS /C or capital in search +-- Case-insensitive searching UNLESS \C or capital in search vim.o.ignorecase = true vim.o.smartcase = true From 957655ddb8be837a37c8e1fd0dd7f5c49705986e Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy Date: Sat, 1 Jul 2023 12:34:20 -0400 Subject: [PATCH 07/19] 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 fd36919..f8d9383 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 08/19] =?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 64f386c..99914cf 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 09/19] 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 64f386c..e0b0470 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 10/19] Remove timeout --- init.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/init.lua b/init.lua index f8d9383..859d9d2 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 11/19] 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 4a128bc..b38867d 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 12/19] 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 b38867d..ef59760 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 13/19] 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 859d9d2..e5cbed9 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 14/19] 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 e5cbed9..c6e7a98 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 15/19] 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 c6e7a98..160d940 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 16/19] 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 160d940..933f5f1 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 17/19] fix: fix brackets --- init.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/init.lua b/init.lua index 933f5f1..f5389e4 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 18/19] fix: missing comma --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index f5389e4..1192c46 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 19/19] 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 1192c46..1332c3b 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: