From c1ae9092cbd2b75ee25284a594209a8147609cef Mon Sep 17 00:00:00 2001 From: theoboldalex <44616505+theoboldalex@users.noreply.github.com> Date: Thu, 22 Aug 2024 21:49:25 +0100 Subject: [PATCH 01/23] Update README.md (#1091) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3f19854c..0b56eab3 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,8 @@ External Requirements: - A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons - if you have it set `vim.g.have_nerd_font` in `init.lua` to true - Language Setup: - - If want to write Typescript, you need `npm` - - If want to write Golang, you will need `go` + - If you want to write Typescript, you need `npm` + - If you want to write Golang, you will need `go` - etc. > **NOTE** From 554a054bf9e0f04b637b7913b17327606f0ec9d0 Mon Sep 17 00:00:00 2001 From: Matt Gallagher <46973220+mattgallagher92@users.noreply.github.com> Date: Thu, 22 Aug 2024 21:53:57 +0100 Subject: [PATCH 02/23] Add note in README about lazy-lock.json (#1090) --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 0b56eab3..53ae459c 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,10 @@ fork to your machine using one of the commands below, depending on your OS. > Your fork's url will be something like this: > `https://github.com//kickstart.nvim.git` +You likely want to remove `lazy-lock.json` from your fork's `.gitignore` file +too - it's ignored in the kickstart repo to make maintenance easier, but it's +[recommmended to track it in version control](https://lazy.folke.io/usage/lockfile). + #### Clone kickstart.nvim > **NOTE** > If following the recommended step above (i.e., forking the repo), replace From ce0c7340fff68fb45d817478a8c0facb24425149 Mon Sep 17 00:00:00 2001 From: "Michael L." Date: Thu, 22 Aug 2024 22:56:33 +0200 Subject: [PATCH 03/23] Check for loop or uv for lazypath (#1095) --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 220d3045..314a05b6 100644 --- a/init.lua +++ b/init.lua @@ -207,7 +207,7 @@ vim.api.nvim_create_autocmd('TextYankPost', { -- [[ Install `lazy.nvim` plugin manager ]] -- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim' -if not vim.uv.fs_stat(lazypath) then +if not (vim.uv or vim.loop).fs_stat(lazypath) then local lazyrepo = 'https://github.com/folke/lazy.nvim.git' local out = vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath } if vim.v.shell_error ~= 0 then From ac78e7d9e77048fa7d5b0711f85aab93508e71a7 Mon Sep 17 00:00:00 2001 From: Ihsan Tonuzi <115842560+iton0@users.noreply.github.com> Date: Thu, 22 Aug 2024 21:00:39 -0400 Subject: [PATCH 04/23] refactor: update treesitter and which-key config (#1068) --- init.lua | 60 +++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 46 insertions(+), 14 deletions(-) diff --git a/init.lua b/init.lua index 314a05b6..41b5a97b 100644 --- a/init.lua +++ b/init.lua @@ -275,7 +275,44 @@ require('lazy').setup({ 'folke/which-key.nvim', event = 'VimEnter', -- Sets the loading event to 'VimEnter' config = function() -- This is the function that runs, AFTER loading - require('which-key').setup() + require('which-key').setup { + icons = { + -- set icon mappings to true if you have a Nerd Font + mappings = vim.g.have_nerd_font, + -- If you are using a Nerd Font: set icons.keys to an empty table which will use the + -- default whick-key.nvim defined Nerd Font icons, otherwise define a string table + keys = vim.g.have_nerd_font and {} or { + Up = ' ', + Down = ' ', + Left = ' ', + Right = ' ', + C = ' ', + M = ' ', + D = ' ', + S = ' ', + CR = ' ', + Esc = ' ', + ScrollWheelDown = ' ', + ScrollWheelUp = ' ', + NL = ' ', + BS = ' ', + Space = ' ', + Tab = ' ', + F1 = '', + F2 = '', + F3 = '', + F4 = '', + F5 = '', + F6 = '', + F7 = '', + F8 = '', + F9 = '', + F10 = '', + F11 = '', + F12 = '', + }, + }, + } -- Document existing key chains require('which-key').add { @@ -843,6 +880,8 @@ require('lazy').setup({ { -- Highlight, edit, and navigate code 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate', + main = 'nvim-treesitter.configs', -- Sets main module to use for opts + -- [[ Configure Treesitter ]] See `:help nvim-treesitter` opts = { ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }, -- Autoinstall languages that are not installed @@ -856,19 +895,12 @@ require('lazy').setup({ }, indent = { enable = true, disable = { 'ruby' } }, }, - config = function(_, opts) - -- [[ Configure Treesitter ]] See `:help nvim-treesitter` - - ---@diagnostic disable-next-line: missing-fields - require('nvim-treesitter.configs').setup(opts) - - -- There are additional nvim-treesitter modules that you can use to interact - -- with nvim-treesitter. You should go explore a few and see what interests you: - -- - -- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod` - -- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context - -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects - end, + -- There are additional nvim-treesitter modules that you can use to interact + -- with nvim-treesitter. You should go explore a few and see what interests you: + -- + -- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod` + -- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context + -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects }, -- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the From d452633b35d4dd9ada06efeca95750beaf0f584f Mon Sep 17 00:00:00 2001 From: Bayram Kazik <48856944+bayramkzk@users.noreply.github.com> Date: Sun, 25 Aug 2024 00:31:43 +0300 Subject: [PATCH 05/23] Include visual mode in LSP code action keymap (#1060) (#1064) --- init.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 41b5a97b..13ea93a2 100644 --- a/init.lua +++ b/init.lua @@ -316,7 +316,7 @@ require('lazy').setup({ -- Document existing key chains require('which-key').add { - { 'c', group = '[C]ode' }, + { 'c', group = '[C]ode', mode = { 'n', 'x' } }, { 'd', group = '[D]ocument' }, { 'r', group = '[R]ename' }, { 's', group = '[S]earch' }, @@ -507,8 +507,9 @@ require('lazy').setup({ -- -- In this case, we create a function that lets us more easily define mappings specific -- for LSP related items. It sets the mode, buffer and description for us each time. - local map = function(keys, func, desc) - vim.keymap.set('n', keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc }) + local map = function(keys, func, desc, mode) + mode = mode or 'n' + vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc }) end -- Jump to the definition of the word under your cursor. @@ -542,7 +543,7 @@ require('lazy').setup({ -- Execute a code action, usually your cursor needs to be on top of an error -- or a suggestion from your LSP for this to activate. - map('ca', vim.lsp.buf.code_action, '[C]ode [A]ction') + map('ca', vim.lsp.buf.code_action, '[C]ode [A]ction', { 'n', 'x' }) -- WARN: This is not Goto Definition, this is Goto Declaration. -- For example, in C this would take you to the header. From f49cc6c93525326d6db409191c1c36dcc2e41b6e Mon Sep 17 00:00:00 2001 From: Bayram Kazik <48856944+bayramkzk@users.noreply.github.com> Date: Mon, 26 Aug 2024 06:23:17 +0300 Subject: [PATCH 06/23] Enable silent option for default neo-tree plugin keybinding (#1108) --- lua/kickstart/plugins/neo-tree.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/kickstart/plugins/neo-tree.lua b/lua/kickstart/plugins/neo-tree.lua index f126d68a..bd442269 100644 --- a/lua/kickstart/plugins/neo-tree.lua +++ b/lua/kickstart/plugins/neo-tree.lua @@ -11,7 +11,7 @@ return { }, cmd = 'Neotree', keys = { - { '\\', ':Neotree reveal', desc = 'NeoTree reveal' }, + { '\\', ':Neotree reveal', desc = 'NeoTree reveal', silent = true }, }, opts = { filesystem = { From e4a5300bdbdc644a3a265513b386aa30c2337088 Mon Sep 17 00:00:00 2001 From: Harshit Pant <97608579+pantharshit007@users.noreply.github.com> Date: Mon, 26 Aug 2024 08:57:46 +0530 Subject: [PATCH 07/23] Fix: updated the windows installation commands (#1101) * Update README.md * Update README.md * Fix: updated the windows installation commands --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 53ae459c..e14cbe22 100644 --- a/README.md +++ b/README.md @@ -81,13 +81,13 @@ git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HO If you're using `cmd.exe`: ``` -git clone https://github.com/nvim-lua/kickstart.nvim.git %localappdata%\nvim\ +git clone https://github.com/nvim-lua/kickstart.nvim.git "%localappdata%\nvim" ``` If you're using `powershell.exe` ``` -git clone https://github.com/nvim-lua/kickstart.nvim.git $env:LOCALAPPDATA\nvim\ +git clone https://github.com/nvim-lua/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim" ``` From c76c323a7cc30186a77e2a68c7ecd8f62973cad9 Mon Sep 17 00:00:00 2001 From: Ihsan Tonuzi <115842560+iton0@users.noreply.github.com> Date: Sun, 25 Aug 2024 23:28:26 -0400 Subject: [PATCH 08/23] fix: remove deprecated opt for conform.nvim (#1070) - changed lsp_fallback -> lsp_format - updated format_on_save function to reflect change above --- init.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 13ea93a2..edc41822 100644 --- a/init.lua +++ b/init.lua @@ -675,7 +675,7 @@ require('lazy').setup({ { 'f', function() - require('conform').format { async = true, lsp_fallback = true } + require('conform').format { async = true, lsp_format = 'fallback' } end, mode = '', desc = '[F]ormat buffer', @@ -688,9 +688,15 @@ require('lazy').setup({ -- have a well standardized coding style. You can add additional -- languages here or re-enable it for the disabled ones. local disable_filetypes = { c = true, cpp = true } + local lsp_format_opt + if disable_filetypes[vim.bo[bufnr].filetype] then + lsp_format_opt = 'never' + else + lsp_format_opt = 'fallback' + end return { timeout_ms = 500, - lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype], + lsp_format = lsp_format_opt, } end, formatters_by_ft = { From 24d368f9ff3a951f9760c3c0e776a52726401f4f Mon Sep 17 00:00:00 2001 From: Ihsan Tonuzi <115842560+iton0@users.noreply.github.com> Date: Mon, 26 Aug 2024 12:17:22 -0400 Subject: [PATCH 09/23] cleanup: refactor which-key configuration for cleaner setup (#1102) - Moved `which-key` configuration from inline `config` to `opts` for better organization. - Updated the key mappings setup to use `spec` for defining existing key chains. - Removed deprecated or unnecessary comments and code. This change aligns with updated `which-key` configuration practices, improving readability and maintainability as recommended by @VlaDexa in #1068. --- init.lua | 96 +++++++++++++++++++++++++++----------------------------- 1 file changed, 47 insertions(+), 49 deletions(-) diff --git a/init.lua b/init.lua index edc41822..2513d537 100644 --- a/init.lua +++ b/init.lua @@ -274,57 +274,55 @@ require('lazy').setup({ { -- Useful plugin to show you pending keybinds. 'folke/which-key.nvim', event = 'VimEnter', -- Sets the loading event to 'VimEnter' - config = function() -- This is the function that runs, AFTER loading - require('which-key').setup { - icons = { - -- set icon mappings to true if you have a Nerd Font - mappings = vim.g.have_nerd_font, - -- If you are using a Nerd Font: set icons.keys to an empty table which will use the - -- default whick-key.nvim defined Nerd Font icons, otherwise define a string table - keys = vim.g.have_nerd_font and {} or { - Up = ' ', - Down = ' ', - Left = ' ', - Right = ' ', - C = ' ', - M = ' ', - D = ' ', - S = ' ', - CR = ' ', - Esc = ' ', - ScrollWheelDown = ' ', - ScrollWheelUp = ' ', - NL = ' ', - BS = ' ', - Space = ' ', - Tab = ' ', - F1 = '', - F2 = '', - F3 = '', - F4 = '', - F5 = '', - F6 = '', - F7 = '', - F8 = '', - F9 = '', - F10 = '', - F11 = '', - F12 = '', - }, + opts = { + icons = { + -- set icon mappings to true if you have a Nerd Font + mappings = vim.g.have_nerd_font, + -- If you are using a Nerd Font: set icons.keys to an empty table which will use the + -- default whick-key.nvim defined Nerd Font icons, otherwise define a string table + keys = vim.g.have_nerd_font and {} or { + Up = ' ', + Down = ' ', + Left = ' ', + Right = ' ', + C = ' ', + M = ' ', + D = ' ', + S = ' ', + CR = ' ', + Esc = ' ', + ScrollWheelDown = ' ', + ScrollWheelUp = ' ', + NL = ' ', + BS = ' ', + Space = ' ', + Tab = ' ', + F1 = '', + F2 = '', + F3 = '', + F4 = '', + F5 = '', + F6 = '', + F7 = '', + F8 = '', + F9 = '', + F10 = '', + F11 = '', + F12 = '', }, - } - -- Document existing key chains - require('which-key').add { - { 'c', group = '[C]ode', mode = { 'n', 'x' } }, - { 'd', group = '[D]ocument' }, - { 'r', group = '[R]ename' }, - { 's', group = '[S]earch' }, - { 'w', group = '[W]orkspace' }, - { 't', group = '[T]oggle' }, - { 'h', group = 'Git [H]unk', mode = { 'n', 'v' } }, - } - end, + -- Document existing key chains + spec = { + { 'c', group = '[C]ode', mode = { 'n', 'x' } }, + { 'd', group = '[D]ocument' }, + { 'r', group = '[R]ename' }, + { 's', group = '[S]earch' }, + { 'w', group = '[W]orkspace' }, + { 't', group = '[T]oggle' }, + { 'h', group = 'Git [H]unk', mode = { 'n', 'v' } }, + }, + }, + }, }, -- NOTE: Plugins can specify dependencies. From a22976111e406ec0e4903ae78bf66a1fc0125b8a Mon Sep 17 00:00:00 2001 From: Damjan 9000 Date: Mon, 26 Aug 2024 22:43:59 +0200 Subject: [PATCH 10/23] Fix the which-key spec issue caused by recent cleanup (#1113) The recent cleanup accidentally broke the leader key specs because the spec block was in the wrong level of braces. That resulted in which-key no longer showing the description of the key chains such as [S]earch and others. --- init.lua | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/init.lua b/init.lua index 2513d537..13c8143d 100644 --- a/init.lua +++ b/init.lua @@ -310,17 +310,17 @@ require('lazy').setup({ F11 = '', F12 = '', }, + }, - -- Document existing key chains - spec = { - { 'c', group = '[C]ode', mode = { 'n', 'x' } }, - { 'd', group = '[D]ocument' }, - { 'r', group = '[R]ename' }, - { 's', group = '[S]earch' }, - { 'w', group = '[W]orkspace' }, - { 't', group = '[T]oggle' }, - { 'h', group = 'Git [H]unk', mode = { 'n', 'v' } }, - }, + -- Document existing key chains + spec = { + { 'c', group = '[C]ode', mode = { 'n', 'x' } }, + { 'd', group = '[D]ocument' }, + { 'r', group = '[R]ename' }, + { 's', group = '[S]earch' }, + { 'w', group = '[W]orkspace' }, + { 't', group = '[T]oggle' }, + { 'h', group = 'Git [H]unk', mode = { 'n', 'v' } }, }, }, }, From 7201dc480134f41dd1be1f8f9b8f8470aac82a3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Baquero?= <88566759+Cheveniko@users.noreply.github.com> Date: Tue, 10 Sep 2024 15:27:24 -0500 Subject: [PATCH 11/23] feat: update references of tsserver to ts_ls (#1131) --- init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 13c8143d..ea86b792 100644 --- a/init.lua +++ b/init.lua @@ -614,8 +614,8 @@ require('lazy').setup({ -- Some languages (like typescript) have entire language plugins that can be useful: -- https://github.com/pmizio/typescript-tools.nvim -- - -- But for many setups, the LSP (`tsserver`) will work just fine - -- tsserver = {}, + -- But for many setups, the LSP (`ts_ls`) will work just fine + -- ts_ls = {}, -- lua_ls = { @@ -656,7 +656,7 @@ require('lazy').setup({ local server = servers[server_name] or {} -- This handles overriding only values explicitly passed -- by the server configuration above. Useful when disabling - -- certain features of an LSP (for example, turning off formatting for tsserver) + -- certain features of an LSP (for example, turning off formatting for ts_ls) server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {}) require('lspconfig')[server_name].setup(server) end, From 4120893b8a1f31a0957f2f891f7fbef73ddfb9b1 Mon Sep 17 00:00:00 2001 From: Bastien Traverse Date: Tue, 24 Sep 2024 17:06:14 +0200 Subject: [PATCH 12/23] fix: update lazy uninstall information link (#1148) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e14cbe22..800ca990 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ examples of adding popularly requested plugins. `~/.local/share/nvim-kickstart`. You can apply this approach to any Neovim distribution that you would like to try out. * What if I want to "uninstall" this configuration: - * See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information + * See [lazy.nvim uninstall](https://lazy.folke.io/usage#-uninstalling) information * Why is the kickstart `init.lua` a single file? Wouldn't it make sense to split it into multiple files? * The main purpose of kickstart is to serve as a teaching tool and a reference configuration that someone can easily use to `git clone` as a basis for their own. From 161ac37a693783b6ab3207c45c72aadf889e54e9 Mon Sep 17 00:00:00 2001 From: Joshua Nussbaum <67082011+joshuanussbaum@users.noreply.github.com> Date: Thu, 26 Sep 2024 19:21:12 -0500 Subject: [PATCH 13/23] update readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 800ca990..4cd71041 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ too - it's ignored in the kickstart repo to make maintenance easier, but it's
Linux and Mac ```sh -git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim +git clone https://github.com:0x4D5352/my_kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim ```
@@ -81,13 +81,13 @@ git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HO If you're using `cmd.exe`: ``` -git clone https://github.com/nvim-lua/kickstart.nvim.git "%localappdata%\nvim" +git clone https://github.com:0x4D5352/my_kickstart.nvim.git %userprofile%\AppData\Local\nvim\ ``` If you're using `powershell.exe` ``` -git clone https://github.com/nvim-lua/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim" +git clone https://github.com:0x4D5352/my_kickstart.nvim.git $env:USERPROFILE\AppData\Local\nvim\ ``` From f1f5f208740b4c5bd8c11bd3f017553f003e5206 Mon Sep 17 00:00:00 2001 From: Joshua <67082011+0x4D5352@users.noreply.github.com> Date: Sun, 14 Apr 2024 11:29:20 -0500 Subject: [PATCH 14/23] fix bad git clone quickstart --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4cd71041..a810faea 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ too - it's ignored in the kickstart repo to make maintenance easier, but it's
Linux and Mac ```sh -git clone https://github.com:0x4D5352/my_kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim +git clone https://github.com/0x4D5352/my_kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim ```
@@ -87,7 +87,7 @@ git clone https://github.com:0x4D5352/my_kickstart.nvim.git %userprofile%\AppDat If you're using `powershell.exe` ``` -git clone https://github.com:0x4D5352/my_kickstart.nvim.git $env:USERPROFILE\AppData\Local\nvim\ +git clone https://github.com/0x4D5352/my_kickstart.nvim.git $env:USERPROFILE\AppData\Local\nvim\ ``` From ffc4161057237d02c563f2f6f668596195e946b7 Mon Sep 17 00:00:00 2001 From: Joshua Nussbaum <67082011+joshuanussbaum@users.noreply.github.com> Date: Thu, 26 Sep 2024 19:22:47 -0500 Subject: [PATCH 15/23] update init.lua --- init.lua | 125 ++++++++++--------------------------------------------- 1 file changed, 22 insertions(+), 103 deletions(-) diff --git a/init.lua b/init.lua index ea86b792..3a0da024 100644 --- a/init.lua +++ b/init.lua @@ -1,97 +1,11 @@ ---[[ - -===================================================================== -==================== READ THIS BEFORE CONTINUING ==================== -===================================================================== -======== .-----. ======== -======== .----------------------. | === | ======== -======== |.-""""""""""""""""""-.| |-----| ======== -======== || || | === | ======== -======== || KICKSTART.NVIM || |-----| ======== -======== || || | === | ======== -======== || || |-----| ======== -======== ||:Tutor || |:::::| ======== -======== |'-..................-'| |____o| ======== -======== `"")----------------(""` ___________ ======== -======== /::::::::::| |::::::::::\ \ no mouse \ ======== -======== /:::========| |==hjkl==:::\ \ required \ ======== -======== '""""""""""""' '""""""""""""' '""""""""""' ======== -======== ======== -===================================================================== -===================================================================== - -What is Kickstart? - - Kickstart.nvim is *not* a distribution. - - Kickstart.nvim is a starting point for your own configuration. - 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 can start exploring, configuring and tinkering to - make Neovim your own! That might mean leaving Kickstart just the way it is for a while - or immediately breaking it into modular pieces. It's up to you! - - If you don't know anything about Lua, I recommend taking some time to read through - a guide. One possible example which will only take 10-15 minutes: - - https://learnxinyminutes.com/docs/lua/ - - After understanding a bit more about Lua, you can use `:help lua-guide` as a - reference for how Neovim integrates Lua. - - :help lua-guide - - (or HTML version): https://neovim.io/doc/user/lua-guide.html - -Kickstart Guide: - - TODO: The very first thing you should do is to run the command `:Tutor` in Neovim. - - If you don't know what this means, type the following: - - - - : - - Tutor - - - - (If you already know the Neovim basics, you can skip this step.) - - Once you've completed that, you can continue working through **AND READING** the rest - of the kickstart init.lua. - - Next, run AND READ `:help`. - This will open up a help window with some basic information - about reading, navigating and searching the builtin help documentation. - - This should be the first place you go to look when you're stuck or confused - with something. It's one of my favorite Neovim features. - - MOST IMPORTANTLY, we provide a keymap "sh" to [s]earch the [h]elp documentation, - which is very useful when you're not exactly sure of what you're looking for. - - I have left several `:help X` comments throughout the init.lua - These are hints about where to find more information about the relevant settings, - plugins or Neovim features used in Kickstart. - - NOTE: Look for lines like this - - Throughout the file. These are for you, the reader, to help you understand what is happening. - Feel free to delete them once you know what you're doing, but they should serve as a guide - for when you are first encountering a few different constructs in your Neovim config. - -If you experience any errors while trying to install kickstart, run `:checkhealth` for more info. - -I hope you enjoy your Neovim journey, -- TJ - -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 loaded (otherwise wrong leader will be used) vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' --- Set to true if you have a Nerd Font installed and selected in the terminal -vim.g.have_nerd_font = false +-- Set to true if you have a Nerd Font installed +vim.g.have_nerd_font = true -- [[ Setting options ]] -- See `:help vim.opt` @@ -102,7 +16,7 @@ vim.g.have_nerd_font = false vim.opt.number = true -- You can also add relative line numbers, to help with jumping. -- Experiment for yourself to see if you like it! --- vim.opt.relativenumber = true +vim.opt.relativenumber = true -- Enable mouse mode, can be useful for resizing splits for example! vim.opt.mouse = 'a' @@ -176,10 +90,10 @@ vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagn vim.keymap.set('t', '', '', { desc = 'Exit terminal mode' }) -- TIP: Disable arrow keys in normal mode --- vim.keymap.set('n', '', 'echo "Use h to move!!"') --- vim.keymap.set('n', '', 'echo "Use l to move!!"') --- vim.keymap.set('n', '', 'echo "Use k to move!!"') --- vim.keymap.set('n', '', 'echo "Use j to move!!"') +vim.keymap.set('n', '', 'echo "Use h to move!!"') +vim.keymap.set('n', '', 'echo "Use l to move!!"') +vim.keymap.set('n', '', 'echo "Use k to move!!"') +vim.keymap.set('n', '', 'echo "Use j to move!!"') -- Keybinds to make split navigation easier. -- Use CTRL+ to switch between windows @@ -607,7 +521,7 @@ require('lazy').setup({ local servers = { -- clangd = {}, -- gopls = {}, - -- pyright = {}, + pyright = {}, -- rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- @@ -700,7 +614,7 @@ require('lazy').setup({ formatters_by_ft = { lua = { 'stylua' }, -- Conform can also run multiple formatters sequentially - -- python = { "isort", "black" }, + python = { 'isort', 'black' }, -- -- You can use 'stop_after_first' to run the first available formatter from the list -- javascript = { "prettierd", "prettier", stop_after_first = true }, @@ -728,12 +642,12 @@ require('lazy').setup({ -- `friendly-snippets` contains a variety of premade snippets. -- See the README about individual language/framework/plugin snippets: -- https://github.com/rafamadriz/friendly-snippets - -- { - -- 'rafamadriz/friendly-snippets', - -- config = function() - -- require('luasnip.loaders.from_vscode').lazy_load() - -- end, - -- }, + { + 'rafamadriz/friendly-snippets', + config = function() + require('luasnip.loaders.from_vscode').lazy_load() + end, + }, }, }, 'saadparwaiz1/cmp_luasnip', @@ -819,6 +733,7 @@ require('lazy').setup({ { name = 'nvim_lsp' }, { name = 'luasnip' }, { name = 'path' }, + { name = 'copilot' }, }, } end, @@ -835,7 +750,7 @@ require('lazy').setup({ -- Load the colorscheme here. -- Like many other themes, this one has different styles, and you could load -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. - vim.cmd.colorscheme 'tokyonight-night' + vim.cmd.colorscheme 'tokyonight-storm' -- You can configure highlights by doing something like: vim.cmd.hi 'Comment gui=none' @@ -887,6 +802,10 @@ require('lazy').setup({ build = ':TSUpdate', main = 'nvim-treesitter.configs', -- Sets main module to use for opts -- [[ Configure Treesitter ]] See `:help nvim-treesitter` + dependencies = { + -- NOTE:: IDK if this can be installed through ensure_installed, but the repo says to do it like so: + { 'nushell/tree-sitter-nu' }, + }, opts = { ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }, -- Autoinstall languages that are not installed @@ -929,7 +848,7 @@ require('lazy').setup({ -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. -- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins` - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, }, { ui = { -- If you are using a Nerd Font: set icons to an empty table which will use the From ee526979246d043f19fcced90293795066824410 Mon Sep 17 00:00:00 2001 From: Joshua <67082011+0x4D5352@users.noreply.github.com> Date: Mon, 29 Apr 2024 17:58:55 -0500 Subject: [PATCH 16/23] Update custom plugins init.lua --- lua/custom/plugins/init.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index be0eb9d8..4c99b251 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -3,3 +3,20 @@ -- -- See the kickstart.nvim README for more information return {} + +--[[ +-- Plugins to try: +-- https://github.com/ThePrimeagen/refactoring.nvim +-- https://github.com/stevearc/oil.nvim +-- https://github.com/debugloop/telescope-undo.nvim +-- https://github.com/nvim-java/nvim-java +-- https://github.com/epwalsh/obsidian.nvim +-- https://github.com/nvim-neotest/neotest +-- https://github.com/rafcamlet/nvim-luapad +-- https://github.com/ellisonleao/glow.nvim +-- https://github.com/Vigemus/iron.nvim +-- https://github.com/TimUntersberger/neofs +-- https://github.com/vipul-sharma20/nvim-jira +-- https://github.com/walterl/centerfold +-- https://github.com/tricktux/pomodoro.vim/tree/master - but fork it into your own in lua +--]] From 8f85ffb9ec334a7726c78491801fe99a911315d0 Mon Sep 17 00:00:00 2001 From: Joshua <67082011+0x4D5352@users.noreply.github.com> Date: Mon, 29 Apr 2024 18:00:00 -0500 Subject: [PATCH 17/23] add custom plugins --- lua/custom/plugins/copilot-cmp.lua | 6 ++++++ lua/custom/plugins/copilot.lua | 7 +++++++ lua/custom/plugins/harpoon.lua | 9 +++++++++ lua/custom/plugins/pkl-ls.lua | 18 ++++++++++++++++++ lua/custom/plugins/pkl-neovim.lua | 7 +++++++ lua/custom/plugins/vim-be-good.lua | 3 +++ lua/custom/plugins/zellij-nav.lua | 22 ++++++++++++++++++++++ 7 files changed, 72 insertions(+) create mode 100644 lua/custom/plugins/copilot-cmp.lua create mode 100644 lua/custom/plugins/copilot.lua create mode 100644 lua/custom/plugins/harpoon.lua create mode 100644 lua/custom/plugins/pkl-ls.lua create mode 100644 lua/custom/plugins/pkl-neovim.lua create mode 100644 lua/custom/plugins/vim-be-good.lua create mode 100644 lua/custom/plugins/zellij-nav.lua diff --git a/lua/custom/plugins/copilot-cmp.lua b/lua/custom/plugins/copilot-cmp.lua new file mode 100644 index 00000000..f0adb7a6 --- /dev/null +++ b/lua/custom/plugins/copilot-cmp.lua @@ -0,0 +1,6 @@ +return { + 'zbirenbaum/copilot-cmp', + config = function() + require('copilot_cmp').setup() + end, +} diff --git a/lua/custom/plugins/copilot.lua b/lua/custom/plugins/copilot.lua new file mode 100644 index 00000000..23c3a554 --- /dev/null +++ b/lua/custom/plugins/copilot.lua @@ -0,0 +1,7 @@ +return { + 'zbirenbaum/copilot.lua', + opts = { + suggestion = { enabled = false }, + panel = { enabled = false }, + }, +} diff --git a/lua/custom/plugins/harpoon.lua b/lua/custom/plugins/harpoon.lua new file mode 100644 index 00000000..1fa20fde --- /dev/null +++ b/lua/custom/plugins/harpoon.lua @@ -0,0 +1,9 @@ +if true then + return {} +end +-- https://github.com/ThePrimeagen/harpoon/tree/harpoon2 - this branch, follow before removing trueflag above +return { + 'ThePrimeagen/harpoon', + branch = 'harpoon2', + dependencies = { { 'nvim-lua/plenary.nvim' } }, +} diff --git a/lua/custom/plugins/pkl-ls.lua b/lua/custom/plugins/pkl-ls.lua new file mode 100644 index 00000000..dac8b3e6 --- /dev/null +++ b/lua/custom/plugins/pkl-ls.lua @@ -0,0 +1,18 @@ +if true then + return {} +end +return { + 'jayadamsmorgan/PklLanguageServer', + build = 'mv Editors/Neovim/pklls-nvim/* .', + config = function() + local capabilities = require('cmp_nvim_lsp').default_capabilities() -- if you are using nvim_cmp for completion + require('pklls-nvim.init').setup { + capabilities = capabilities, -- change or remove this + -- on_attach = custom_on_attach -- change or remove this + -- cmd = custom_path_to_pkl_lsp_server + } + end, + dependencies = { + 'neovim/nvim-lspconfig', + }, +} diff --git a/lua/custom/plugins/pkl-neovim.lua b/lua/custom/plugins/pkl-neovim.lua new file mode 100644 index 00000000..a3b6cbfe --- /dev/null +++ b/lua/custom/plugins/pkl-neovim.lua @@ -0,0 +1,7 @@ +return { + "https://github.com/apple/pkl-neovim", + lazy = true, + event = "BufReadPre *.pkl", + dependencies = {"nvim-treesitter/nvim-treesitter"}, + build = function() vim.cmd("TSInstall! pkl") end, +} diff --git a/lua/custom/plugins/vim-be-good.lua b/lua/custom/plugins/vim-be-good.lua new file mode 100644 index 00000000..b1e2a543 --- /dev/null +++ b/lua/custom/plugins/vim-be-good.lua @@ -0,0 +1,3 @@ +return { + 'ThePrimeagen/vim-be-good', +} diff --git a/lua/custom/plugins/zellij-nav.lua b/lua/custom/plugins/zellij-nav.lua new file mode 100644 index 00000000..d1cd6fea --- /dev/null +++ b/lua/custom/plugins/zellij-nav.lua @@ -0,0 +1,22 @@ +return { + "https://git.sr.ht/~swaits/zellij-nav.nvim", + lazy = true, + event = "VeryLazy", + keys = { + { + "", "ZellijNavigateLeft", + {silent = true, desc = "navigate left"} + }, { + "", "ZellijNavigateDown", + {silent = true, desc = "navigate down"} + }, + { + "", "ZellijNavigateUp", + {silent = true, desc = "navigate up"} + }, { + "", "ZellijNavigateRight", + {silent = true, desc = "navigate right"} + } + }, + opts = {} +} From 5875f2e4186e6596d31e2a32b212aa71eb2c3c4d Mon Sep 17 00:00:00 2001 From: Joshua Nussbaum <67082011+joshuanussbaum@users.noreply.github.com> Date: Thu, 26 Sep 2024 19:23:53 -0500 Subject: [PATCH 18/23] update README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a810faea..4cd71041 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ too - it's ignored in the kickstart repo to make maintenance easier, but it's
Linux and Mac ```sh -git clone https://github.com/0x4D5352/my_kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim +git clone https://github.com:0x4D5352/my_kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim ```
@@ -87,7 +87,7 @@ git clone https://github.com:0x4D5352/my_kickstart.nvim.git %userprofile%\AppDat If you're using `powershell.exe` ``` -git clone https://github.com/0x4D5352/my_kickstart.nvim.git $env:USERPROFILE\AppData\Local\nvim\ +git clone https://github.com:0x4D5352/my_kickstart.nvim.git $env:USERPROFILE\AppData\Local\nvim\ ``` From 56cc4bf52fe0b101524e5986214037c8bec6346e Mon Sep 17 00:00:00 2001 From: Joshua <67082011+0x4D5352@users.noreply.github.com> Date: Sun, 14 Apr 2024 11:29:20 -0500 Subject: [PATCH 19/23] fix bad git clone quickstart --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4cd71041..a810faea 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ too - it's ignored in the kickstart repo to make maintenance easier, but it's
Linux and Mac ```sh -git clone https://github.com:0x4D5352/my_kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim +git clone https://github.com/0x4D5352/my_kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim ```
@@ -87,7 +87,7 @@ git clone https://github.com:0x4D5352/my_kickstart.nvim.git %userprofile%\AppDat If you're using `powershell.exe` ``` -git clone https://github.com:0x4D5352/my_kickstart.nvim.git $env:USERPROFILE\AppData\Local\nvim\ +git clone https://github.com/0x4D5352/my_kickstart.nvim.git $env:USERPROFILE\AppData\Local\nvim\ ``` From 597131b46964b991d16e1480e4d5ff93a7354b12 Mon Sep 17 00:00:00 2001 From: Joshua Nussbaum <67082011+joshuanussbaum@users.noreply.github.com> Date: Tue, 2 Jul 2024 17:43:52 -0500 Subject: [PATCH 20/23] update mason defaults --- init.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 3a0da024..aab81871 100644 --- a/init.lua +++ b/init.lua @@ -521,8 +521,10 @@ require('lazy').setup({ local servers = { -- clangd = {}, -- gopls = {}, - pyright = {}, - -- rust_analyzer = {}, + -- pyright = {}, + ruff = {}, + ruff_lsp = {}, + rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- -- Some languages (like typescript) have entire language plugins that can be useful: @@ -614,7 +616,7 @@ require('lazy').setup({ formatters_by_ft = { lua = { 'stylua' }, -- Conform can also run multiple formatters sequentially - python = { 'isort', 'black' }, + python = {}, -- -- You can use 'stop_after_first' to run the first available formatter from the list -- javascript = { "prettierd", "prettier", stop_after_first = true }, From 6f3dac791b7aabba79d488e719d25e66e590bff5 Mon Sep 17 00:00:00 2001 From: Joshua Nussbaum <67082011+joshuanussbaum@users.noreply.github.com> Date: Thu, 26 Sep 2024 19:25:47 -0500 Subject: [PATCH 21/23] update init --- init.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index aab81871..4a1283b4 100644 --- a/init.lua +++ b/init.lua @@ -736,6 +736,7 @@ require('lazy').setup({ { name = 'luasnip' }, { name = 'path' }, { name = 'copilot' }, + { name = 'buffer' }, }, } end, @@ -809,7 +810,7 @@ require('lazy').setup({ { 'nushell/tree-sitter-nu' }, }, opts = { - ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }, + ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc', 'nu' }, -- Autoinstall languages that are not installed auto_install = true, highlight = { @@ -843,7 +844,7 @@ require('lazy').setup({ -- require 'kickstart.plugins.lint', -- require 'kickstart.plugins.autopairs', -- require 'kickstart.plugins.neo-tree', - -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps + require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- This is the easiest way to modularize your config. From 8106376332ad8303ae855247208500cb05d0886a Mon Sep 17 00:00:00 2001 From: Joshua Nussbaum <67082011+0x4D5352@users.noreply.github.com> Date: Sat, 10 Aug 2024 18:20:55 -0500 Subject: [PATCH 22/23] add transparent-nvim and disable copilot --- lua/custom/plugins/copilot-cmp.lua | 9 +++++++++ lua/custom/plugins/copilot.lua | 3 +++ lua/custom/plugins/transparent-nvim.lua | 3 +++ 3 files changed, 15 insertions(+) create mode 100644 lua/custom/plugins/transparent-nvim.lua diff --git a/lua/custom/plugins/copilot-cmp.lua b/lua/custom/plugins/copilot-cmp.lua index f0adb7a6..560f181a 100644 --- a/lua/custom/plugins/copilot-cmp.lua +++ b/lua/custom/plugins/copilot-cmp.lua @@ -1,6 +1,15 @@ +if true then + return {} +end return { 'zbirenbaum/copilot-cmp', config = function() require('copilot_cmp').setup() end, + opts = { + filetypes = { + ['.'] = false, + go = true, + }, + }, } diff --git a/lua/custom/plugins/copilot.lua b/lua/custom/plugins/copilot.lua index 23c3a554..ca5fa63c 100644 --- a/lua/custom/plugins/copilot.lua +++ b/lua/custom/plugins/copilot.lua @@ -1,3 +1,6 @@ +if true then + return {} +end return { 'zbirenbaum/copilot.lua', opts = { diff --git a/lua/custom/plugins/transparent-nvim.lua b/lua/custom/plugins/transparent-nvim.lua new file mode 100644 index 00000000..c1daa3bc --- /dev/null +++ b/lua/custom/plugins/transparent-nvim.lua @@ -0,0 +1,3 @@ +return { + 'xiyaowong/transparent.nvim', +} From 673acfe7963d44a4898c2a6ac50a6e52400c00cd Mon Sep 17 00:00:00 2001 From: Joshua Nussbaum <67082011+joshuanussbaum@users.noreply.github.com> Date: Thu, 26 Sep 2024 19:26:23 -0500 Subject: [PATCH 23/23] update init --- init.lua | 52 ++---------------------------- lua/custom/plugins/copilot-cmp.lua | 4 +++ lua/custom/plugins/copilot.lua | 4 +++ 3 files changed, 11 insertions(+), 49 deletions(-) diff --git a/init.lua b/init.lua index 4a1283b4..029976d6 100644 --- a/init.lua +++ b/init.lua @@ -188,55 +188,9 @@ require('lazy').setup({ { -- Useful plugin to show you pending keybinds. 'folke/which-key.nvim', event = 'VimEnter', -- Sets the loading event to 'VimEnter' - opts = { - icons = { - -- set icon mappings to true if you have a Nerd Font - mappings = vim.g.have_nerd_font, - -- If you are using a Nerd Font: set icons.keys to an empty table which will use the - -- default whick-key.nvim defined Nerd Font icons, otherwise define a string table - keys = vim.g.have_nerd_font and {} or { - Up = ' ', - Down = ' ', - Left = ' ', - Right = ' ', - C = ' ', - M = ' ', - D = ' ', - S = ' ', - CR = ' ', - Esc = ' ', - ScrollWheelDown = ' ', - ScrollWheelUp = ' ', - NL = ' ', - BS = ' ', - Space = ' ', - Tab = ' ', - F1 = '', - F2 = '', - F3 = '', - F4 = '', - F5 = '', - F6 = '', - F7 = '', - F8 = '', - F9 = '', - F10 = '', - F11 = '', - F12 = '', - }, - }, - - -- Document existing key chains - spec = { - { 'c', group = '[C]ode', mode = { 'n', 'x' } }, - { 'd', group = '[D]ocument' }, - { 'r', group = '[R]ename' }, - { 's', group = '[S]earch' }, - { 'w', group = '[W]orkspace' }, - { 't', group = '[T]oggle' }, - { 'h', group = 'Git [H]unk', mode = { 'n', 'v' } }, - }, - }, + config = function() -- This is the function that runs, AFTER loading + require('which-key').setup() + end, }, -- NOTE: Plugins can specify dependencies. diff --git a/lua/custom/plugins/copilot-cmp.lua b/lua/custom/plugins/copilot-cmp.lua index 560f181a..983da19c 100644 --- a/lua/custom/plugins/copilot-cmp.lua +++ b/lua/custom/plugins/copilot-cmp.lua @@ -7,9 +7,13 @@ return { require('copilot_cmp').setup() end, opts = { +<<<<<<< HEAD filetypes = { ['.'] = false, go = true, }, +======= + filetypes = { ['.'] = false }, +>>>>>>> 605d213 (disable copilot) }, } diff --git a/lua/custom/plugins/copilot.lua b/lua/custom/plugins/copilot.lua index ca5fa63c..6fbac8a3 100644 --- a/lua/custom/plugins/copilot.lua +++ b/lua/custom/plugins/copilot.lua @@ -6,5 +6,9 @@ return { opts = { suggestion = { enabled = false }, panel = { enabled = false }, + filetypes = { + ['.'] = false, + go = true, + }, }, }