From 914c60ae75cdf61bf77434d2ad2fbf775efd963b Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 21 Mar 2024 17:47:04 +0100 Subject: [PATCH 01/17] fix: removed some outdated examples --- lua/plugins/example.lua | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/lua/plugins/example.lua b/lua/plugins/example.lua index 6859c0e..de22bc8 100644 --- a/lua/plugins/example.lua +++ b/lua/plugins/example.lua @@ -30,14 +30,6 @@ return { -- disable trouble { "folke/trouble.nvim", enabled = false }, - -- add symbols-outline - { - "simrat39/symbols-outline.nvim", - cmd = "SymbolsOutline", - keys = { { "cs", "SymbolsOutline", desc = "Symbols Outline" } }, - config = true, - }, - -- override nvim-cmp and add cmp-emoji { "hrsh7th/nvim-cmp", @@ -71,18 +63,6 @@ return { }, }, - -- add telescope-fzf-native - { - "telescope.nvim", - dependencies = { - "nvim-telescope/telescope-fzf-native.nvim", - build = "make", - config = function() - require("telescope").load_extension("fzf") - end, - }, - }, - -- add pyright to lspconfig { "neovim/nvim-lspconfig", From 75625b29e8891938218043a7d619d67f79666a8d Mon Sep 17 00:00:00 2001 From: denartha10 <98868685+denartha10@users.noreply.github.com> Date: Fri, 29 Mar 2024 16:53:46 +0000 Subject: [PATCH 02/17] fix: Deperecated syntax in bootstrapping of LazyVim starter (#56) In the current state of the lazy.nvim repository, certain updates have been made. However, there remains an outdated reference to 'vim.loop' for the bootstrapping process of 'lazyvim' in this start repo for LazyVim, despite 'vim.loop' being deprecated. To rectify this, I suggest a minor alteration by replacing it with the following code snippet: ```lua if not (vim.uv or vim.loop).fs_stat(lazypath) then -- bootstrap do ``` --- lua/config/lazy.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index 891b190..fd269d7 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -1,5 +1,6 @@ local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not vim.loop.fs_stat(lazypath) then + +if not (vim.uv or vim.loop).fs_stat(lazypath) then -- bootstrap lazy.nvim -- stylua: ignore vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }) From b59e7c315b668182320702fd2944eda9f74a3314 Mon Sep 17 00:00:00 2001 From: Alex Ford Date: Sun, 19 May 2024 01:33:42 -0600 Subject: [PATCH 03/17] docs: Update example plugin file to use native snippets with supertab. (#66) --- lua/plugins/example.lua | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/lua/plugins/example.lua b/lua/plugins/example.lua index de22bc8..8b7eabc 100644 --- a/lua/plugins/example.lua +++ b/lua/plugins/example.lua @@ -192,14 +192,6 @@ return { }, -- Use for completion and snippets (supertab) - -- first: disable default and behavior in LuaSnip - { - "L3MON4D3/LuaSnip", - keys = function() - return {} - end, - }, - -- then: setup supertab in cmp { "hrsh7th/nvim-cmp", dependencies = { @@ -213,17 +205,16 @@ return { return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil end - local luasnip = require("luasnip") local cmp = require("cmp") opts.mapping = vim.tbl_extend("force", opts.mapping, { [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_next_item() - -- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable() - -- this way you will only jump inside the snippet region - elseif luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() + elseif vim.snippet.active({ direction = 1 }) then + vim.schedule(function() + vim.snippet.jump(1) + end) elseif has_words_before() then cmp.complete() else @@ -233,8 +224,10 @@ return { [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_prev_item() - elseif luasnip.jumpable(-1) then - luasnip.jump(-1) + elseif vim.snippet.active({ direction = -1 }) then + vim.schedule(function() + vim.snippet.jump(-1) + end) else fallback() end From 4818e4b72fc24b0fceed88f83e21e908def4c386 Mon Sep 17 00:00:00 2001 From: DrummyFloyd Date: Sun, 2 Jun 2024 17:00:03 +0200 Subject: [PATCH 04/17] fix: removed unnecessary env var (#67) according to https://github.com/LazyVim/LazyVim/issues/2063#issuecomment-2143841592 this is not needed --- lua/config/lazy.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index fd269d7..2e7bf62 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -5,7 +5,7 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then -- stylua: ignore vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }) end -vim.opt.rtp:prepend(vim.env.LAZY or lazypath) +vim.opt.rtp:prepend(lazypath) require("lazy").setup({ spec = { From cb79b0e6a9d0ec81041150dc87fe47352a54a2ba Mon Sep 17 00:00:00 2001 From: Lucas Date: Fri, 14 Jun 2024 10:14:39 +0200 Subject: [PATCH 05/17] fix: improve comment about extras loading in config (#75) * fix: improve comment about extras loading in config * fix: use LazyExtras --------- Co-authored-by: Folke Lemaitre --- lua/config/lazy.lua | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index 2e7bf62..4aeb4bd 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -11,10 +11,6 @@ require("lazy").setup({ spec = { -- add LazyVim and import its plugins { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - -- import any extras modules here - -- { import = "lazyvim.plugins.extras.lang.typescript" }, - -- { import = "lazyvim.plugins.extras.lang.json" }, - -- { import = "lazyvim.plugins.extras.ui.mini-animate" }, -- import/override with your plugins { import = "plugins" }, }, From 0c370f4d5c537e6d41dea31b547accc8d5f70a8a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 18 Jun 2024 07:11:12 +0200 Subject: [PATCH 06/17] docs: removed supertab example --- lua/plugins/example.lua | 45 ----------------------------------------- 1 file changed, 45 deletions(-) diff --git a/lua/plugins/example.lua b/lua/plugins/example.lua index 8b7eabc..4ad9825 100644 --- a/lua/plugins/example.lua +++ b/lua/plugins/example.lua @@ -190,49 +190,4 @@ return { }, }, }, - - -- Use for completion and snippets (supertab) - { - "hrsh7th/nvim-cmp", - dependencies = { - "hrsh7th/cmp-emoji", - }, - ---@param opts cmp.ConfigSchema - opts = function(_, opts) - local has_words_before = function() - unpack = unpack or table.unpack - local line, col = unpack(vim.api.nvim_win_get_cursor(0)) - return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil - end - - local cmp = require("cmp") - - opts.mapping = vim.tbl_extend("force", opts.mapping, { - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif vim.snippet.active({ direction = 1 }) then - vim.schedule(function() - vim.snippet.jump(1) - end) - elseif has_words_before() then - cmp.complete() - else - fallback() - end - end, { "i", "s" }), - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif vim.snippet.active({ direction = -1 }) then - vim.schedule(function() - vim.snippet.jump(-1) - end) - else - fallback() - end - end, { "i", "s" }), - }) - end, - }, } From 79b3f27f5cea8fe6bbb95ba04f93dffa545c5197 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 3 Jul 2024 10:19:46 +0200 Subject: [PATCH 07/17] fix: add error handling to initial clone --- lua/config/lazy.lua | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index 4aeb4bd..732f55a 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -1,9 +1,16 @@ local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" - if not (vim.uv or vim.loop).fs_stat(lazypath) then - -- bootstrap lazy.nvim - -- stylua: ignore - vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }) + 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 + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end end vim.opt.rtp:prepend(lazypath) From 99e481a88bc03734d60d7265b77f52a7433f6516 Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Wed, 17 Jul 2024 13:07:58 +0200 Subject: [PATCH 08/17] updated lazyvim.json --- lazyvim.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lazyvim.json b/lazyvim.json index ff6a139..b1aed37 100644 --- a/lazyvim.json +++ b/lazyvim.json @@ -3,7 +3,7 @@ ], "news": { - "NEWS.md": "2123" + "NEWS.md": "6077" }, - "version": 2 + "version": 6 } \ No newline at end of file From cb6349c8ae922d1c5745574f4d17b44f2731d451 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 20 Jul 2024 23:30:46 +0200 Subject: [PATCH 09/17] fix: disable lazy checker notify by default --- lua/config/lazy.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index 732f55a..d73bfa1 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -31,7 +31,10 @@ require("lazy").setup({ -- version = "*", -- try installing the latest stable version for plugins that support semver }, install = { colorscheme = { "tokyonight", "habamax" } }, - checker = { enabled = true }, -- automatically check for plugin updates + checker = { + enabled = true, -- check for plugin updates periodically + notify = false, -- notify on update + }, -- automatically check for plugin updates performance = { rtp = { -- disable some rtp plugins From 0855b057967c43dc93f69641665d375ae10115e1 Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Tue, 23 Jul 2024 13:47:25 +0200 Subject: [PATCH 10/17] updated lazyvim.json --- lazyvim.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lazyvim.json b/lazyvim.json index b1aed37..6b20895 100644 --- a/lazyvim.json +++ b/lazyvim.json @@ -3,7 +3,7 @@ ], "news": { - "NEWS.md": "6077" + "NEWS.md": "6296" }, "version": 6 } \ No newline at end of file From fc67d694ac0afd7c713e915e29c27c678afef28b Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Tue, 23 Jul 2024 16:21:09 +0200 Subject: [PATCH 11/17] enabled extra mini.files --- lazyvim.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lazyvim.json b/lazyvim.json index 6b20895..3b6405d 100644 --- a/lazyvim.json +++ b/lazyvim.json @@ -1,6 +1,6 @@ { "extras": [ - + "lazyvim.plugins.extras.editor.mini-files" ], "news": { "NEWS.md": "6296" From ccf5993bb4adaa0effaecb54b359dd3e64aa7493 Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Tue, 23 Jul 2024 18:17:53 +0200 Subject: [PATCH 12/17] customized mini.files --- lua/plugins/extend-mini-files.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 lua/plugins/extend-mini-files.lua diff --git a/lua/plugins/extend-mini-files.lua b/lua/plugins/extend-mini-files.lua new file mode 100644 index 0000000..b557ea8 --- /dev/null +++ b/lua/plugins/extend-mini-files.lua @@ -0,0 +1,10 @@ +return { + "echasnovski/mini.files", + opts = { + windows = { + width_nofocus = 20, + width_focus = 50, + width_preview = 100, + }, + }, +} From 888db31a8d0a17c9d07231b5005aef99b70f289e Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Wed, 24 Jul 2024 11:46:51 +0200 Subject: [PATCH 13/17] updated lazyvim.json --- lazyvim.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lazyvim.json b/lazyvim.json index 3b6405d..7940f1b 100644 --- a/lazyvim.json +++ b/lazyvim.json @@ -3,7 +3,7 @@ "lazyvim.plugins.extras.editor.mini-files" ], "news": { - "NEWS.md": "6296" + "NEWS.md": "6520" }, "version": 6 } \ No newline at end of file From 317279fc2083640a648f8f8e5ddc8f52ed12dae5 Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Thu, 25 Jul 2024 16:24:09 +0200 Subject: [PATCH 14/17] undotree --- lua/plugins/undotree.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 lua/plugins/undotree.lua diff --git a/lua/plugins/undotree.lua b/lua/plugins/undotree.lua new file mode 100644 index 0000000..6becb88 --- /dev/null +++ b/lua/plugins/undotree.lua @@ -0,0 +1,12 @@ +return { + "jiaoshijie/undotree", + dependencies = "nvim-lua/plenary.nvim", + config = true, + keys = { -- load the plugin only when using it's keybinding: + { + "uu", + "lua require('undotree').toggle()", + desc = "Toggle UndoTree", + }, + }, +} From 3c6a0f32170fc5ee37208f2a859f4fc26c42873a Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Sat, 10 Aug 2024 20:03:13 +0200 Subject: [PATCH 15/17] enabled extra mini.surround --- lazyvim.json | 1 + 1 file changed, 1 insertion(+) diff --git a/lazyvim.json b/lazyvim.json index 7940f1b..a33fa8c 100644 --- a/lazyvim.json +++ b/lazyvim.json @@ -1,5 +1,6 @@ { "extras": [ + "lazyvim.plugins.extras.coding.mini-surround", "lazyvim.plugins.extras.editor.mini-files" ], "news": { From 491a9c630ba703956688edca2febccb5698327b1 Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Fri, 27 Sep 2024 19:48:21 +0200 Subject: [PATCH 16/17] Add Java to Treesitter --- lua/plugins/extend-treesitter.lua | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 lua/plugins/extend-treesitter.lua diff --git a/lua/plugins/extend-treesitter.lua b/lua/plugins/extend-treesitter.lua new file mode 100644 index 0000000..fdd44b9 --- /dev/null +++ b/lua/plugins/extend-treesitter.lua @@ -0,0 +1,9 @@ +return { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + -- add parsers, without replacing the default ones + vim.list_extend(opts.ensure_installed, { + "java", + }) + end, +} From 36819227a1399a67d2faa7304e3f749f27703e06 Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Sat, 28 Sep 2024 15:09:11 +0200 Subject: [PATCH 17/17] in-and-out quickly navigate in and out of surrounding characters like quotes and parenthesis with Ctrl+ENTER --- lua/plugins/in-and-out.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 lua/plugins/in-and-out.lua diff --git a/lua/plugins/in-and-out.lua b/lua/plugins/in-and-out.lua new file mode 100644 index 0000000..d42814d --- /dev/null +++ b/lua/plugins/in-and-out.lua @@ -0,0 +1,12 @@ +return { + "ysmb-wtsg/in-and-out.nvim", + keys = { + { + "", + function() + require("in-and-out").in_and_out() + end, + mode = "i", + }, + }, +}