From e2bfa0c66f474f7d8863a8bc05e3d5bdf704f7bf Mon Sep 17 00:00:00 2001 From: rdvm Date: Tue, 16 Apr 2024 10:29:27 -0500 Subject: [PATCH 01/19] Arch, btw (#852) * Arch, btw * Add unzip * Add unzip for Fedora and --needed arg for Arch --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4dd8ac873d4..e67b94a3b6b 100644 --- a/README.md +++ b/README.md @@ -269,7 +269,14 @@ sudo apt install -t unstable neovim
Fedora Install Steps ``` -sudo dnf install -y gcc make git ripgrep fd-find neovim +sudo dnf install -y gcc make git ripgrep fd-find unzip neovim +``` +
+ +
Arch Install Steps + +``` +sudo pacman -S --noconfirm --needed gcc make git ripgrep fd unzip neovim ```
From fabeb86d8bb6cf1df5e05377f3abca10e4a25a24 Mon Sep 17 00:00:00 2001 From: Damjan 9000 Date: Wed, 17 Apr 2024 15:59:14 +0200 Subject: [PATCH 02/19] Comment about nerd font selection. Fixes #853 (#854) --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 496f45b85b1..1d922dfc52c 100644 --- a/init.lua +++ b/init.lua @@ -90,7 +90,7 @@ P.S. You can delete this when you're done too. It's your config now! :) vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' --- Set to true if you have a Nerd Font installed +-- Set to true if you have a Nerd Font installed and selected in the terminal vim.g.have_nerd_font = false -- [[ Setting options ]] From 6d6b3f38c1e243e2fd8f96b6b6eff1720c110cab Mon Sep 17 00:00:00 2001 From: Chris Patti Date: Wed, 17 Apr 2024 14:02:24 -0400 Subject: [PATCH 03/19] Fix: #847 - add prefer_git to treesitter config (#856) --- init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/init.lua b/init.lua index 1d922dfc52c..cc49351ed52 100644 --- a/init.lua +++ b/init.lua @@ -817,6 +817,8 @@ require('lazy').setup({ config = function(_, opts) -- [[ Configure Treesitter ]] See `:help nvim-treesitter` + -- Prefer git instead of curl in order to improve connectivity in some environments + require('nvim-treesitter.install').prefer_git = true ---@diagnostic disable-next-line: missing-fields require('nvim-treesitter.configs').setup(opts) From 5540527fabc2776cf62b63ef511079b1c8bf5297 Mon Sep 17 00:00:00 2001 From: Vladislav Grechannik <52157081+VlaDexa@users.noreply.github.com> Date: Wed, 17 Apr 2024 20:04:55 +0200 Subject: [PATCH 04/19] Enable inlay hints for the supporting servers (#843) --- init.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/init.lua b/init.lua index cc49351ed52..4bd9b7f583d 100644 --- a/init.lua +++ b/init.lua @@ -286,6 +286,7 @@ require('lazy').setup({ ['r'] = { name = '[R]ename', _ = 'which_key_ignore' }, ['s'] = { name = '[S]earch', _ = 'which_key_ignore' }, ['w'] = { name = '[W]orkspace', _ = 'which_key_ignore' }, + ['t'] = { name = '[T]oggle', _ = 'which_key_ignore' }, } end, }, @@ -518,6 +519,16 @@ require('lazy').setup({ callback = vim.lsp.buf.clear_references, }) end + + -- The following autocommand is used to enable inlay hints in your + -- code, if the language server you are using supports them + -- + -- This may be unwanted, since they displace some of your code + if client and client.server_capabilities.inlayHintProvider and vim.lsp.inlay_hint then + map('th', function() + vim.lsp.inlay_hint.enable(0, not vim.lsp.inlay_hint.is_enabled()) + end, '[T]oggle Inlay [H]ints') + end end, }) From 5e258d276fef52cc45a17021dc83a95748a0bc7f Mon Sep 17 00:00:00 2001 From: Damjan 9000 Date: Wed, 17 Apr 2024 21:25:54 +0200 Subject: [PATCH 05/19] Move plugin examples from README to optional plugin files (#831) * Move autopairs example from README to an optional plugin * Move neo-tree example from README to an optional plugin --- README.md | 65 +---------------------------- init.lua | 2 + lua/kickstart/plugins/autopairs.lua | 16 +++++++ lua/kickstart/plugins/neo-tree.lua | 25 +++++++++++ 4 files changed, 45 insertions(+), 63 deletions(-) create mode 100644 lua/kickstart/plugins/autopairs.lua create mode 100644 lua/kickstart/plugins/neo-tree.lua diff --git a/README.md b/README.md index e67b94a3b6b..a427def240a 100644 --- a/README.md +++ b/README.md @@ -99,71 +99,10 @@ That's it! Lazy will install all the plugins you have. Use `:Lazy` to view current plugin status. Hit `q` to close the window. Read through the `init.lua` file in your configuration folder for more -information about extending and exploring Neovim. +information about extending and exploring Neovim. That includes also +examples of adding popularly requested plugins. -#### Examples of adding popularly requested plugins - -NOTE: You'll need to uncomment the line in the init.lua that turns on loading custom plugins. - -
- Adding autopairs - -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). - -In the file: `lua/custom/plugins/autopairs.lua`, add: - -```lua --- File: lua/custom/plugins/autopairs.lua - -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, -} -``` - -
-
- Adding a file tree plugin - -This will install the tree plugin and add the command `:Neotree` for you. -For more information, see the documentation at -[neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim). - -In the file: `lua/custom/plugins/filetree.lua`, add: - -```lua --- File: lua/custom/plugins/filetree.lua - -return { - "nvim-neo-tree/neo-tree.nvim", - version = "*", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended - "MunifTanjim/nui.nvim", - }, - config = function () - require('neo-tree').setup {} - end, -} -``` - -
- ### Getting Started [The Only Video You Need to Get Started with Neovim](https://youtu.be/m8C0Cq9Uv9o) diff --git a/init.lua b/init.lua index 4bd9b7f583d..21d7df83780 100644 --- a/init.lua +++ b/init.lua @@ -854,6 +854,8 @@ require('lazy').setup({ -- require 'kickstart.plugins.debug', -- require 'kickstart.plugins.indent_line', -- require 'kickstart.plugins.lint', + -- require 'kickstart.plugins.autopairs', + -- require 'kickstart.plugins.neo-tree', -- 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. diff --git a/lua/kickstart/plugins/autopairs.lua b/lua/kickstart/plugins/autopairs.lua new file mode 100644 index 00000000000..87a7e5ffa2e --- /dev/null +++ b/lua/kickstart/plugins/autopairs.lua @@ -0,0 +1,16 @@ +-- autopairs +-- https://github.com/windwp/nvim-autopairs + +return { + 'windwp/nvim-autopairs', + event = 'InsertEnter', + -- 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, +} diff --git a/lua/kickstart/plugins/neo-tree.lua b/lua/kickstart/plugins/neo-tree.lua new file mode 100644 index 00000000000..c793b885bc6 --- /dev/null +++ b/lua/kickstart/plugins/neo-tree.lua @@ -0,0 +1,25 @@ +-- Neo-tree is a Neovim plugin to browse the file system +-- https://github.com/nvim-neo-tree/neo-tree.nvim + +return { + 'nvim-neo-tree/neo-tree.nvim', + version = '*', + dependencies = { + 'nvim-lua/plenary.nvim', + 'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended + 'MunifTanjim/nui.nvim', + }, + cmd = 'Neotree', + keys = { + { '\\', ':Neotree reveal', { desc = 'NeoTree reveal' } }, + }, + opts = { + filesystem = { + window = { + mappings = { + ['\\'] = 'close_window', + }, + }, + }, + }, +} From f5c9fe8e15aafb6857706e3c05b5eee4ecb98a2b Mon Sep 17 00:00:00 2001 From: Damjan 9000 Date: Thu, 18 Apr 2024 03:00:39 +0200 Subject: [PATCH 06/19] Add gitsigns recommended keymaps as an optional plugin (#858) --- init.lua | 6 +++ lua/kickstart/plugins/gitsigns.lua | 61 ++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 lua/kickstart/plugins/gitsigns.lua diff --git a/init.lua b/init.lua index 21d7df83780..a182828eebf 100644 --- a/init.lua +++ b/init.lua @@ -287,7 +287,12 @@ require('lazy').setup({ ['s'] = { name = '[S]earch', _ = 'which_key_ignore' }, ['w'] = { name = '[W]orkspace', _ = 'which_key_ignore' }, ['t'] = { name = '[T]oggle', _ = 'which_key_ignore' }, + ['h'] = { name = 'Git [H]unk', _ = 'which_key_ignore' }, } + -- visual mode + require('which-key').register({ + ['h'] = { 'Git [H]unk' }, + }, { mode = 'v' }) end, }, @@ -856,6 +861,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 -- 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. diff --git a/lua/kickstart/plugins/gitsigns.lua b/lua/kickstart/plugins/gitsigns.lua new file mode 100644 index 00000000000..4bcc70f4c79 --- /dev/null +++ b/lua/kickstart/plugins/gitsigns.lua @@ -0,0 +1,61 @@ +-- Adds git related signs to the gutter, as well as utilities for managing changes +-- NOTE: gitsigns is already included in init.lua but contains only the base +-- config. This will add also the recommended keymaps. + +return { + { + 'lewis6991/gitsigns.nvim', + opts = { + on_attach = function(bufnr) + local gitsigns = require 'gitsigns' + + local function map(mode, l, r, opts) + opts = opts or {} + opts.buffer = bufnr + vim.keymap.set(mode, l, r, opts) + end + + -- Navigation + map('n', ']c', function() + if vim.wo.diff then + vim.cmd.normal { ']c', bang = true } + else + gitsigns.nav_hunk 'next' + end + end, { desc = 'Jump to next git [c]hange' }) + + map('n', '[c', function() + if vim.wo.diff then + vim.cmd.normal { '[c', bang = true } + else + gitsigns.nav_hunk 'prev' + end + end, { desc = 'Jump to previous git [c]hange' }) + + -- Actions + -- visual mode + map('v', 'hs', function() + gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } + end, { desc = 'stage git hunk' }) + map('v', 'hr', function() + gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } + end, { desc = 'reset git hunk' }) + -- normal mode + map('n', 'hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' }) + map('n', 'hr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' }) + map('n', 'hS', gitsigns.stage_buffer, { desc = 'git [S]tage buffer' }) + map('n', 'hu', gitsigns.undo_stage_hunk, { desc = 'git [u]ndo stage hunk' }) + map('n', 'hR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' }) + map('n', 'hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' }) + map('n', 'hb', gitsigns.blame_line, { desc = 'git [b]lame line' }) + map('n', 'hd', gitsigns.diffthis, { desc = 'git [d]iff against index' }) + map('n', 'hD', function() + gitsigns.diffthis '@' + end, { desc = 'git [D]iff against last commit' }) + -- Toggles + map('n', 'tb', gitsigns.toggle_current_line_blame, { desc = '[T]oggle git show [b]lame line' }) + map('n', 'tD', gitsigns.toggle_deleted, { desc = '[T]oggle git show [D]eleted' }) + end, + }, + }, +} From b07176aef66948fa9de810174d3fc8a780eb8953 Mon Sep 17 00:00:00 2001 From: GameFuzzy Date: Fri, 19 Apr 2024 19:50:42 +0200 Subject: [PATCH 07/19] fix: restore Mason config timing for DAP startup (again) (#865) --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index a182828eebf..62d2c5cfe8c 100644 --- a/init.lua +++ b/init.lua @@ -412,7 +412,7 @@ require('lazy').setup({ 'neovim/nvim-lspconfig', dependencies = { -- Automatically install LSPs and related tools to stdpath for Neovim - 'williamboman/mason.nvim', + { 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants 'williamboman/mason-lspconfig.nvim', 'WhoIsSethDaniel/mason-tool-installer.nvim', From 931ec5c226b8440fa3ed066a6a2fbe78e29bf5e1 Mon Sep 17 00:00:00 2001 From: Evan Carroll Date: Sat, 20 Apr 2024 10:55:01 -0500 Subject: [PATCH 08/19] Update README.md (#860) Attempted fix for #859, provide reasonable Debian install instructions -- comment on GitHub issue with refinement. --- README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a427def240a..4cb89536d7c 100644 --- a/README.md +++ b/README.md @@ -200,9 +200,14 @@ sudo apt install make gcc ripgrep unzip git neovim ``` sudo apt update sudo apt install make gcc ripgrep unzip git -echo "deb https://deb.debian.org/debian unstable main" | sudo tee -a /etc/apt/sources.list -sudo apt update -sudo apt install -t unstable neovim + +# Now we install nvim +curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz +sudo rm -rf /opt/nvim +sudo tar -C /opt -xzf nvim-linux64.tar.gz + +# make it available in /usr/local/bin, distro installs to /usr/bin +sudo ln -sf /opt/nvim-linux64/bin/nvim /usr/local/bin/ ```
Fedora Install Steps From 9f5176fc2a30fbf5f0601ba1c84a345a4943bac2 Mon Sep 17 00:00:00 2001 From: Damjan 9000 Date: Sat, 20 Apr 2024 19:14:24 +0200 Subject: [PATCH 09/19] Minor improvements of debian install instructions. Fixes #859 (#869) --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4cb89536d7c..dd51f209b38 100644 --- a/README.md +++ b/README.md @@ -199,11 +199,13 @@ sudo apt install make gcc ripgrep unzip git neovim ``` sudo apt update -sudo apt install make gcc ripgrep unzip git +sudo apt install make gcc ripgrep unzip git curl # Now we install nvim curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz -sudo rm -rf /opt/nvim +sudo rm -rf /opt/nvim-linux64 +sudo mkdir -p /opt/nvim-linux64 +sudo chmod a+rX /opt/nvim-linux64 sudo tar -C /opt -xzf nvim-linux64.tar.gz # make it available in /usr/local/bin, distro installs to /usr/bin From 2e68a2c2532d1575b717721a34efa033f4d7a88e Mon Sep 17 00:00:00 2001 From: Damjan 9000 Date: Sat, 20 Apr 2024 19:14:49 +0200 Subject: [PATCH 10/19] Add a commented out example of the classic complete keymaps. Fixes #866 (#868) --- init.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/init.lua b/init.lua index 62d2c5cfe8c..3c70d7364af 100644 --- a/init.lua +++ b/init.lua @@ -720,6 +720,12 @@ require('lazy').setup({ -- This will expand snippets if the LSP sent a snippet. [''] = cmp.mapping.confirm { select = true }, + -- If you prefer more traditional completion keymaps, + -- you can uncomment the following lines + --[''] = cmp.mapping.confirm { select = true }, + --[''] = cmp.mapping.select_next_item(), + --[''] = cmp.mapping.select_prev_item(), + -- Manually trigger a completion from nvim-cmp. -- Generally you don't need this, because nvim-cmp will display -- completions whenever it has completion options available. From f92fb11d681a29f02ba144227142dfcf18297da7 Mon Sep 17 00:00:00 2001 From: Vladislav Grechannik <52157081+VlaDexa@users.noreply.github.com> Date: Mon, 22 Apr 2024 13:27:13 +0200 Subject: [PATCH 11/19] Fix deprecation notice of inlay hints (#873) --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 3c70d7364af..256da5b8d6f 100644 --- a/init.lua +++ b/init.lua @@ -531,7 +531,7 @@ require('lazy').setup({ -- This may be unwanted, since they displace some of your code if client and client.server_capabilities.inlayHintProvider and vim.lsp.inlay_hint then map('th', function() - vim.lsp.inlay_hint.enable(0, not vim.lsp.inlay_hint.is_enabled()) + vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled()) end, '[T]oggle Inlay [H]ints') end end, From 81f270a704ffe428ffe221122e0b1604567ae6cd Mon Sep 17 00:00:00 2001 From: Francis Belanger Date: Mon, 22 Apr 2024 11:43:10 -0400 Subject: [PATCH 12/19] Fix highlight errors when lsp crash or stop (#864) * Fix highlight errors when lsp crash or stop It adds a check wether the client is still available before highlighting. If the client is not there anymore it returns `true` to unregister the autocommand This fix the `method textDocument/documentHighlight is not supported by any of the servers registered for the current buffer` errors when doing a LspRestart or the server crashes * Delete the highlight autocommands in the LspDetatch event * Only delete autocmds for the current buffer with the group name * Simplify clearing the autocommands --------- Co-authored-by: Francis Belanger --- init.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/init.lua b/init.lua index 256da5b8d6f..ccca32c815f 100644 --- a/init.lua +++ b/init.lua @@ -514,13 +514,16 @@ require('lazy').setup({ -- When you move your cursor, the highlights will be cleared (the second autocommand). local client = vim.lsp.get_client_by_id(event.data.client_id) if client and client.server_capabilities.documentHighlightProvider then + local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = true }) vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, { buffer = event.buf, + group = highlight_augroup, callback = vim.lsp.buf.document_highlight, }) vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, { buffer = event.buf, + group = highlight_augroup, callback = vim.lsp.buf.clear_references, }) end @@ -537,6 +540,14 @@ require('lazy').setup({ end, }) + vim.api.nvim_create_autocmd('LspDetach', { + group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }), + callback = function(event) + vim.lsp.buf.clear_references() + vim.api.nvim_clear_autocmds { group = 'kickstart-lsp-highlight', buffer = event.buf } + end, + }) + -- LSP servers and clients are able to communicate to each other what features they support. -- By default, Neovim doesn't support everything that is in the LSP specification. -- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities. From 942b26184c06f7fbeb276f3df0a829f02a752657 Mon Sep 17 00:00:00 2001 From: Francis Belanger Date: Mon, 22 Apr 2024 15:53:45 -0400 Subject: [PATCH 13/19] fix: highlight group clear on each attach (#874) --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index ccca32c815f..036eefb8c3b 100644 --- a/init.lua +++ b/init.lua @@ -514,7 +514,7 @@ require('lazy').setup({ -- When you move your cursor, the highlights will be cleared (the second autocommand). local client = vim.lsp.get_client_by_id(event.data.client_id) if client and client.server_capabilities.documentHighlightProvider then - local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = true }) + local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false }) vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, { buffer = event.buf, group = highlight_augroup, From 8df3deb6fe7d8adf6957bc649b171f0ffde7f1ad Mon Sep 17 00:00:00 2001 From: Adolfo Gante Date: Mon, 22 Apr 2024 14:15:42 -0700 Subject: [PATCH 14/19] Update README.md (#875) Line 102. Placed 'also' before the 'includes'. "That includes also examples of adding popularly requested plugins." ---> "That also includes examples of adding popularly requested plugins." --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dd51f209b38..be313bdb565 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ That's it! Lazy will install all the plugins you have. Use `:Lazy` to view current plugin status. Hit `q` to close the window. Read through the `init.lua` file in your configuration folder for more -information about extending and exploring Neovim. That includes also +information about extending and exploring Neovim. That also includes examples of adding popularly requested plugins. From b7d5cc8f426e1e3b6c52f79cbb2d1b3f81e7f31c Mon Sep 17 00:00:00 2001 From: Damjan 9000 Date: Sat, 27 Apr 2024 22:40:27 +0200 Subject: [PATCH 15/19] README: add clipboard tool dependency (#886) Fixes: #884 Neovim requires an external tool for proper system clipboard integration. Some systems install this already by default: - on Fedora xsel is already installed by default - on Windows using the choko install the win32yank is alredy installed This is not installed by default on ubuntu or debian so adding that to the dependencies list and to the install instructions snippets. --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index be313bdb565..f445b65ecd5 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ If you are experiencing issues, please make sure you have the latest versions. External Requirements: - Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`) - [ripgrep](https://github.com/BurntSushi/ripgrep#installation) +- Clipboard tool (xclip/xsel/win32yank or other depending on platform) - 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: @@ -182,7 +183,7 @@ wsl --install wsl sudo add-apt-repository ppa:neovim-ppa/unstable -y sudo apt update -sudo apt install make gcc ripgrep unzip neovim +sudo apt install make gcc ripgrep unzip git xclip neovim ```
@@ -192,14 +193,14 @@ sudo apt install make gcc ripgrep unzip neovim ``` sudo add-apt-repository ppa:neovim-ppa/unstable -y sudo apt update -sudo apt install make gcc ripgrep unzip git neovim +sudo apt install make gcc ripgrep unzip git xclip neovim ```
Debian Install Steps ``` sudo apt update -sudo apt install make gcc ripgrep unzip git curl +sudo apt install make gcc ripgrep unzip git xclip curl # Now we install nvim curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz From 6f6f38a6b5059787d8d92b313f6e1b2c722389b0 Mon Sep 17 00:00:00 2001 From: Damjan 9000 Date: Thu, 2 May 2024 22:53:07 +0200 Subject: [PATCH 16/19] Move LspDetach handler near kickstart-lsp-highlight group (#900) Moved to make sure the kickstart-lsp-highlight group exists when the LspDetach handler is invoked. The LspDetach handler is used to clean up any lsp highlights that were enabled by CursorHold if the LSP is stopped or crashed. --- init.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/init.lua b/init.lua index 036eefb8c3b..457ad214873 100644 --- a/init.lua +++ b/init.lua @@ -526,6 +526,14 @@ require('lazy').setup({ group = highlight_augroup, callback = vim.lsp.buf.clear_references, }) + + vim.api.nvim_create_autocmd('LspDetach', { + group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }), + callback = function(event2) + vim.lsp.buf.clear_references() + vim.api.nvim_clear_autocmds { group = 'kickstart-lsp-highlight', buffer = event2.buf } + end, + }) end -- The following autocommand is used to enable inlay hints in your @@ -540,14 +548,6 @@ require('lazy').setup({ end, }) - vim.api.nvim_create_autocmd('LspDetach', { - group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }), - callback = function(event) - vim.lsp.buf.clear_references() - vim.api.nvim_clear_autocmds { group = 'kickstart-lsp-highlight', buffer = event.buf } - end, - }) - -- LSP servers and clients are able to communicate to each other what features they support. -- By default, Neovim doesn't support everything that is in the LSP specification. -- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities. From f86f18f27afeef1952272e212bef886e58ffd04c Mon Sep 17 00:00:00 2001 From: Richard Macklin <1863540+rmacklin@users.noreply.github.com> Date: Sun, 5 May 2024 18:01:39 -0700 Subject: [PATCH 17/19] Add diff to treesitter's ensure_installed languages (#908) --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 457ad214873..88658ef3033 100644 --- a/init.lua +++ b/init.lua @@ -835,7 +835,7 @@ require('lazy').setup({ 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate', opts = { - ensure_installed = { 'bash', 'c', 'html', 'lua', 'luadoc', 'markdown', 'vim', 'vimdoc' }, + ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'vim', 'vimdoc' }, -- Autoinstall languages that are not installed auto_install = true, highlight = { From b9bd02d55b77293291a38fac9abe46acad9ab91d Mon Sep 17 00:00:00 2001 From: Smig <89040888+smiggiddy@users.noreply.github.com> Date: Wed, 8 May 2024 10:55:49 -0400 Subject: [PATCH 18/19] fix: debug.lua (#918) --- lua/kickstart/plugins/debug.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/kickstart/plugins/debug.lua b/lua/kickstart/plugins/debug.lua index 7be4abdbd96..d4d146594e0 100644 --- a/lua/kickstart/plugins/debug.lua +++ b/lua/kickstart/plugins/debug.lua @@ -31,7 +31,7 @@ return { require('mason-nvim-dap').setup { -- Makes a best effort to setup the various debuggers with -- reasonable debug configurations - automatic_setup = true, + automatic_installation = true, -- You can provide additional configuration to the handlers, -- see mason-nvim-dap README for more information From 5aeddfdd5d0308506ec63b0e4f8de33e2a39355f Mon Sep 17 00:00:00 2001 From: Per Malmberg Date: Fri, 10 May 2024 19:43:22 +0200 Subject: [PATCH 19/19] Automatically set detached state as needed. (#925) * Automatically set detached state as needed. * Use vim.fn.has instead. * Fix int vs bool. --- lua/kickstart/plugins/debug.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/kickstart/plugins/debug.lua b/lua/kickstart/plugins/debug.lua index d4d146594e0..31dfecf5b38 100644 --- a/lua/kickstart/plugins/debug.lua +++ b/lua/kickstart/plugins/debug.lua @@ -85,6 +85,12 @@ return { dap.listeners.before.event_exited['dapui_config'] = dapui.close -- Install golang specific config - require('dap-go').setup() + require('dap-go').setup { + delve = { + -- On Windows delve must be run attached or it crashes. + -- See https://github.com/leoluz/nvim-dap-go/blob/main/README.md#configuring + detached = vim.fn.has 'win32' == 0, + }, + } end, }