From c8891b801b949715815cdb5bfbfa1aa59fc74e99 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Sat, 31 Aug 2024 07:36:57 +0300 Subject: [PATCH 01/63] chore: remove lazy-lock from gitignore --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 005b535b606..8a192cab54d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,3 @@ test.sh nvim spell/ -lazy-lock.json From 0816a91558eb3a376a6c432c435c8d9ed97a2c3f Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Sat, 31 Aug 2024 07:48:00 +0300 Subject: [PATCH 02/63] feat: customize init config --- init.lua | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/init.lua b/init.lua index 13c8143daa0..073ae4d5ffe 100644 --- a/init.lua +++ b/init.lua @@ -91,7 +91,7 @@ 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 +vim.g.have_nerd_font = true -- [[ Setting options ]] -- See `:help vim.opt` @@ -102,7 +102,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' @@ -829,13 +829,19 @@ require('lazy').setup({ -- change the command in the config to whatever the name of that colorscheme is. -- -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`. - 'folke/tokyonight.nvim', + 'catppuccin/nvim', + name = 'catppuccin', priority = 1000, -- Make sure to load this before all the other start plugins. + opts = { + color_overrides = { + mocha = { base = '#000000', mantle = '#000000', crust = '#000000' }, + }, + }, init = function() -- 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 'catppuccin-mocha' -- You can configure highlights by doing something like: vim.cmd.hi 'Comment gui=none' @@ -918,18 +924,18 @@ require('lazy').setup({ -- Uncomment any of the lines below to enable them (you will need to restart nvim). -- -- require 'kickstart.plugins.debug', - -- require 'kickstart.plugins.indent_line', - -- require 'kickstart.plugins.lint', - -- require 'kickstart.plugins.autopairs', - -- require 'kickstart.plugins.neo-tree', - -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps + require 'kickstart.plugins.indent_line', + 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. -- -- 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 f0bbf06ddbafa6f5ca418920fca6da488a6e7d87 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Sat, 31 Aug 2024 08:28:01 +0300 Subject: [PATCH 03/63] feat: add vim-tmux-navigator plugin --- lua/custom/plugins/init.lua | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index be0eb9d8d7a..96134e9441f 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -2,4 +2,22 @@ -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information -return {} +return { + { + 'christoomey/vim-tmux-navigator', + cmd = { + 'TmuxNavigateLeft', + 'TmuxNavigateDown', + 'TmuxNavigateUp', + 'TmuxNavigateRight', + 'TmuxNavigatePrevious', + }, + keys = { + { '', 'TmuxNavigateLeft' }, + { '', 'TmuxNavigateDown' }, + { '', 'TmuxNavigateUp' }, + { '', 'TmuxNavigateRight' }, + { '', 'TmuxNavigatePrevious' }, + }, + }, +} From 0ce744deac097b2ee88666944fe16d48d1260c4e Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Sat, 31 Aug 2024 16:26:09 +0300 Subject: [PATCH 04/63] feat: add lazy-lock.json To update plugins and lock file: ```sh NVIM_APPNAME=minvim nvim --headless "+Lazy! restore" +qa NVIM_APPNAME=minvim nvim --headless "+Lazy! update" +qa ``` Note: `minvim` is the name of the directory that was cloned from this repo; it must be used within each XDG user directory (e.g. ~/.config/minvim). --- lazy-lock.json | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 lazy-lock.json diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 00000000000..e92945d572b --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,34 @@ +{ + "LuaSnip": { "branch": "master", "commit": "45db5addf8d0a201e1cf247cae4cdce605ad3768" }, + "catppuccin": { "branch": "main", "commit": "4fd72a9ab64b393c2c22b168508fd244877fec96" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, + "conform.nvim": { "branch": "master", "commit": "0ebe875d9c306f5fc829db38492ffff2a70d8e9d" }, + "fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" }, + "gitsigns.nvim": { "branch": "main", "commit": "899e993850084ea33d001ec229d237bc020c19ae" }, + "indent-blankline.nvim": { "branch": "master", "commit": "db926997af951da38e5004ec7b9fbdc480b48f5d" }, + "lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" }, + "lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" }, + "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "482350b050bd413931c2cdd4857443c3da7d57cb" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, + "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, + "mini.nvim": { "branch": "main", "commit": "08430e1ae29d54f2cb54a7d3f9062f2f2a0b4909" }, + "neo-tree.nvim": { "branch": "main", "commit": "8c75e8a2949cd6cd35525799200a8d34471ee9eb" }, + "nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" }, + "nvim-autopairs": { "branch": "master", "commit": "19606af7c039271d5aa96bceff101e7523af3136" }, + "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, + "nvim-lint": { "branch": "master", "commit": "debabca63c0905b59ce596a55a8e33eafdf66342" }, + "nvim-lspconfig": { "branch": "master", "commit": "3ad562700d0615818bf358268ac8914f6ce2b079" }, + "nvim-treesitter": { "branch": "master", "commit": "fd9663acca289598086b7c5a366be8b2fa5d7960" }, + "nvim-web-devicons": { "branch": "master", "commit": "3722e3d1fb5fe1896a104eb489e8f8651260b520" }, + "plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, + "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, + "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, + "todo-comments.nvim": { "branch": "main", "commit": "8f45f353dc3649cb9b44cecda96827ea88128584" }, + "vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }, + "vim-tmux-navigator": { "branch": "master", "commit": "5b3c701686fb4e6629c100ed32e827edf8dad01e" }, + "which-key.nvim": { "branch": "main", "commit": "6c1584eb76b55629702716995cca4ae2798a9cca" } +} From 2b4a0f653659d80bbbf528173bcf1237e0c6fd8e Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Sat, 31 Aug 2024 16:28:21 +0300 Subject: [PATCH 05/63] chore: update plugins --- lazy-lock.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index e92945d572b..51b670bf1a1 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -8,27 +8,27 @@ "fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" }, "gitsigns.nvim": { "branch": "main", "commit": "899e993850084ea33d001ec229d237bc020c19ae" }, "indent-blankline.nvim": { "branch": "master", "commit": "db926997af951da38e5004ec7b9fbdc480b48f5d" }, - "lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" }, + "lazy.nvim": { "branch": "main", "commit": "48b52b5cfcf8f88ed0aff8fde573a5cc20b1306d" }, "lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" }, "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "482350b050bd413931c2cdd4857443c3da7d57cb" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, - "mini.nvim": { "branch": "main", "commit": "08430e1ae29d54f2cb54a7d3f9062f2f2a0b4909" }, + "mini.nvim": { "branch": "main", "commit": "73f2e7a596bbb4e6ae6728d3a4426221ffc9512d" }, "neo-tree.nvim": { "branch": "main", "commit": "8c75e8a2949cd6cd35525799200a8d34471ee9eb" }, "nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" }, "nvim-autopairs": { "branch": "master", "commit": "19606af7c039271d5aa96bceff101e7523af3136" }, "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, "nvim-lint": { "branch": "master", "commit": "debabca63c0905b59ce596a55a8e33eafdf66342" }, "nvim-lspconfig": { "branch": "master", "commit": "3ad562700d0615818bf358268ac8914f6ce2b079" }, - "nvim-treesitter": { "branch": "master", "commit": "fd9663acca289598086b7c5a366be8b2fa5d7960" }, + "nvim-treesitter": { "branch": "master", "commit": "64cc1ef764a0b137a642d05cacdfe1126124fb35" }, "nvim-web-devicons": { "branch": "master", "commit": "3722e3d1fb5fe1896a104eb489e8f8651260b520" }, "plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, - "todo-comments.nvim": { "branch": "main", "commit": "8f45f353dc3649cb9b44cecda96827ea88128584" }, + "todo-comments.nvim": { "branch": "main", "commit": "319c01b99b7a8c9ac2066bf0efd4d6ec68fef444" }, "vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }, "vim-tmux-navigator": { "branch": "master", "commit": "5b3c701686fb4e6629c100ed32e827edf8dad01e" }, - "which-key.nvim": { "branch": "main", "commit": "6c1584eb76b55629702716995cca4ae2798a9cca" } + "which-key.nvim": { "branch": "main", "commit": "bfec3d6bc0a9b0b2cb11644642f78c2c3915eef0" } } From 03ed742b7ba30706b8b48513eaea64516fd0392d Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Tue, 3 Sep 2024 14:12:08 +0300 Subject: [PATCH 06/63] chore: update plugins --- lazy-lock.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 51b670bf1a1..c30a1cfd0fa 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -7,7 +7,7 @@ "conform.nvim": { "branch": "master", "commit": "0ebe875d9c306f5fc829db38492ffff2a70d8e9d" }, "fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" }, "gitsigns.nvim": { "branch": "main", "commit": "899e993850084ea33d001ec229d237bc020c19ae" }, - "indent-blankline.nvim": { "branch": "master", "commit": "db926997af951da38e5004ec7b9fbdc480b48f5d" }, + "indent-blankline.nvim": { "branch": "master", "commit": "18603eb949eba08300799f64027af11ef922283f" }, "lazy.nvim": { "branch": "main", "commit": "48b52b5cfcf8f88ed0aff8fde573a5cc20b1306d" }, "lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" }, "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, @@ -17,11 +17,11 @@ "mini.nvim": { "branch": "main", "commit": "73f2e7a596bbb4e6ae6728d3a4426221ffc9512d" }, "neo-tree.nvim": { "branch": "main", "commit": "8c75e8a2949cd6cd35525799200a8d34471ee9eb" }, "nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" }, - "nvim-autopairs": { "branch": "master", "commit": "19606af7c039271d5aa96bceff101e7523af3136" }, + "nvim-autopairs": { "branch": "master", "commit": "fd2badc24e675f947162a16c124d395bde80dbd6" }, "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, "nvim-lint": { "branch": "master", "commit": "debabca63c0905b59ce596a55a8e33eafdf66342" }, - "nvim-lspconfig": { "branch": "master", "commit": "3ad562700d0615818bf358268ac8914f6ce2b079" }, - "nvim-treesitter": { "branch": "master", "commit": "64cc1ef764a0b137a642d05cacdfe1126124fb35" }, + "nvim-lspconfig": { "branch": "master", "commit": "0ef64599b8aa0187ee5f6d92cb39c951f348f041" }, + "nvim-treesitter": { "branch": "master", "commit": "a1573a9135c608e68cb383f752623527be84bdce" }, "nvim-web-devicons": { "branch": "master", "commit": "3722e3d1fb5fe1896a104eb489e8f8651260b520" }, "plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, From fd9d95fbeaf5878699d0b61bbaf8c2e4d720d4b5 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Wed, 4 Sep 2024 02:29:53 +0300 Subject: [PATCH 07/63] feat: increase mapped sequence wait time --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 073ae4d5ffe..ff73b1c2e8a 100644 --- a/init.lua +++ b/init.lua @@ -136,7 +136,7 @@ vim.opt.updatetime = 250 -- Decrease mapped sequence wait time -- Displays which-key popup sooner -vim.opt.timeoutlen = 300 +vim.opt.timeoutlen = 1000 -- Configure how new splits should be opened vim.opt.splitright = true From ad1a2e0157513b99dd81aebc42effff52be8e6e2 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Wed, 4 Sep 2024 02:31:29 +0300 Subject: [PATCH 08/63] feat: manage hidden files in neotree --- lua/kickstart/plugins/neo-tree.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lua/kickstart/plugins/neo-tree.lua b/lua/kickstart/plugins/neo-tree.lua index bd4422695aa..a9ca8be3422 100644 --- a/lua/kickstart/plugins/neo-tree.lua +++ b/lua/kickstart/plugins/neo-tree.lua @@ -20,6 +20,23 @@ return { ['\\'] = 'close_window', }, }, + filtered_items = { + show_hidden_count = true, + hide_dotfiles = false, + hide_gitignored = true, + hide_by_name = { + '.github', + '.gitignore', + 'node_modules', + }, + -- uses glob style patterns + hide_by_pattern = { + '*-lock.json', + }, + -- remains hidden even if visible is toggled to true, + -- this overrides always_show + never_show = { '.git' }, + }, }, }, } From e92ee6f7269860aa58e0c1bc7ca2e7c43d351c66 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Wed, 4 Sep 2024 02:39:35 +0300 Subject: [PATCH 09/63] feat: make neotree always visible --- init.lua | 1 + lua/custom/core/init.lua | 1 + lua/custom/core/options.lua | 15 +++++++++++++++ 3 files changed, 17 insertions(+) create mode 100644 lua/custom/core/init.lua create mode 100644 lua/custom/core/options.lua diff --git a/init.lua b/init.lua index ff73b1c2e8a..5ab66117a7d 100644 --- a/init.lua +++ b/init.lua @@ -97,6 +97,7 @@ vim.g.have_nerd_font = true -- See `:help vim.opt` -- NOTE: You can change these options as you wish! -- For more options, you can see `:help option-list` +require('custom.core') -- Make line numbers default vim.opt.number = true diff --git a/lua/custom/core/init.lua b/lua/custom/core/init.lua new file mode 100644 index 00000000000..6385ffab713 --- /dev/null +++ b/lua/custom/core/init.lua @@ -0,0 +1 @@ +require("custom.core.options") diff --git a/lua/custom/core/options.lua b/lua/custom/core/options.lua new file mode 100644 index 00000000000..4e598ccdfe4 --- /dev/null +++ b/lua/custom/core/options.lua @@ -0,0 +1,15 @@ +-- Make Neotree always visible +-- +-- references: +-- https://github.com/nvim-neo-tree/neo-tree.nvim/discussions/679 +-- +vim.api.nvim_create_autocmd("VimEnter", { + pattern = "*", + group = vim.api.nvim_create_augroup("NeotreeOnOpen", { clear = true }), + once = true, + callback = function(_) + if vim.fn.argc() == 0 then + vim.cmd("Neotree") + end + end, +}) From ff693f80fdea52faabcd269e703d8d4d81ea7132 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Wed, 4 Sep 2024 02:40:36 +0300 Subject: [PATCH 10/63] feat: manage editor line wrap --- lua/custom/core/options.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lua/custom/core/options.lua b/lua/custom/core/options.lua index 4e598ccdfe4..6d853981782 100644 --- a/lua/custom/core/options.lua +++ b/lua/custom/core/options.lua @@ -1,3 +1,12 @@ +-- Disable line wrap for all file types except Markdown +vim.cmd [[ + augroup DisableLineWrap + autocmd! + autocmd FileType * setlocal nowrap + autocmd FileType markdown setlocal wrap + augroup END +]] + -- Make Neotree always visible -- -- references: From 7b46d901e0debf1f00b5f4bd00210c0fc63b342b Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Wed, 4 Sep 2024 02:42:17 +0300 Subject: [PATCH 11/63] fix: change s key behavior --- lua/custom/core/init.lua | 1 + lua/custom/core/keymaps.lua | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 lua/custom/core/keymaps.lua diff --git a/lua/custom/core/init.lua b/lua/custom/core/init.lua index 6385ffab713..3b819ae2401 100644 --- a/lua/custom/core/init.lua +++ b/lua/custom/core/init.lua @@ -1 +1,2 @@ require("custom.core.options") +require("custom.core.keymaps") diff --git a/lua/custom/core/keymaps.lua b/lua/custom/core/keymaps.lua new file mode 100644 index 00000000000..1557e2c8d45 --- /dev/null +++ b/lua/custom/core/keymaps.lua @@ -0,0 +1,3 @@ +-- NOTE: if 'timeoutlen' is low enough to cause occasional usage of |s| key +-- (that deletes character under cursor), disable it with the following call: +vim.keymap.set({ 'n', 'x' }, 's', '') From d92cecff5e8481abd89c86c4969d11f032e35853 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Wed, 4 Sep 2024 02:43:58 +0300 Subject: [PATCH 12/63] feat: exit insert mode with jk --- lua/custom/core/keymaps.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/custom/core/keymaps.lua b/lua/custom/core/keymaps.lua index 1557e2c8d45..4f104947594 100644 --- a/lua/custom/core/keymaps.lua +++ b/lua/custom/core/keymaps.lua @@ -1,3 +1,6 @@ -- NOTE: if 'timeoutlen' is low enough to cause occasional usage of |s| key -- (that deletes character under cursor), disable it with the following call: vim.keymap.set({ 'n', 'x' }, 's', '') + +-- Misc +vim.keymap.set('i', 'jk', '', { desc = 'Exit insert mode with jk' }) From 21b303ade92c2abdaaa45947f8378916cf6d51e0 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Wed, 4 Sep 2024 02:46:03 +0300 Subject: [PATCH 13/63] feat: manage window splitting with keymaps --- lua/custom/core/keymaps.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/custom/core/keymaps.lua b/lua/custom/core/keymaps.lua index 4f104947594..d09eaddf9b6 100644 --- a/lua/custom/core/keymaps.lua +++ b/lua/custom/core/keymaps.lua @@ -4,3 +4,9 @@ vim.keymap.set({ 'n', 'x' }, 's', '') -- Misc vim.keymap.set('i', 'jk', '', { desc = 'Exit insert mode with jk' }) + +-- WINDOW MANAGEMENT +vim.keymap.set("n", "wv", "v", { desc = "Split [W]indow [V]ertically" }) +vim.keymap.set("n", "wh", "s", { desc = "Split [W]indow [H]orizontally" }) +vim.keymap.set("n", "we", "=", { desc = "Make Splits [W]indow [E]qual Size" }) +vim.keymap.set("n", "x", "close", { desc = "[X] Close Current Split [W]indow" }) From 089f2c63bfcd979b3604c5049ae7666ddcac701b Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Wed, 4 Sep 2024 15:31:46 +0300 Subject: [PATCH 14/63] chore: update plugins --- lazy-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index c30a1cfd0fa..5dc7e2fcc84 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -14,14 +14,14 @@ "mason-lspconfig.nvim": { "branch": "main", "commit": "482350b050bd413931c2cdd4857443c3da7d57cb" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, - "mini.nvim": { "branch": "main", "commit": "73f2e7a596bbb4e6ae6728d3a4426221ffc9512d" }, + "mini.nvim": { "branch": "main", "commit": "eb0f557a5797cfe9c720ed84a71582c22bccb4f8" }, "neo-tree.nvim": { "branch": "main", "commit": "8c75e8a2949cd6cd35525799200a8d34471ee9eb" }, "nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" }, "nvim-autopairs": { "branch": "master", "commit": "fd2badc24e675f947162a16c124d395bde80dbd6" }, "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, - "nvim-lint": { "branch": "master", "commit": "debabca63c0905b59ce596a55a8e33eafdf66342" }, + "nvim-lint": { "branch": "master", "commit": "a7ce9c78a7c710c28bee56dfab10a5c0c80b7fb5" }, "nvim-lspconfig": { "branch": "master", "commit": "0ef64599b8aa0187ee5f6d92cb39c951f348f041" }, - "nvim-treesitter": { "branch": "master", "commit": "a1573a9135c608e68cb383f752623527be84bdce" }, + "nvim-treesitter": { "branch": "master", "commit": "5b8b126de02ebfd92e46ed5986b3e58e870b85de" }, "nvim-web-devicons": { "branch": "master", "commit": "3722e3d1fb5fe1896a104eb489e8f8651260b520" }, "plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, From 9658e78b2fd209c1eac4c807bd21c34e8cfe7d6e Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Wed, 11 Sep 2024 20:07:48 +0300 Subject: [PATCH 15/63] chore: update plugins --- lazy-lock.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 5dc7e2fcc84..1b7f0e9b139 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -4,31 +4,31 @@ "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "conform.nvim": { "branch": "master", "commit": "0ebe875d9c306f5fc829db38492ffff2a70d8e9d" }, + "conform.nvim": { "branch": "master", "commit": "936f2413e6c57185cd873623a29a0685bce4b423" }, "fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" }, - "gitsigns.nvim": { "branch": "main", "commit": "899e993850084ea33d001ec229d237bc020c19ae" }, + "gitsigns.nvim": { "branch": "main", "commit": "1ef74b546732f185d0f806860fa5404df7614f28" }, "indent-blankline.nvim": { "branch": "master", "commit": "18603eb949eba08300799f64027af11ef922283f" }, "lazy.nvim": { "branch": "main", "commit": "48b52b5cfcf8f88ed0aff8fde573a5cc20b1306d" }, "lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" }, "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "482350b050bd413931c2cdd4857443c3da7d57cb" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, - "mini.nvim": { "branch": "main", "commit": "eb0f557a5797cfe9c720ed84a71582c22bccb4f8" }, + "mini.nvim": { "branch": "main", "commit": "f0d6e89515c6b055c20d257da717bd30211532f1" }, "neo-tree.nvim": { "branch": "main", "commit": "8c75e8a2949cd6cd35525799200a8d34471ee9eb" }, "nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" }, "nvim-autopairs": { "branch": "master", "commit": "fd2badc24e675f947162a16c124d395bde80dbd6" }, "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, "nvim-lint": { "branch": "master", "commit": "a7ce9c78a7c710c28bee56dfab10a5c0c80b7fb5" }, - "nvim-lspconfig": { "branch": "master", "commit": "0ef64599b8aa0187ee5f6d92cb39c951f348f041" }, - "nvim-treesitter": { "branch": "master", "commit": "5b8b126de02ebfd92e46ed5986b3e58e870b85de" }, - "nvim-web-devicons": { "branch": "master", "commit": "3722e3d1fb5fe1896a104eb489e8f8651260b520" }, + "nvim-lspconfig": { "branch": "master", "commit": "d88ae6623fef09251e3aa20001bb761686eae730" }, + "nvim-treesitter": { "branch": "master", "commit": "b6a6d8997c46dc15682020ce4fddc5a89ee1ac0d" }, + "nvim-web-devicons": { "branch": "master", "commit": "9793801f974bba70e4ac5d7eae6c4f5659993d8e" }, "plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, "todo-comments.nvim": { "branch": "main", "commit": "319c01b99b7a8c9ac2066bf0efd4d6ec68fef444" }, - "vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }, + "vim-sleuth": { "branch": "master", "commit": "cd9d382e33bb817abe7f10cdc3a606bf1d491d75" }, "vim-tmux-navigator": { "branch": "master", "commit": "5b3c701686fb4e6629c100ed32e827edf8dad01e" }, "which-key.nvim": { "branch": "main", "commit": "bfec3d6bc0a9b0b2cb11644642f78c2c3915eef0" } } From 72279d89dbb6a1b7cf2b43ba91bda336ff02b5b4 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Wed, 11 Sep 2024 20:15:32 +0300 Subject: [PATCH 16/63] feat: add nix formatter --- init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 5ab66117a7d..a4ae482366b 100644 --- a/init.lua +++ b/init.lua @@ -97,7 +97,7 @@ vim.g.have_nerd_font = true -- See `:help vim.opt` -- NOTE: You can change these options as you wish! -- For more options, you can see `:help option-list` -require('custom.core') +require 'custom.core' -- Make line numbers default vim.opt.number = true @@ -705,6 +705,7 @@ require('lazy').setup({ -- -- You can use 'stop_after_first' to run the first available formatter from the list -- javascript = { "prettierd", "prettier", stop_after_first = true }, + nix = { 'alejandra' }, }, }, }, From 61b56953138abe9b3fcb90914e3f971668bf53d2 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Wed, 11 Sep 2024 20:15:45 +0300 Subject: [PATCH 17/63] feat: add nix linter --- lua/kickstart/plugins/lint.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/kickstart/plugins/lint.lua b/lua/kickstart/plugins/lint.lua index ca9bc237904..319b2aa5467 100644 --- a/lua/kickstart/plugins/lint.lua +++ b/lua/kickstart/plugins/lint.lua @@ -7,6 +7,7 @@ return { local lint = require 'lint' lint.linters_by_ft = { markdown = { 'markdownlint' }, + nix = { 'statix' }, } -- To allow other plugins to add linters to require('lint').linters_by_ft, From cd3351ac325daf11013b188de75b6d69c0bbe90b Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Thu, 12 Sep 2024 19:24:52 +0300 Subject: [PATCH 18/63] feat: add shell script linter and formatter --- init.lua | 1 + lua/kickstart/plugins/lint.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/init.lua b/init.lua index a4ae482366b..8434f60d160 100644 --- a/init.lua +++ b/init.lua @@ -706,6 +706,7 @@ require('lazy').setup({ -- You can use 'stop_after_first' to run the first available formatter from the list -- javascript = { "prettierd", "prettier", stop_after_first = true }, nix = { 'alejandra' }, + sh = { 'shfmt' }, }, }, }, diff --git a/lua/kickstart/plugins/lint.lua b/lua/kickstart/plugins/lint.lua index 319b2aa5467..f11c7b09d5d 100644 --- a/lua/kickstart/plugins/lint.lua +++ b/lua/kickstart/plugins/lint.lua @@ -8,6 +8,7 @@ return { lint.linters_by_ft = { markdown = { 'markdownlint' }, nix = { 'statix' }, + sh = { 'shellcheck' }, } -- To allow other plugins to add linters to require('lint').linters_by_ft, From 4292de49e44ac4aff9792981942eed7185208557 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Thu, 12 Sep 2024 19:40:33 +0300 Subject: [PATCH 19/63] feat: add nixd language server for nix --- init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init.lua b/init.lua index 8434f60d160..d63a543987e 100644 --- a/init.lua +++ b/init.lua @@ -596,6 +596,9 @@ require('lazy').setup({ local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities()) + -- Custom language servers that must be installed manually without Mason. + require('lspconfig').nixd.setup { capabilities = capabilities } + -- Enable the following language servers -- Feel free to add/remove any LSPs that you want here. They will automatically be installed. -- From 93fa388e89272aee81c83b32695f7e0df8f46c57 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Thu, 12 Sep 2024 20:14:13 +0300 Subject: [PATCH 20/63] feat: add mason lock file --- lazy-lock.json | 1 + lua/custom/plugins/init.lua | 8 ++++++++ mason-lock.json | 4 ++++ 3 files changed, 13 insertions(+) create mode 100644 mason-lock.json diff --git a/lazy-lock.json b/lazy-lock.json index 1b7f0e9b139..b35c92d0998 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -11,6 +11,7 @@ "lazy.nvim": { "branch": "main", "commit": "48b52b5cfcf8f88ed0aff8fde573a5cc20b1306d" }, "lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" }, "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, + "mason-lock.nvim": { "branch": "main", "commit": "86614f76c3442fba1c5c8d79aa1efcb3ad69de1c" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 96134e9441f..1cfc371bc4a 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -20,4 +20,12 @@ return { { '', 'TmuxNavigatePrevious' }, }, }, + { + 'zapling/mason-lock.nvim', + init = function() + require('mason-lock').setup { + lockfile_path = vim.fn.stdpath 'config' .. '/mason-lock.json', -- (default) + } + end, + }, } diff --git a/mason-lock.json b/mason-lock.json new file mode 100644 index 00000000000..34cf00ca073 --- /dev/null +++ b/mason-lock.json @@ -0,0 +1,4 @@ +{ + "lua-language-server": "3.10.6", + "stylua": "v0.20.0" +} \ No newline at end of file From 84c03c9af61d3baf187f073e858973047c73d588 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Thu, 12 Sep 2024 21:46:32 +0300 Subject: [PATCH 21/63] fix: install markdownlint via mason --- mason-lock.json | 1 + 1 file changed, 1 insertion(+) diff --git a/mason-lock.json b/mason-lock.json index 34cf00ca073..bad2ffa9441 100644 --- a/mason-lock.json +++ b/mason-lock.json @@ -1,4 +1,5 @@ { "lua-language-server": "3.10.6", + "markdownlint": "0.41.0", "stylua": "v0.20.0" } \ No newline at end of file From 850754f697a3da8c074067f720ee99e12275e319 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Fri, 13 Sep 2024 16:20:52 +0300 Subject: [PATCH 22/63] feat: add lsp file operations plugin --- init.lua | 1 + lazy-lock.json | 1 + 2 files changed, 2 insertions(+) diff --git a/init.lua b/init.lua index d63a543987e..bad458efc89 100644 --- a/init.lua +++ b/init.lua @@ -460,6 +460,7 @@ require('lazy').setup({ { 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants 'williamboman/mason-lspconfig.nvim', 'WhoIsSethDaniel/mason-tool-installer.nvim', + { 'antosha417/nvim-lsp-file-operations', config = true }, -- Useful status updates for LSP. -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` diff --git a/lazy-lock.json b/lazy-lock.json index b35c92d0998..f1395f5a24a 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -21,6 +21,7 @@ "nvim-autopairs": { "branch": "master", "commit": "fd2badc24e675f947162a16c124d395bde80dbd6" }, "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, "nvim-lint": { "branch": "master", "commit": "a7ce9c78a7c710c28bee56dfab10a5c0c80b7fb5" }, + "nvim-lsp-file-operations": { "branch": "master", "commit": "92a673de7ecaa157dd230d0128def10beb56d103" }, "nvim-lspconfig": { "branch": "master", "commit": "d88ae6623fef09251e3aa20001bb761686eae730" }, "nvim-treesitter": { "branch": "master", "commit": "b6a6d8997c46dc15682020ce4fddc5a89ee1ac0d" }, "nvim-web-devicons": { "branch": "master", "commit": "9793801f974bba70e4ac5d7eae6c4f5659993d8e" }, From f993637c9709ee18eaead1b9488e618eac841a38 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Fri, 13 Sep 2024 16:22:36 +0300 Subject: [PATCH 23/63] feat: add show lsp documentaion on hover keymap --- init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init.lua b/init.lua index bad458efc89..3d7a2c235d7 100644 --- a/init.lua +++ b/init.lua @@ -549,6 +549,9 @@ require('lazy').setup({ -- For example, in C this would take you to the header. map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') + -- Show documentation for what is under cursor + map('gh', vim.lsp.buf.hover, '[G]oto Documentation on [H]over') + -- The following two autocommands are used to highlight references of the -- word under your cursor when your cursor rests there for a little while. -- See `:help CursorHold` for information about when this is executed From 71abd5e7579cf817c92dbfbe010f0592253da7d2 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Fri, 13 Sep 2024 16:57:47 +0300 Subject: [PATCH 24/63] feat: customize telescope --- init.lua | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/init.lua b/init.lua index 3d7a2c235d7..0014928d70c 100644 --- a/init.lua +++ b/init.lua @@ -383,12 +383,27 @@ require('lazy').setup({ -- You can put your default mappings / updates / etc. in here -- All the info you're looking for is in `:help telescope.setup()` -- - -- defaults = { - -- mappings = { - -- i = { [''] = 'to_fuzzy_refine' }, - -- }, - -- }, - -- pickers = {} + defaults = { + path_display = { 'smart' }, + mappings = { + i = { + [''] = require('telescope.actions').move_selection_previous, -- move to prev result + [''] = require('telescope.actions').move_selection_next, -- move to next result + }, + }, + }, + pickers = { + find_files = { + file_ignore_patterns = { 'node_modules', '.git' }, + hidden = true, + }, + }, + live_grep = { + file_ignore_patterns = { 'node_modules', '.git' }, + additional_args = function(_) + return { '--hidden' } + end, + }, extensions = { ['ui-select'] = { require('telescope.themes').get_dropdown(), From 012aa5f90390568d86a887bcec01a0714dc86ce8 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Fri, 13 Sep 2024 16:58:22 +0300 Subject: [PATCH 25/63] feat: add custom keymap --- lua/custom/core/keymaps.lua | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lua/custom/core/keymaps.lua b/lua/custom/core/keymaps.lua index d09eaddf9b6..cce63b740fd 100644 --- a/lua/custom/core/keymaps.lua +++ b/lua/custom/core/keymaps.lua @@ -5,8 +5,13 @@ vim.keymap.set({ 'n', 'x' }, 's', '') -- Misc vim.keymap.set('i', 'jk', '', { desc = 'Exit insert mode with jk' }) +-- Remap for dealing with word wrap +vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) +vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true }) + -- WINDOW MANAGEMENT -vim.keymap.set("n", "wv", "v", { desc = "Split [W]indow [V]ertically" }) -vim.keymap.set("n", "wh", "s", { desc = "Split [W]indow [H]orizontally" }) -vim.keymap.set("n", "we", "=", { desc = "Make Splits [W]indow [E]qual Size" }) -vim.keymap.set("n", "x", "close", { desc = "[X] Close Current Split [W]indow" }) +vim.keymap.set('n', 'wv', 'v', { desc = 'Split [W]indow [V]ertically' }) +vim.keymap.set('n', 'wh', 's', { desc = 'Split [W]indow [H]orizontally' }) +vim.keymap.set('n', 'we', '=', { desc = 'Make Splits [W]indow [E]qual Size' }) +vim.keymap.set('n', 'x', 'close', { desc = '[X] Close Current Split [W]indow' }) +vim.keymap.set('n', 'x', '"_x', { desc = 'Delete single character without copying into register' }) From 3dfaf8eed2cb11d68dfe86ad833911c2e9655697 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Fri, 13 Sep 2024 17:10:30 +0300 Subject: [PATCH 26/63] feat: add lazygit plugin --- lazy-lock.json | 1 + lua/custom/plugins/init.lua | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/lazy-lock.json b/lazy-lock.json index f1395f5a24a..0ec71d0f8ea 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -10,6 +10,7 @@ "indent-blankline.nvim": { "branch": "master", "commit": "18603eb949eba08300799f64027af11ef922283f" }, "lazy.nvim": { "branch": "main", "commit": "48b52b5cfcf8f88ed0aff8fde573a5cc20b1306d" }, "lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" }, + "lazygit.nvim": { "branch": "main", "commit": "2432b447483f42ff2e18b2d392cb2bb27e495c08" }, "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, "mason-lock.nvim": { "branch": "main", "commit": "86614f76c3442fba1c5c8d79aa1efcb3ad69de1c" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" }, diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 1cfc371bc4a..4f57204e699 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -20,6 +20,25 @@ return { { '', 'TmuxNavigatePrevious' }, }, }, + { + 'kdheepak/lazygit.nvim', + cmd = { + 'LazyGit', + 'LazyGitConfig', + 'LazyGitCurrentFile', + 'LazyGitFilter', + 'LazyGitFilterCurrentFile', + }, + -- optional for floating window border decoration + dependencies = { + 'nvim-lua/plenary.nvim', + }, + -- setting the keybinding for LazyGit with 'keys' is recommended in + -- order to load the plugin when the command is run for the first time + keys = { + { 'lg', 'LazyGit', desc = 'LazyGit' }, + }, + }, { 'zapling/mason-lock.nvim', init = function() From 5b8aa089321dd5d60adb67eb27bbbce5c0b3a46e Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Sat, 14 Sep 2024 23:09:20 +0300 Subject: [PATCH 27/63] feat: customize autocompletion --- init.lua | 181 +++++++++++++++++++++++++++++++++++++++++++++++-- lazy-lock.json | 7 ++ 2 files changed, 181 insertions(+), 7 deletions(-) diff --git a/init.lua b/init.lua index 0014928d70c..d53144835b3 100644 --- a/init.lua +++ b/init.lua @@ -735,7 +735,7 @@ require('lazy').setup({ { -- Autocompletion 'hrsh7th/nvim-cmp', - event = 'InsertEnter', + event = { 'InsertEnter', 'CmdlineEnter' }, dependencies = { -- Snippet Engine & its associated nvim-cmp source { @@ -753,12 +753,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', @@ -768,6 +768,19 @@ require('lazy').setup({ -- into multiple repos for maintenance purposes. 'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-path', + 'hrsh7th/cmp-nvim-lsp-signature-help', + 'hrsh7th/cmp-nvim-lsp-document-symbol', + 'onsails/lspkind.nvim', + 'hrsh7th/cmp-buffer', + { 'hrsh7th/cmp-cmdline' }, + { + 'supermaven-inc/supermaven-nvim', + opts = { + disable_inline_completion = true, + disable_keymaps = true, + loglevel = 'warn', + }, + }, }, config = function() -- See `:help cmp` @@ -775,6 +788,37 @@ require('lazy').setup({ local luasnip = require 'luasnip' luasnip.config.setup {} + -- Confirm candidate on TAB immediately when there's only one completion entry. + -- + -- --- + -- references: + -- + -- - https://github.com/hrsh7th/nvim-cmp/wiki/Example-mappings#confirm-candidate-on-tab-immediately-when-theres-only-one-completion-entry + local tab_completion = function(action) + return function(fallback) + 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 + + if cmp.visible() then + if #cmp.get_entries() == 1 then + cmp.confirm { select = true } + else + action() + end + elseif has_words_before() then + cmp.complete() + if #cmp.get_entries() == 1 then + cmp.confirm { select = true } + end + else + fallback() + end + end + end + cmp.setup { snippet = { expand = function(args) @@ -783,6 +827,32 @@ require('lazy').setup({ }, completion = { completeopt = 'menu,menuone,noinsert' }, + -- Display the fancy icons to completion-menu with lspkind-nvim. + -- + -- --- + -- + -- references: + -- - https://github.com/onsails/lspkind.nvim#option-2-nvim-cmp + -- - https://github.com/hrsh7th/nvim-cmp/wiki/Menu-Appearance#how-to-get-types-on-the-left-and-offset-the-menu + ---@diagnostic disable-next-line: missing-fields + formatting = { + fields = { 'kind', 'abbr', 'menu' }, + format = function(entry, vim_item) + local kind = require('lspkind').cmp_format { + mode = 'symbol_text', + maxwidth = 50, + ellipsis_char = '...', + symbol_map = { Supermaven = '' }, + }(entry, vim_item) + + local strings = vim.split(kind.kind, '%s', { trimempty = true }) + kind.kind = ' ' .. (strings[1] or '') .. ' ' + kind.menu = ' [' .. (strings[2] or '') .. ']' + + return kind + end, + }, + -- For an understanding of why these mappings were -- chosen, you will need to read `:help ins-completion` -- @@ -808,6 +878,10 @@ require('lazy').setup({ --[''] = cmp.mapping.select_next_item(), --[''] = cmp.mapping.select_prev_item(), + -- Smart Tab completion + [''] = cmp.mapping(tab_completion(cmp.select_next_item), { 'i', 's' }), + [''] = cmp.mapping(tab_completion(cmp.select_prev_item), { 'i', 's' }), + -- 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. @@ -836,16 +910,109 @@ require('lazy').setup({ -- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps }, sources = { + { name = 'supermaven' }, { name = 'lazydev', -- set group index to 0 to skip loading LuaLS completions as lazydev recommends it group_index = 0, }, { name = 'nvim_lsp' }, + { name = 'nvim_lsp_signature_help' }, { name = 'luasnip' }, { name = 'path' }, + { name = 'buffer', keyword_length = 5 }, + }, + + -- Custom Menu Direction + -- + -- --- + -- + -- references: + -- - https://github.com/hrsh7th/nvim-cmp/wiki/Menu-Appearance#custom-menu-direction + view = { + entries = { name = 'custom', selection_order = 'near_cursor' }, + }, + + -- Add borders around floating windows. + -- + -- --- + -- + -- references: + -- - https://github.com/hrsh7th/nvim-cmp/blob/ae644feb7b67bf1ce4260c231d1d4300b19c6f30/README.md?plain=1#L74 + window = { + completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered(), }, } + + -- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). + -- + -- --- + -- + -- references: + -- - https://github.com/hrsh7th/nvim-cmp/blob/ae644feb7b67bf1ce4260c231d1d4300b19c6f30/README.md?plain=1#L108 + -- - https://github.com/hrsh7th/nvim-cmp/wiki/Example-mappings#confirm-candidate-on-tab-immediately-when-theres-only-one-completion-entry + -- - https://github.com/hrsh7th/cmp-nvim-lsp-document-symbol#setup + cmp.setup.cmdline({ '/', '?' }, { + mapping = cmp.mapping.preset.cmdline { + [''] = { + c = function(_) + if cmp.visible() then + if #cmp.get_entries() == 1 then + cmp.confirm { select = true } + else + cmp.select_next_item() + end + else + cmp.complete() + if #cmp.get_entries() == 1 then + cmp.confirm { select = true } + end + end + end, + }, + }, + sources = cmp.config.sources({ + { name = 'nvim_lsp_document_symbol' }, + }, { + { name = 'buffer' }, + }), + }) + + -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). + -- + -- --- + -- + -- references: + -- - https://github.com/hrsh7th/nvim-cmp/blob/ae644feb7b67bf1ce4260c231d1d4300b19c6f30/README.md?plain=1#L116 + -- - https://github.com/hrsh7th/nvim-cmp/wiki/Example-mappings#confirm-candidate-on-tab-immediately-when-theres-only-one-completion-entry + cmp.setup.cmdline(':', { + mapping = cmp.mapping.preset.cmdline { + [''] = { + c = function(_) + if cmp.visible() then + if #cmp.get_entries() == 1 then + cmp.confirm { select = true } + else + cmp.select_next_item() + end + else + cmp.complete() + if #cmp.get_entries() == 1 then + cmp.confirm { select = true } + end + end + end, + }, + }, + sources = cmp.config.sources({ + { name = 'path' }, + }, { + { name = 'cmdline' }, + }), + ---@diagnostic disable-next-line: missing-fields + matching = { disallow_symbol_nonprefix_matching = false }, + }) end, }, diff --git a/lazy-lock.json b/lazy-lock.json index 0ec71d0f8ea..8c20d0d2081 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,16 +1,22 @@ { "LuaSnip": { "branch": "master", "commit": "45db5addf8d0a201e1cf247cae4cdce605ad3768" }, "catppuccin": { "branch": "main", "commit": "4fd72a9ab64b393c2c22b168508fd244877fec96" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, + "cmp-nvim-lsp-document-symbol": { "branch": "main", "commit": "f94f7ba948e32cd302caba1c2ca3f7c697fb4fcf" }, + "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "conform.nvim": { "branch": "master", "commit": "936f2413e6c57185cd873623a29a0685bce4b423" }, "fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" }, + "friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" }, "gitsigns.nvim": { "branch": "main", "commit": "1ef74b546732f185d0f806860fa5404df7614f28" }, "indent-blankline.nvim": { "branch": "master", "commit": "18603eb949eba08300799f64027af11ef922283f" }, "lazy.nvim": { "branch": "main", "commit": "48b52b5cfcf8f88ed0aff8fde573a5cc20b1306d" }, "lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" }, "lazygit.nvim": { "branch": "main", "commit": "2432b447483f42ff2e18b2d392cb2bb27e495c08" }, + "lspkind.nvim": { "branch": "master", "commit": "cff4ae321a91ee3473a92ea1a8c637e3a9510aec" }, "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, "mason-lock.nvim": { "branch": "main", "commit": "86614f76c3442fba1c5c8d79aa1efcb3ad69de1c" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" }, @@ -27,6 +33,7 @@ "nvim-treesitter": { "branch": "master", "commit": "b6a6d8997c46dc15682020ce4fddc5a89ee1ac0d" }, "nvim-web-devicons": { "branch": "master", "commit": "9793801f974bba70e4ac5d7eae6c4f5659993d8e" }, "plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" }, + "supermaven-nvim": { "branch": "main", "commit": "b9f1eb32a4ca1782923ca0d4284d5c713583e4d4" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, From 77aec43c30c8374497fda0876bc195432742e2bd Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Sat, 14 Sep 2024 23:12:19 +0300 Subject: [PATCH 28/63] feat: add borders around lsp floating windows --- init.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/init.lua b/init.lua index d53144835b3..2e73be76561 100644 --- a/init.lua +++ b/init.lua @@ -596,6 +596,26 @@ require('lazy').setup({ }) end + -- Add borders around LSP floating windows. + -- + -- --- + -- + -- references: + -- - https://vi.stackexchange.com/a/39075 + local _border = 'rounded' + + vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(vim.lsp.handlers.hover, { + border = _border, + }) + + vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(vim.lsp.handlers.signature_help, { + border = _border, + }) + + vim.diagnostic.config { + float = { border = _border }, + } + -- The following code creates a keymap to toggle inlay hints in your -- code, if the language server you are using supports them -- From dabfe6330306382d2938e03d14928611af7df60f Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Sat, 14 Sep 2024 23:24:13 +0300 Subject: [PATCH 29/63] feat: customize todo comments --- init.lua | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 2e73be76561..0efcd4b8c2b 100644 --- a/init.lua +++ b/init.lua @@ -339,6 +339,7 @@ require('lazy').setup({ branch = '0.1.x', dependencies = { 'nvim-lua/plenary.nvim', + 'folke/todo-comments.nvim', { -- If encountering errors, see telescope-fzf-native README for installation instructions 'nvim-telescope/telescope-fzf-native.nvim', @@ -427,6 +428,7 @@ require('lazy').setup({ vim.keymap.set('n', 'sr', builtin.resume, { desc = '[S]earch [R]esume' }) vim.keymap.set('n', 's.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' }) vim.keymap.set('n', '', builtin.buffers, { desc = '[ ] Find existing buffers' }) + vim.keymap.set('n', 'st', 'TodoTelescope', { desc = '[S]earch [T]odos' }) -- Slightly advanced example of overriding default behavior and theme vim.keymap.set('n', '/', function() @@ -1061,7 +1063,30 @@ require('lazy').setup({ }, -- Highlight todo, notes, etc in comments - { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } }, + { + 'folke/todo-comments.nvim', + event = 'VimEnter', + dependencies = { 'nvim-lua/plenary.nvim' }, + -- Congfure the keymaps for jumping to next/previous todo comment + -- + -- --- + -- + -- references: + -- - https://github.com/josean-dev/dev-environment-files/blob/cb670e8890ca9d8baf978b38ed75987b742032e6/.config/nvim/lua/josean/plugins/todo-comments.lua#L5 + config = function() + local todo_comments = require 'todo-comments' + + vim.keymap.set('n', ']t', function() + todo_comments.jump_next() + end, { desc = 'Next todo comment' }) + + vim.keymap.set('n', '[t', function() + todo_comments.jump_prev() + end, { desc = 'Previous todo comment' }) + + todo_comments.setup { signs = false } + end, + }, { -- Collection of various small independent plugins/modules 'echasnovski/mini.nvim', From 995b896cb29c68a5450b769f223992ef5991e150 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Sun, 15 Sep 2024 02:03:21 +0300 Subject: [PATCH 30/63] feat: use default signs for gitsigns plugin --- init.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/init.lua b/init.lua index 0efcd4b8c2b..7ff5b94ce38 100644 --- a/init.lua +++ b/init.lua @@ -244,18 +244,18 @@ require('lazy').setup({ -- require('gitsigns').setup({ ... }) -- -- See `:help gitsigns` to understand what the configuration keys do - { -- Adds git related signs to the gutter, as well as utilities for managing changes - 'lewis6991/gitsigns.nvim', - opts = { - signs = { - add = { text = '+' }, - change = { text = '~' }, - delete = { text = '_' }, - topdelete = { text = '‾' }, - changedelete = { text = '~' }, - }, - }, - }, + -- { -- Adds git related signs to the gutter, as well as utilities for managing changes + -- 'lewis6991/gitsigns.nvim', + -- opts = { + -- signs = { + -- add = { text = '+' }, + -- change = { text = '~' }, + -- delete = { text = '_' }, + -- topdelete = { text = '‾' }, + -- changedelete = { text = '~' }, + -- }, + -- }, + -- }, -- NOTE: Plugins can also be configured to run Lua code when they are loaded. -- From f6581f1bc39797021bec2573da13c2f9f7157c5a Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Sun, 15 Sep 2024 02:06:44 +0300 Subject: [PATCH 31/63] fix: show hidden files in telescope --- init.lua | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/init.lua b/init.lua index 7ff5b94ce38..75c598fbdf6 100644 --- a/init.lua +++ b/init.lua @@ -395,15 +395,14 @@ require('lazy').setup({ }, pickers = { find_files = { - file_ignore_patterns = { 'node_modules', '.git' }, - hidden = true, + -- `hidden = true` will still show the inside of `.git/` as it's not `.gitignore`d. + find_command = { 'rg', '--files', '--hidden', '--glob', '!**/.git*/*' }, + }, + live_grep = { + additional_args = function(_) + return { '--hidden', '--glob', '!**/.git*/*' } + end, }, - }, - live_grep = { - file_ignore_patterns = { 'node_modules', '.git' }, - additional_args = function(_) - return { '--hidden' } - end, }, extensions = { ['ui-select'] = { From 57f970a76554b8915f2592ff5b1b322cedf8fb1b Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Sun, 15 Sep 2024 18:15:09 +0300 Subject: [PATCH 32/63] feat: customize notification messages with noice --- init.lua | 24 ++----------- lazy-lock.json | 3 +- lua/custom/plugins/init.lua | 72 +++++++++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+), 22 deletions(-) diff --git a/init.lua b/init.lua index 75c598fbdf6..f64d09e0703 100644 --- a/init.lua +++ b/init.lua @@ -414,6 +414,7 @@ require('lazy').setup({ -- Enable Telescope extensions if they are installed pcall(require('telescope').load_extension, 'fzf') pcall(require('telescope').load_extension, 'ui-select') + pcall(require('telescope').load_extension, 'noice') -- See `:help telescope.builtin` local builtin = require 'telescope.builtin' @@ -428,6 +429,7 @@ require('lazy').setup({ vim.keymap.set('n', 's.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' }) vim.keymap.set('n', '', builtin.buffers, { desc = '[ ] Find existing buffers' }) vim.keymap.set('n', 'st', 'TodoTelescope', { desc = '[S]earch [T]odos' }) + vim.keymap.set('n', 'sm', 'Telescope noice', { desc = '[S]earch Notification [M]essages' }) -- Slightly advanced example of overriding default behavior and theme vim.keymap.set('n', '/', function() @@ -480,7 +482,7 @@ require('lazy').setup({ -- Useful status updates for LSP. -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` - { 'j-hui/fidget.nvim', opts = {} }, + -- { 'j-hui/fidget.nvim', opts = {} }, -- Allows extra capabilities provided by nvim-cmp 'hrsh7th/cmp-nvim-lsp', @@ -597,26 +599,6 @@ require('lazy').setup({ }) end - -- Add borders around LSP floating windows. - -- - -- --- - -- - -- references: - -- - https://vi.stackexchange.com/a/39075 - local _border = 'rounded' - - vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(vim.lsp.handlers.hover, { - border = _border, - }) - - vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(vim.lsp.handlers.signature_help, { - border = _border, - }) - - vim.diagnostic.config { - float = { border = _border }, - } - -- The following code creates a keymap to toggle inlay hints in your -- code, if the language server you are using supports them -- diff --git a/lazy-lock.json b/lazy-lock.json index 8c20d0d2081..d32b4982a17 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -9,7 +9,6 @@ "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "conform.nvim": { "branch": "master", "commit": "936f2413e6c57185cd873623a29a0685bce4b423" }, - "fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" }, "friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" }, "gitsigns.nvim": { "branch": "main", "commit": "1ef74b546732f185d0f806860fa5404df7614f28" }, "indent-blankline.nvim": { "branch": "master", "commit": "18603eb949eba08300799f64027af11ef922283f" }, @@ -24,12 +23,14 @@ "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, "mini.nvim": { "branch": "main", "commit": "f0d6e89515c6b055c20d257da717bd30211532f1" }, "neo-tree.nvim": { "branch": "main", "commit": "8c75e8a2949cd6cd35525799200a8d34471ee9eb" }, + "noice.nvim": { "branch": "main", "commit": "448bb9c524a7601035449210838e374a30153172" }, "nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" }, "nvim-autopairs": { "branch": "master", "commit": "fd2badc24e675f947162a16c124d395bde80dbd6" }, "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, "nvim-lint": { "branch": "master", "commit": "a7ce9c78a7c710c28bee56dfab10a5c0c80b7fb5" }, "nvim-lsp-file-operations": { "branch": "master", "commit": "92a673de7ecaa157dd230d0128def10beb56d103" }, "nvim-lspconfig": { "branch": "master", "commit": "d88ae6623fef09251e3aa20001bb761686eae730" }, + "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, "nvim-treesitter": { "branch": "master", "commit": "b6a6d8997c46dc15682020ce4fddc5a89ee1ac0d" }, "nvim-web-devicons": { "branch": "master", "commit": "9793801f974bba70e4ac5d7eae6c4f5659993d8e" }, "plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" }, diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 4f57204e699..1189a4dddf0 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -47,4 +47,76 @@ return { } end, }, + { + 'folke/noice.nvim', + event = 'VeryLazy', + --- Configuration Recipes + --- + --- --- + --- + --- references: + --- - https://github.com/folke/noice.nvim?tab=readme-ov-file#%EF%B8%8F-configuration + --- - https://github.com/folke/noice.nvim/wiki/Configuration-Recipes + --- - https://github.com/omerxx/dotfiles/blob/2f715c6ed2149e67330155f15a001a624accdd28/nvim/lua/plugins/lazy.lua#L152C11-L165C11 + opts = { + lsp = { + -- override markdown rendering so that **cmp** and other plugins use **Treesitter** + override = { + -- override the default lsp markdown formatter with Noice + ['vim.lsp.util.convert_input_to_markdown_lines'] = true, + -- override the lsp markdown formatter with Noice + ['vim.lsp.util.stylize_markdown'] = true, + -- override cmp documentation with Noice (needs the other options to work) + ['cmp.entry.get_documentation'] = true, + }, + }, + -- you can enable a preset for easier configuration + presets = { + long_message_to_split = true, -- long messages will be sent to a split + lsp_doc_border = true, -- add a border to hover docs and signature help + }, + popupmenu = { + ---@type 'nui'|'cmp' + backend = 'cmp', -- backend to use to show regular cmdline completions + }, + routes = { + -- Show `@recording` messages + { + view = 'notify', + filter = { event = 'msg_showmode' }, + }, + -- Hide `written` messages + { + filter = { + event = 'msg_show', + kind = '', + find = 'written', + }, + opts = { skip = true }, + }, + --- Hide various unwanted messages + { + filter = { + event = 'msg_show', + any = { + { find = '%d+L, %d+B' }, + { find = '; after #%d+' }, + { find = '; before #%d+' }, + { find = '%d fewer lines' }, + { find = '%d more lines' }, + }, + }, + opts = { skip = true }, + }, + }, + }, + dependencies = { + -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries + 'MunifTanjim/nui.nvim', + -- OPTIONAL: + -- `nvim-notify` is only needed, if you want to use the notification view. + -- If not available, we use `mini` as the fallback + 'rcarriga/nvim-notify', + }, + }, } From 39c2f8db9af822eca556262a6f78899593b34a23 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Sun, 15 Sep 2024 21:22:43 +0300 Subject: [PATCH 33/63] feat: customize diagnostics with trouble plugin --- init.lua | 1 + lazy-lock.json | 1 + lua/custom/core/keymaps.lua | 1 - lua/custom/plugins/init.lua | 41 +++++++++++++++++++++++++++++++++++++ 4 files changed, 43 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index f64d09e0703..1f8ed7154df 100644 --- a/init.lua +++ b/init.lua @@ -390,6 +390,7 @@ require('lazy').setup({ i = { [''] = require('telescope.actions').move_selection_previous, -- move to prev result [''] = require('telescope.actions').move_selection_next, -- move to next result + [''] = require('trouble.sources.telescope').open, -- open on trouble }, }, }, diff --git a/lazy-lock.json b/lazy-lock.json index d32b4982a17..7cb1d0b3e80 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -39,6 +39,7 @@ "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, "todo-comments.nvim": { "branch": "main", "commit": "319c01b99b7a8c9ac2066bf0efd4d6ec68fef444" }, + "trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" }, "vim-sleuth": { "branch": "master", "commit": "cd9d382e33bb817abe7f10cdc3a606bf1d491d75" }, "vim-tmux-navigator": { "branch": "master", "commit": "5b3c701686fb4e6629c100ed32e827edf8dad01e" }, "which-key.nvim": { "branch": "main", "commit": "bfec3d6bc0a9b0b2cb11644642f78c2c3915eef0" } diff --git a/lua/custom/core/keymaps.lua b/lua/custom/core/keymaps.lua index cce63b740fd..a56b6c1f235 100644 --- a/lua/custom/core/keymaps.lua +++ b/lua/custom/core/keymaps.lua @@ -13,5 +13,4 @@ vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = tr vim.keymap.set('n', 'wv', 'v', { desc = 'Split [W]indow [V]ertically' }) vim.keymap.set('n', 'wh', 's', { desc = 'Split [W]indow [H]orizontally' }) vim.keymap.set('n', 'we', '=', { desc = 'Make Splits [W]indow [E]qual Size' }) -vim.keymap.set('n', 'x', 'close', { desc = '[X] Close Current Split [W]indow' }) vim.keymap.set('n', 'x', '"_x', { desc = 'Delete single character without copying into register' }) diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 1189a4dddf0..d109976eac3 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -119,4 +119,45 @@ return { 'rcarriga/nvim-notify', }, }, + { + 'folke/trouble.nvim', + dependencies = { + 'nvim-tree/nvim-web-devicons', + 'folke/todo-comments.nvim', + }, + opts = { focus = true }, + cmd = 'Trouble', + keys = { + { + 'xx', + 'Trouble diagnostics toggle', + desc = 'Diagnostics (Trouble)', + }, + { + 'xX', + 'Trouble diagnostics toggle filter.buf=0', + desc = 'Buffer Diagnostics (Trouble)', + }, + { + 'cs', + 'Trouble symbols toggle focus=false', + desc = 'Symbols (Trouble)', + }, + { + 'cl', + 'Trouble lsp toggle focus=false win.position=right', + desc = 'LSP Definitions / references / ... (Trouble)', + }, + { + 'xL', + 'Trouble loclist toggle', + desc = 'Location List (Trouble)', + }, + { + 'xQ', + 'Trouble qflist toggle', + desc = 'Quickfix List (Trouble)', + }, + }, + }, } From b8a4a8bfcebae10101e2c5d9ef4895a52caee92f Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Sun, 15 Sep 2024 23:45:43 +0300 Subject: [PATCH 34/63] feat: add zen-mode plugin --- lazy-lock.json | 3 ++- lua/custom/plugins/init.lua | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lazy-lock.json b/lazy-lock.json index 7cb1d0b3e80..075a2a105d6 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -42,5 +42,6 @@ "trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" }, "vim-sleuth": { "branch": "master", "commit": "cd9d382e33bb817abe7f10cdc3a606bf1d491d75" }, "vim-tmux-navigator": { "branch": "master", "commit": "5b3c701686fb4e6629c100ed32e827edf8dad01e" }, - "which-key.nvim": { "branch": "main", "commit": "bfec3d6bc0a9b0b2cb11644642f78c2c3915eef0" } + "which-key.nvim": { "branch": "main", "commit": "bfec3d6bc0a9b0b2cb11644642f78c2c3915eef0" }, + "zen-mode.nvim": { "branch": "main", "commit": "29b292bdc58b76a6c8f294c961a8bf92c5a6ebd6" } } diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index d109976eac3..344b70da31d 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -160,4 +160,14 @@ return { }, }, }, + { + 'folke/zen-mode.nvim', + event = 'VeryLazy', + opts = { + window = { backdrop = 1, width = 90 }, + plugins = { + tmux = { enabled = true }, -- disables the tmux statusline + }, + }, + }, } From 1134d0cffb2b45e87bef7c35cf6d5ceb05fddc5a Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Mon, 16 Sep 2024 01:19:54 +0300 Subject: [PATCH 35/63] feat: customize tabs with bufferline plugins --- lazy-lock.json | 1 + lua/custom/plugins/init.lua | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/lazy-lock.json b/lazy-lock.json index 075a2a105d6..1b64ab742a3 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,5 +1,6 @@ { "LuaSnip": { "branch": "master", "commit": "45db5addf8d0a201e1cf247cae4cdce605ad3768" }, + "bufferline.nvim": { "branch": "main", "commit": "0b2fd861eee7595015b6561dade52fb060be10c4" }, "catppuccin": { "branch": "main", "commit": "4fd72a9ab64b393c2c22b168508fd244877fec96" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 344b70da31d..30a2adff7da 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -170,4 +170,22 @@ return { }, }, }, + { + 'akinsho/bufferline.nvim', + version = '*', + dependencies = 'nvim-tree/nvim-web-devicons', + event = 'VeryLazy', + opts = { + options = { + mode = 'tabs', + diagnostics = 'nvim_lsp', + diagnostics_indicator = function(count, level) + local icon = level:match 'error' and ' ' or ' ' + return ' ' .. icon .. count + end, + show_buffer_close_icons = false, + show_close_icon = false, + }, + }, + }, } From 3b25c74e04e5b68a7862151b9e47fe865b2e74ca Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Mon, 16 Sep 2024 09:50:54 +0300 Subject: [PATCH 36/63] fix: restore tmux statusline on quitting zen-mode --- lua/custom/plugins/init.lua | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 30a2adff7da..f159b5a6d21 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -163,12 +163,28 @@ return { { 'folke/zen-mode.nvim', event = 'VeryLazy', - opts = { - window = { backdrop = 1, width = 90 }, - plugins = { - tmux = { enabled = true }, -- disables the tmux statusline - }, - }, + config = function() + require('zen-mode').setup { + window = { backdrop = 1, width = 90 }, + plugins = { + tmux = { enabled = true }, -- disables the tmux statusline + }, + } + + -- Close zen-mode when leaving nvim. + -- Fixes issue where tmux statusline is not restored when quitting nvim + -- while in zen-mode. + -- + -- --- + -- + -- references: + -- - https://github.com/folke/zen-mode.nvim/issues/111#issuecomment-2181237746 + vim.api.nvim_create_autocmd({ 'VimLeavePre' }, { + callback = function() + require('zen-mode').close() + end, + }) + end, }, { 'akinsho/bufferline.nvim', From f9eca1be01f8c92e64d776e29a4bb82c3309fff6 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Mon, 16 Sep 2024 10:29:13 +0300 Subject: [PATCH 37/63] feat: add telescope file browser --- init.lua | 11 ++++++++++- lazy-lock.json | 1 + lua/custom/core/options.lua | 15 ++++++++------- lua/kickstart/plugins/neo-tree.lua | 1 + 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/init.lua b/init.lua index 1f8ed7154df..e77f277837a 100644 --- a/init.lua +++ b/init.lua @@ -335,7 +335,7 @@ require('lazy').setup({ { -- Fuzzy Finder (files, lsp, etc) 'nvim-telescope/telescope.nvim', - event = 'VimEnter', + -- event = 'VimEnter', -- Must be disabled to allow telescope-file-browser to highjack netrw branch = '0.1.x', dependencies = { 'nvim-lua/plenary.nvim', @@ -354,6 +354,7 @@ require('lazy').setup({ end, }, { 'nvim-telescope/telescope-ui-select.nvim' }, + { 'nvim-telescope/telescope-file-browser.nvim' }, -- Useful for getting pretty icons, but requires a Nerd Font. { 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font }, @@ -409,6 +410,12 @@ require('lazy').setup({ ['ui-select'] = { require('telescope.themes').get_dropdown(), }, + file_browser = { + hidden = true, + theme = 'dropdown', + -- disables netrw and use telescope-file-browser in its place + hijack_netrw = true, + }, }, } @@ -416,6 +423,7 @@ require('lazy').setup({ pcall(require('telescope').load_extension, 'fzf') pcall(require('telescope').load_extension, 'ui-select') pcall(require('telescope').load_extension, 'noice') + pcall(require('telescope').load_extension, 'file_browser') -- See `:help telescope.builtin` local builtin = require 'telescope.builtin' @@ -431,6 +439,7 @@ require('lazy').setup({ vim.keymap.set('n', '', builtin.buffers, { desc = '[ ] Find existing buffers' }) vim.keymap.set('n', 'st', 'TodoTelescope', { desc = '[S]earch [T]odos' }) vim.keymap.set('n', 'sm', 'Telescope noice', { desc = '[S]earch Notification [M]essages' }) + vim.keymap.set('n', 'sb', 'Telescope file_browser', { desc = '[S]earch with File [B]rowser' }) -- Slightly advanced example of overriding default behavior and theme vim.keymap.set('n', '/', function() diff --git a/lazy-lock.json b/lazy-lock.json index 1b64ab742a3..0c21370554b 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -36,6 +36,7 @@ "nvim-web-devicons": { "branch": "master", "commit": "9793801f974bba70e4ac5d7eae6c4f5659993d8e" }, "plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" }, "supermaven-nvim": { "branch": "main", "commit": "b9f1eb32a4ca1782923ca0d4284d5c713583e4d4" }, + "telescope-file-browser.nvim": { "branch": "master", "commit": "dd9de68c08b6d678198a99f5ea13e0384a1f04cf" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, diff --git a/lua/custom/core/options.lua b/lua/custom/core/options.lua index 6d853981782..5b5112e93f8 100644 --- a/lua/custom/core/options.lua +++ b/lua/custom/core/options.lua @@ -7,18 +7,19 @@ vim.cmd [[ augroup END ]] --- Make Neotree always visible +-- Show Telescope File Browser on neovim startup without arguments. -- --- references: --- https://github.com/nvim-neo-tree/neo-tree.nvim/discussions/679 +-- --- -- -vim.api.nvim_create_autocmd("VimEnter", { - pattern = "*", - group = vim.api.nvim_create_augroup("NeotreeOnOpen", { clear = true }), +-- references: +-- - https://github.com/nvim-neo-tree/neo-tree.nvim/discussions/679 +vim.api.nvim_create_autocmd('VimEnter', { + pattern = '*', + group = vim.api.nvim_create_augroup('TelescopeFileBrowserOnOpen', { clear = true }), once = true, callback = function(_) if vim.fn.argc() == 0 then - vim.cmd("Neotree") + vim.cmd 'Telescope file_browser' end end, }) diff --git a/lua/kickstart/plugins/neo-tree.lua b/lua/kickstart/plugins/neo-tree.lua index a9ca8be3422..ec6d1da5579 100644 --- a/lua/kickstart/plugins/neo-tree.lua +++ b/lua/kickstart/plugins/neo-tree.lua @@ -15,6 +15,7 @@ return { }, opts = { filesystem = { + hijack_netrw_behavior = 'disabled', window = { mappings = { ['\\'] = 'close_window', From 8f83cc9a90b15b5a9210afeb8ba6ff35ec10f5a4 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Mon, 16 Sep 2024 10:52:50 +0300 Subject: [PATCH 38/63] feat: add custom keymaps --- lua/custom/core/keymaps.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/custom/core/keymaps.lua b/lua/custom/core/keymaps.lua index a56b6c1f235..969a01c1936 100644 --- a/lua/custom/core/keymaps.lua +++ b/lua/custom/core/keymaps.lua @@ -4,6 +4,9 @@ vim.keymap.set({ 'n', 'x' }, 's', '') -- Misc vim.keymap.set('i', 'jk', '', { desc = 'Exit insert mode with jk' }) +vim.keymap.set('n', ';', ':', { desc = '[;] Luanch Command Line' }) +vim.keymap.set('n', '0', '^', { desc = 'Swap `0` and `^`', noremap = true }) +vim.keymap.set('n', '^', '0', { desc = 'Swap `0` and `^`', noremap = true }) -- Remap for dealing with word wrap vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) From f56ccc722b0f51c2fab4bde99aa0187c413ca57e Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Mon, 16 Sep 2024 15:55:29 +0300 Subject: [PATCH 39/63] feat: add regex to ensure installed treesitter list --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index e77f277837a..221a29bae2f 100644 --- a/init.lua +++ b/init.lua @@ -1122,7 +1122,7 @@ require('lazy').setup({ 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' }, + ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'regex', 'vim', 'vimdoc' }, -- Autoinstall languages that are not installed auto_install = true, highlight = { From cfed2a518fa1ddd886a0b3bc31d71ea9456b3271 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Mon, 16 Sep 2024 18:32:33 +0300 Subject: [PATCH 40/63] feat: customize lines commenting with mini.comment --- init.lua | 15 +++++++++++++++ lazy-lock.json | 1 + 2 files changed, 16 insertions(+) diff --git a/init.lua b/init.lua index 221a29bae2f..ef46817a14d 100644 --- a/init.lua +++ b/init.lua @@ -1081,6 +1081,9 @@ require('lazy').setup({ { -- Collection of various small independent plugins/modules 'echasnovski/mini.nvim', + dependencies = { + { 'JoosepAlviste/nvim-ts-context-commentstring', opts = { enable_autocmd = false } }, + }, config = function() -- Better Around/Inside textobjects -- @@ -1114,6 +1117,18 @@ require('lazy').setup({ -- ... and there is more! -- Check out: https://github.com/echasnovski/mini.nvim + -- + -- --- + -- + -- references: + -- - https://github.com/JoosepAlviste/nvim-ts-context-commentstring/wiki/Integrations#minicomment + require('mini.comment').setup { + options = { + custom_commentstring = function() + return require('ts_context_commentstring').calculate_commentstring() or vim.bo.commentstring + end, + }, + } end, }, { -- Highlight, edit, and navigate code diff --git a/lazy-lock.json b/lazy-lock.json index 0c21370554b..4b9b9e41891 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -33,6 +33,7 @@ "nvim-lspconfig": { "branch": "master", "commit": "d88ae6623fef09251e3aa20001bb761686eae730" }, "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, "nvim-treesitter": { "branch": "master", "commit": "b6a6d8997c46dc15682020ce4fddc5a89ee1ac0d" }, + "nvim-ts-context-commentstring": { "branch": "main", "commit": "375c2d86cee6674afd75b4f727ce3a80065552f7" }, "nvim-web-devicons": { "branch": "master", "commit": "9793801f974bba70e4ac5d7eae6c4f5659993d8e" }, "plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" }, "supermaven-nvim": { "branch": "main", "commit": "b9f1eb32a4ca1782923ca0d4284d5c713583e4d4" }, From 2895cf893b4b33f3c6c25183220c48f9658378e4 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Mon, 16 Sep 2024 19:56:00 +0300 Subject: [PATCH 41/63] feat: silence annoying notification message --- lua/custom/plugins/init.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index f159b5a6d21..c66d10e62c7 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -94,6 +94,14 @@ return { }, opts = { skip = true }, }, + -- Hide `No inforamtion available` messages + { + filter = { + event = 'notify', + find = 'No information available', + }, + opts = { skip = true }, + }, --- Hide various unwanted messages { filter = { From fe704d762e8c81527ebc9906fd8c1581367bf295 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Mon, 16 Sep 2024 22:20:05 +0300 Subject: [PATCH 42/63] feat: add render-markdown plugin --- lazy-lock.json | 1 + lua/custom/plugins/init.lua | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/lazy-lock.json b/lazy-lock.json index 4b9b9e41891..c4d6e78a86a 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -36,6 +36,7 @@ "nvim-ts-context-commentstring": { "branch": "main", "commit": "375c2d86cee6674afd75b4f727ce3a80065552f7" }, "nvim-web-devicons": { "branch": "master", "commit": "9793801f974bba70e4ac5d7eae6c4f5659993d8e" }, "plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" }, + "render-markdown.nvim": { "branch": "main", "commit": "2424693c7a4c79641a7ea1e2a838dbc9238d6066" }, "supermaven-nvim": { "branch": "main", "commit": "b9f1eb32a4ca1782923ca0d4284d5c713583e4d4" }, "telescope-file-browser.nvim": { "branch": "master", "commit": "dd9de68c08b6d678198a99f5ea13e0384a1f04cf" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index c66d10e62c7..5d45e0828a9 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -212,4 +212,14 @@ return { }, }, }, + { + 'MeanderingProgrammer/render-markdown.nvim', + version = '*', + dependencies = { + 'nvim-treesitter/nvim-treesitter', + 'nvim-tree/nvim-web-devicons', + }, + ft = { 'markdown' }, + opts = {}, + }, } From 811b7e5f69b8ba5012419d3a25320fd5ea5913b4 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Tue, 17 Sep 2024 11:13:44 +0300 Subject: [PATCH 43/63] feat: use helix preset for which-key --- init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/init.lua b/init.lua index ef46817a14d..6026f4fb0ba 100644 --- a/init.lua +++ b/init.lua @@ -276,6 +276,7 @@ require('lazy').setup({ 'folke/which-key.nvim', event = 'VimEnter', -- Sets the loading event to 'VimEnter' opts = { + preset = 'helix', icons = { -- set icon mappings to true if you have a Nerd Font mappings = vim.g.have_nerd_font, From 8427fb03dd9e2984c2f0481422c38ea870ac85f9 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Tue, 17 Sep 2024 12:45:44 +0300 Subject: [PATCH 44/63] feat: enable some catppuccin theme integrations --- init.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/init.lua b/init.lua index 6026f4fb0ba..826fc3c27a8 100644 --- a/init.lua +++ b/init.lua @@ -1042,6 +1042,14 @@ require('lazy').setup({ color_overrides = { mocha = { base = '#000000', mantle = '#000000', crust = '#000000' }, }, + integrations = { + mason = true, + neotree = true, + noice = true, + notify = true, + lsp_trouble = true, + which_key = true, + }, }, init = function() -- Load the colorscheme here. From dcc1e3caf855b92efacd55af6d5697e01705fc62 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Tue, 17 Sep 2024 12:51:40 +0300 Subject: [PATCH 45/63] chore: ignore lua_ls noisy missing-fields warnings --- init.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 826fc3c27a8..3a6836d97f7 100644 --- a/init.lua +++ b/init.lua @@ -665,7 +665,7 @@ require('lazy').setup({ callSnippet = 'Replace', }, -- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings - -- diagnostics = { disable = { 'missing-fields' } }, + diagnostics = { disable = { 'missing-fields' } }, }, }, }, @@ -848,7 +848,6 @@ require('lazy').setup({ -- references: -- - https://github.com/onsails/lspkind.nvim#option-2-nvim-cmp -- - https://github.com/hrsh7th/nvim-cmp/wiki/Menu-Appearance#how-to-get-types-on-the-left-and-offset-the-menu - ---@diagnostic disable-next-line: missing-fields formatting = { fields = { 'kind', 'abbr', 'menu' }, format = function(entry, vim_item) @@ -1024,7 +1023,6 @@ require('lazy').setup({ }, { { name = 'cmdline' }, }), - ---@diagnostic disable-next-line: missing-fields matching = { disallow_symbol_nonprefix_matching = false }, }) end, From 6df176eb0e7422c1f826c9f712002ba0fd0864b8 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Tue, 17 Sep 2024 22:01:52 +0300 Subject: [PATCH 46/63] feat: disable mason tool auto install on startup --- init.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 3a6836d97f7..b04afc68dd3 100644 --- a/init.lua +++ b/init.lua @@ -685,7 +685,14 @@ require('lazy').setup({ vim.list_extend(ensure_installed, { 'stylua', -- Used to format Lua code }) - require('mason-tool-installer').setup { ensure_installed = ensure_installed } + require('mason-tool-installer').setup { + ensure_installed = ensure_installed, + -- automatically install / update on startup. If set to false nothing + -- will happen on startup. You can use :MasonToolsInstall or + -- :MasonToolsUpdate to install tools and check for updates. + -- Default: true + run_on_start = false, + } require('mason-lspconfig').setup { handlers = { From ddfdb395266151b1cf8faf086338584e502b019a Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Tue, 17 Sep 2024 22:05:12 +0300 Subject: [PATCH 47/63] feat: add borders to mason ui --- init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index b04afc68dd3..3ae1e3bc6e5 100644 --- a/init.lua +++ b/init.lua @@ -677,7 +677,9 @@ require('lazy').setup({ -- :Mason -- -- You can press `g?` for help in this menu. - require('mason').setup() + require('mason').setup { + ui = { border = 'rounded' }, + } -- You can add other tools here that you want Mason to install -- for you, so that they are available from within Neovim. From 0ea30a594d0cc1e8bb22ec243055d5597e625446 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Tue, 17 Sep 2024 22:20:27 +0300 Subject: [PATCH 48/63] feat: setup language servers with mason --- init.lua | 132 ++++++++++++++++++++++++++++++++- lua/kickstart/plugins/lint.lua | 1 - mason-lock.json | 12 ++- 3 files changed, 140 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index 3ae1e3bc6e5..cfc742bf468 100644 --- a/init.lua +++ b/init.lua @@ -630,7 +630,11 @@ require('lazy').setup({ capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities()) -- Custom language servers that must be installed manually without Mason. + -- + -- NOTE: nixd LSP is not available on Mason registry. + -- BUG: Marksman LSP crashes on startup when installed with Mason (on NixOS). require('lspconfig').nixd.setup { capabilities = capabilities } + require('lspconfig').marksman.setup { capabilities = capabilities } -- Enable the following language servers -- Feel free to add/remove any LSPs that you want here. They will automatically be installed. @@ -655,6 +659,70 @@ require('lazy').setup({ -- tsserver = {}, -- + astro = {}, + + -- Bash Language Server + -- + -- --- + -- + -- dependencies: + -- - [shellcheck][1] for linting + -- - [shfmt][2] for formatting + -- + -- [1]: https://github.com/koalaman/shellcheck + -- [2]: https://github.com/mvdan/sh + bashls = {}, + + -- Deno Language Server + -- + -- --- + -- + -- references: + -- - https://docs.deno.com/runtime/reference/lsp/ + -- - https://docs.deno.com/runtime/getting_started/setup_your_environment/#neovim-0.6%2B-using-the-built-in-language-server + denols = { + root_dir = require('lspconfig').util.root_pattern('deno.json', 'deno.jsonc'), + }, + + dprint = { + filetypes = { + 'astro', + 'html', + 'dockerfile', + 'graphql', + 'javascript', + 'javascriptreact', + 'typescript', + 'typescriptreact', + 'json', + 'jsonc', + 'markdown', + 'python', + 'toml', + 'rust', + 'roslyn', + }, + root_dir = require('lspconfig').util.root_pattern('dprint.json', 'dprint.jsonc'), + }, + + eslint = { + on_attach = function(_, bufnr) + vim.api.nvim_create_autocmd('BufWritePre', { + buffer = bufnr, + command = 'EslintFixAll', + }) + end, + settings = { + experimental = { useFlatConfig = true }, + format = false, + packageManager = 'pnpm', + }, + }, + + graphql = {}, + + html = {}, + lua_ls = { -- cmd = {...}, -- filetypes = { ...}, @@ -669,6 +737,46 @@ require('lazy').setup({ }, }, }, + + -- TypeScript Language Server + -- + -- --- + -- + -- references: + -- - https://docs.deno.com/runtime/getting_started/setup_your_environment/#neovim-0.6%2B-using-the-built-in-language-server + ts_ls = { + root_dir = require('lspconfig').util.root_pattern 'package.json', + single_file_support = false, + }, + + unocss = { + filetypes = { + 'astro', + 'html', + 'javascript', + 'javascriptreact', + 'typescript', + 'typescriptreact', + 'vue', + 'svelte', + }, + }, + + yamlls = {}, + } + + -- To appropriately highlight codefences returned from denols, + -- you will need to augment `vim.g.markdown_fenced` languages. + -- + -- --- + -- + -- references: + -- - https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#denols + vim.g.markdown_fenced_languages = { + 'ts=typescript', + 'tsx=typescriptreact', + 'js=javascript', + 'jsx=javascriptreact', } -- Ensure the servers and tools above are installed @@ -686,6 +794,7 @@ require('lazy').setup({ local ensure_installed = vim.tbl_keys(servers or {}) vim.list_extend(ensure_installed, { 'stylua', -- Used to format Lua code + 'markdownlint', -- Used to lint markdown files }) require('mason-tool-installer').setup { ensure_installed = ensure_installed, @@ -708,6 +817,14 @@ require('lazy').setup({ end, }, } + + -- Set the border style for LspInfo window + -- + -- --- + -- + -- references: + -- - https://vi.stackexchange.com/a/39001 + require('lspconfig.ui.windows').default_options.border = 'rounded' end, }, @@ -731,7 +848,7 @@ require('lazy').setup({ -- Disable "format_on_save lsp_fallback" for languages that don't -- 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 disable_filetypes = { astro = true, c = true, cpp = true } local lsp_format_opt if disable_filetypes[vim.bo[bufnr].filetype] then lsp_format_opt = 'never' @@ -744,6 +861,7 @@ require('lazy').setup({ } end, formatters_by_ft = { + astro = { 'dprint' }, lua = { 'stylua' }, -- Conform can also run multiple formatters sequentially -- python = { "isort", "black" }, @@ -751,7 +869,6 @@ require('lazy').setup({ -- You can use 'stop_after_first' to run the first available formatter from the list -- javascript = { "prettierd", "prettier", stop_after_first = true }, nix = { 'alejandra' }, - sh = { 'shfmt' }, }, }, }, @@ -938,7 +1055,16 @@ require('lazy').setup({ -- set group index to 0 to skip loading LuaLS completions as lazydev recommends it group_index = 0, }, - { name = 'nvim_lsp' }, + { + name = 'nvim_lsp', + --- Add `-` to `trigger_characters` for UnoCSS Language Server. + --- + --- --- + --- + --- references: + --- - https://github.com/xna00/unocss-language-server?tab=readme-ov-file#usage + trigger_characters = { '-' }, + }, { name = 'nvim_lsp_signature_help' }, { name = 'luasnip' }, { name = 'path' }, diff --git a/lua/kickstart/plugins/lint.lua b/lua/kickstart/plugins/lint.lua index f11c7b09d5d..319b2aa5467 100644 --- a/lua/kickstart/plugins/lint.lua +++ b/lua/kickstart/plugins/lint.lua @@ -8,7 +8,6 @@ return { lint.linters_by_ft = { markdown = { 'markdownlint' }, nix = { 'statix' }, - sh = { 'shellcheck' }, } -- To allow other plugins to add linters to require('lint').linters_by_ft, diff --git a/mason-lock.json b/mason-lock.json index bad2ffa9441..30d7832f4ca 100644 --- a/mason-lock.json +++ b/mason-lock.json @@ -1,5 +1,15 @@ { + "astro-language-server": "2.14.2", + "bash-language-server": "5.4.0", + "deno": "v1.46.3", + "dprint": "0.47.2", + "eslint-lsp": "4.10.0", + "graphql-language-service-cli": "3.5.0", + "html-lsp": "4.10.0", "lua-language-server": "3.10.6", "markdownlint": "0.41.0", - "stylua": "v0.20.0" + "stylua": "v0.20.0", + "typescript-language-server": "4.3.3", + "unocss-language-server": "0.1.5", + "yaml-language-server": "1.15.0" } \ No newline at end of file From af353a30219b1dff3a076693b9b0e4df3925cc35 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Wed, 18 Sep 2024 20:17:08 +0300 Subject: [PATCH 49/63] feat: add borders to lazy ui --- init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/init.lua b/init.lua index cfc742bf468..12572f69c03 100644 --- a/init.lua +++ b/init.lua @@ -1340,6 +1340,7 @@ require('lazy').setup({ task = '📌', lazy = '💤 ', }, + border = 'rounded', }, }) From 61f87b4807b3e9e5e66473081018877ee1e8ce3f Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Wed, 18 Sep 2024 20:17:43 +0300 Subject: [PATCH 50/63] feat: reduce autocompletion noize --- init.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index 12572f69c03..51d661b8396 100644 --- a/init.lua +++ b/init.lua @@ -1066,9 +1066,9 @@ require('lazy').setup({ trigger_characters = { '-' }, }, { name = 'nvim_lsp_signature_help' }, - { name = 'luasnip' }, - { name = 'path' }, - { name = 'buffer', keyword_length = 5 }, + { name = 'luasnip', max_item_count = 3 }, + { name = 'path', max_item_count = 3 }, + { name = 'buffer', keyword_length = 5, max_item_count = 5 }, }, -- Custom Menu Direction @@ -1123,7 +1123,7 @@ require('lazy').setup({ sources = cmp.config.sources({ { name = 'nvim_lsp_document_symbol' }, }, { - { name = 'buffer' }, + { name = 'buffer', keyword_length = 5, max_item_count = 5 }, }), }) @@ -1154,7 +1154,7 @@ require('lazy').setup({ }, }, sources = cmp.config.sources({ - { name = 'path' }, + { name = 'path', max_item_count = 3 }, }, { { name = 'cmdline' }, }), From be8e93520c4f1c4dcf2a0df2cd5a22c335aaf18d Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Wed, 18 Sep 2024 20:19:42 +0300 Subject: [PATCH 51/63] feat: add vim options --- lua/custom/core/options.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/custom/core/options.lua b/lua/custom/core/options.lua index 5b5112e93f8..c0d2e2a4221 100644 --- a/lua/custom/core/options.lua +++ b/lua/custom/core/options.lua @@ -1,3 +1,6 @@ +-- Misc +vim.opt.colorcolumn = '81' + -- Disable line wrap for all file types except Markdown vim.cmd [[ augroup DisableLineWrap From 2bf308887169b3508ea18c3c6b106ca63387c15e Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Wed, 18 Sep 2024 21:09:17 +0300 Subject: [PATCH 52/63] feat: add custom telescope mappings --- init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/init.lua b/init.lua index 51d661b8396..4a8d4160a70 100644 --- a/init.lua +++ b/init.lua @@ -393,6 +393,8 @@ require('lazy').setup({ [''] = require('telescope.actions').move_selection_previous, -- move to prev result [''] = require('telescope.actions').move_selection_next, -- move to next result [''] = require('trouble.sources.telescope').open, -- open on trouble + [''] = require('telescope.actions').send_selected_to_qflist + require('telescope.actions').open_qflist, + [''] = require('telescope.actions').delete_buffer, }, }, }, From a979704e6928b6dabc73be55332a850de251956c Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Wed, 18 Sep 2024 21:10:50 +0300 Subject: [PATCH 53/63] feat: use nvim-tmux-navigator plugin --- lazy-lock.json | 2 +- lua/custom/plugins/init.lua | 25 +++++++++++-------------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index c4d6e78a86a..31782579d18 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -32,6 +32,7 @@ "nvim-lsp-file-operations": { "branch": "master", "commit": "92a673de7ecaa157dd230d0128def10beb56d103" }, "nvim-lspconfig": { "branch": "master", "commit": "d88ae6623fef09251e3aa20001bb761686eae730" }, "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, + "nvim-tmux-navigation": { "branch": "main", "commit": "4898c98702954439233fdaf764c39636681e2861" }, "nvim-treesitter": { "branch": "master", "commit": "b6a6d8997c46dc15682020ce4fddc5a89ee1ac0d" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "375c2d86cee6674afd75b4f727ce3a80065552f7" }, "nvim-web-devicons": { "branch": "master", "commit": "9793801f974bba70e4ac5d7eae6c4f5659993d8e" }, @@ -45,7 +46,6 @@ "todo-comments.nvim": { "branch": "main", "commit": "319c01b99b7a8c9ac2066bf0efd4d6ec68fef444" }, "trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" }, "vim-sleuth": { "branch": "master", "commit": "cd9d382e33bb817abe7f10cdc3a606bf1d491d75" }, - "vim-tmux-navigator": { "branch": "master", "commit": "5b3c701686fb4e6629c100ed32e827edf8dad01e" }, "which-key.nvim": { "branch": "main", "commit": "bfec3d6bc0a9b0b2cb11644642f78c2c3915eef0" }, "zen-mode.nvim": { "branch": "main", "commit": "29b292bdc58b76a6c8f294c961a8bf92c5a6ebd6" } } diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 5d45e0828a9..25e1ee29ba6 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -4,20 +4,17 @@ -- See the kickstart.nvim README for more information return { { - 'christoomey/vim-tmux-navigator', - cmd = { - 'TmuxNavigateLeft', - 'TmuxNavigateDown', - 'TmuxNavigateUp', - 'TmuxNavigateRight', - 'TmuxNavigatePrevious', - }, - keys = { - { '', 'TmuxNavigateLeft' }, - { '', 'TmuxNavigateDown' }, - { '', 'TmuxNavigateUp' }, - { '', 'TmuxNavigateRight' }, - { '', 'TmuxNavigatePrevious' }, + 'alexghergh/nvim-tmux-navigation', + opts = { + disable_when_zoomed = true, -- defaults to false + keybindings = { + left = '', + down = '', + up = '', + right = '', + last_active = '', + next = '', + }, }, }, { From e7e7f8fcb1a87ba55b5b7b1320e587008b078ba8 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Wed, 18 Sep 2024 21:57:32 +0300 Subject: [PATCH 54/63] chore: update plugins --- lazy-lock.json | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 31782579d18..ddaac89f06b 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,7 +1,7 @@ { - "LuaSnip": { "branch": "master", "commit": "45db5addf8d0a201e1cf247cae4cdce605ad3768" }, - "bufferline.nvim": { "branch": "main", "commit": "0b2fd861eee7595015b6561dade52fb060be10c4" }, - "catppuccin": { "branch": "main", "commit": "4fd72a9ab64b393c2c22b168508fd244877fec96" }, + "LuaSnip": { "branch": "master", "commit": "e808bee352d1a6fcf902ca1a71cee76e60e24071" }, + "bufferline.nvim": { "branch": "main", "commit": "2e3c8cc5a57ddd32f1edd2ffd2ccb10c09421f6c" }, + "catppuccin": { "branch": "main", "commit": "63685e1562ef53873c9764b483d7ac5c7a608922" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, @@ -9,11 +9,11 @@ "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "conform.nvim": { "branch": "master", "commit": "936f2413e6c57185cd873623a29a0685bce4b423" }, + "conform.nvim": { "branch": "master", "commit": "1a99fdc1d3aa9ccdf3021e67982a679a8c5c740c" }, "friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" }, "gitsigns.nvim": { "branch": "main", "commit": "1ef74b546732f185d0f806860fa5404df7614f28" }, "indent-blankline.nvim": { "branch": "master", "commit": "18603eb949eba08300799f64027af11ef922283f" }, - "lazy.nvim": { "branch": "main", "commit": "48b52b5cfcf8f88ed0aff8fde573a5cc20b1306d" }, + "lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" }, "lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" }, "lazygit.nvim": { "branch": "main", "commit": "2432b447483f42ff2e18b2d392cb2bb27e495c08" }, "lspkind.nvim": { "branch": "master", "commit": "cff4ae321a91ee3473a92ea1a8c637e3a9510aec" }, @@ -22,30 +22,30 @@ "mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, - "mini.nvim": { "branch": "main", "commit": "f0d6e89515c6b055c20d257da717bd30211532f1" }, + "mini.nvim": { "branch": "main", "commit": "e50cf9de614500a20e47cfc50e30a100042f91c3" }, "neo-tree.nvim": { "branch": "main", "commit": "8c75e8a2949cd6cd35525799200a8d34471ee9eb" }, - "noice.nvim": { "branch": "main", "commit": "448bb9c524a7601035449210838e374a30153172" }, - "nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" }, - "nvim-autopairs": { "branch": "master", "commit": "fd2badc24e675f947162a16c124d395bde80dbd6" }, + "noice.nvim": { "branch": "main", "commit": "c1ba80ccf6b3bd8c7fc88fe2e61085131d44ad65" }, + "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, + "nvim-autopairs": { "branch": "master", "commit": "f158dcb865c36f72c92358f87787dab2c272eaf3" }, "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, - "nvim-lint": { "branch": "master", "commit": "a7ce9c78a7c710c28bee56dfab10a5c0c80b7fb5" }, + "nvim-lint": { "branch": "master", "commit": "99cab0b885aaa2f59736c047d23e9a7835d4f9a9" }, "nvim-lsp-file-operations": { "branch": "master", "commit": "92a673de7ecaa157dd230d0128def10beb56d103" }, - "nvim-lspconfig": { "branch": "master", "commit": "d88ae6623fef09251e3aa20001bb761686eae730" }, + "nvim-lspconfig": { "branch": "master", "commit": "73e0002b6f211376bbf36c31a2f812aedf6bd6b0" }, "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, "nvim-tmux-navigation": { "branch": "main", "commit": "4898c98702954439233fdaf764c39636681e2861" }, - "nvim-treesitter": { "branch": "master", "commit": "b6a6d8997c46dc15682020ce4fddc5a89ee1ac0d" }, + "nvim-treesitter": { "branch": "master", "commit": "3c6af36794b26e1bcac3f126b43e0f646154725d" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "375c2d86cee6674afd75b4f727ce3a80065552f7" }, - "nvim-web-devicons": { "branch": "master", "commit": "9793801f974bba70e4ac5d7eae6c4f5659993d8e" }, - "plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" }, - "render-markdown.nvim": { "branch": "main", "commit": "2424693c7a4c79641a7ea1e2a838dbc9238d6066" }, - "supermaven-nvim": { "branch": "main", "commit": "b9f1eb32a4ca1782923ca0d4284d5c713583e4d4" }, + "nvim-web-devicons": { "branch": "master", "commit": "9154484705968658e9aab2b894d1b2a64bf9f83d" }, + "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, + "render-markdown.nvim": { "branch": "main", "commit": "4bf3247dfd06844088768b37cf1976efef1bca26" }, + "supermaven-nvim": { "branch": "main", "commit": "3da044bbc23a354e9cb17602ed2d5ca8528173bb" }, "telescope-file-browser.nvim": { "branch": "master", "commit": "dd9de68c08b6d678198a99f5ea13e0384a1f04cf" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, - "todo-comments.nvim": { "branch": "main", "commit": "319c01b99b7a8c9ac2066bf0efd4d6ec68fef444" }, + "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, "trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" }, "vim-sleuth": { "branch": "master", "commit": "cd9d382e33bb817abe7f10cdc3a606bf1d491d75" }, - "which-key.nvim": { "branch": "main", "commit": "bfec3d6bc0a9b0b2cb11644642f78c2c3915eef0" }, + "which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" }, "zen-mode.nvim": { "branch": "main", "commit": "29b292bdc58b76a6c8f294c961a8bf92c5a6ebd6" } } From e389de0ff6bad8b8c851eb7b451d0da32c98badd Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Thu, 19 Sep 2024 01:45:25 +0300 Subject: [PATCH 55/63] feat: remove markdownlint --- init.lua | 1 - lua/kickstart/plugins/lint.lua | 1 - mason-lock.json | 1 - 3 files changed, 3 deletions(-) diff --git a/init.lua b/init.lua index 4a8d4160a70..de68a7d8d6c 100644 --- a/init.lua +++ b/init.lua @@ -796,7 +796,6 @@ require('lazy').setup({ local ensure_installed = vim.tbl_keys(servers or {}) vim.list_extend(ensure_installed, { 'stylua', -- Used to format Lua code - 'markdownlint', -- Used to lint markdown files }) require('mason-tool-installer').setup { ensure_installed = ensure_installed, diff --git a/lua/kickstart/plugins/lint.lua b/lua/kickstart/plugins/lint.lua index 319b2aa5467..31327631cad 100644 --- a/lua/kickstart/plugins/lint.lua +++ b/lua/kickstart/plugins/lint.lua @@ -6,7 +6,6 @@ return { config = function() local lint = require 'lint' lint.linters_by_ft = { - markdown = { 'markdownlint' }, nix = { 'statix' }, } diff --git a/mason-lock.json b/mason-lock.json index 30d7832f4ca..6660b6d8e83 100644 --- a/mason-lock.json +++ b/mason-lock.json @@ -7,7 +7,6 @@ "graphql-language-service-cli": "3.5.0", "html-lsp": "4.10.0", "lua-language-server": "3.10.6", - "markdownlint": "0.41.0", "stylua": "v0.20.0", "typescript-language-server": "4.3.3", "unocss-language-server": "0.1.5", From 34ceae552a06527148546cdbc5d64976a268ea80 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Fri, 20 Sep 2024 16:32:20 +0300 Subject: [PATCH 56/63] feat: use typescript tools as typescript lsp --- init.lua | 11 ----------- lazy-lock.json | 1 + lua/custom/plugins/init.lua | 14 ++++++++++++++ mason-lock.json | 1 - 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/init.lua b/init.lua index de68a7d8d6c..da938caf23a 100644 --- a/init.lua +++ b/init.lua @@ -740,17 +740,6 @@ require('lazy').setup({ }, }, - -- TypeScript Language Server - -- - -- --- - -- - -- references: - -- - https://docs.deno.com/runtime/getting_started/setup_your_environment/#neovim-0.6%2B-using-the-built-in-language-server - ts_ls = { - root_dir = require('lspconfig').util.root_pattern 'package.json', - single_file_support = false, - }, - unocss = { filetypes = { 'astro', diff --git a/lazy-lock.json b/lazy-lock.json index ddaac89f06b..8bdb13b7429 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -45,6 +45,7 @@ "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, "trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" }, + "typescript-tools.nvim": { "branch": "master", "commit": "f8c2e0b36b651c85f52ad5c5373ff8b07adc15a7" }, "vim-sleuth": { "branch": "master", "commit": "cd9d382e33bb817abe7f10cdc3a606bf1d491d75" }, "which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" }, "zen-mode.nvim": { "branch": "main", "commit": "29b292bdc58b76a6c8f294c961a8bf92c5a6ebd6" } diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 25e1ee29ba6..cd05f5df66e 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -219,4 +219,18 @@ return { ft = { 'markdown' }, opts = {}, }, + { + -- TypeScript Language Server + -- + -- --- + -- + -- references: + -- - https://docs.deno.com/runtime/getting_started/setup_your_environment/#neovim-0.6%2B-using-the-built-in-language-server + 'pmizio/typescript-tools.nvim', + dependencies = { 'nvim-lua/plenary.nvim', 'neovim/nvim-lspconfig' }, + opts = { + root_dir = require('lspconfig').util.root_pattern 'package.json', + single_file_support = false, + }, + }, } diff --git a/mason-lock.json b/mason-lock.json index 6660b6d8e83..5f29db3a3d7 100644 --- a/mason-lock.json +++ b/mason-lock.json @@ -8,7 +8,6 @@ "html-lsp": "4.10.0", "lua-language-server": "3.10.6", "stylua": "v0.20.0", - "typescript-language-server": "4.3.3", "unocss-language-server": "0.1.5", "yaml-language-server": "1.15.0" } \ No newline at end of file From b0122938a4e1abb0d0e2eb29704d94aa8b7d2099 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Fri, 20 Sep 2024 18:33:22 +0300 Subject: [PATCH 57/63] feat: customize treesitter --- init.lua | 70 +++++++++++++++++++++++++++++++++++++++++++++++--- lazy-lock.json | 2 ++ 2 files changed, 69 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index da938caf23a..a145c916aca 100644 --- a/init.lua +++ b/init.lua @@ -1280,13 +1280,77 @@ require('lazy').setup({ additional_vim_regex_highlighting = { 'ruby' }, }, indent = { enable = true, disable = { 'ruby' } }, + textobjects = { + select = { + enable = true, + + -- Automatically jump forward to textobj, similar to targets.vim + lookahead = true, + + keymaps = { + -- You can use the capture groups defined in textobjects.scm + ['af'] = '@function.outer', + ['if'] = '@function.inner', + }, + }, + swap = { + enable = true, + swap_next = { + ['a'] = '@parameter.inner', + }, + swap_previous = { + ['A'] = '@parameter.inner', + }, + }, + move = { + enable = true, + set_jumps = true, -- whether to set jumps in the jumplist + goto_next_start = { + [']m'] = '@function.outer', + }, + goto_next_end = { + [']M'] = '@function.outer', + }, + goto_previous_start = { + ['[m'] = '@function.outer', + }, + goto_previous_end = { + ['[M'] = '@function.outer', + }, + }, + lsp_interop = { + enable = true, + border = 'rounded', + peek_definition_code = { + ['df'] = '@function.outer', + }, + }, + }, }, -- 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 + -- - 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 + dependencies = { + { 'nvim-treesitter/nvim-treesitter-textobjects' }, + { + 'nvim-treesitter/nvim-treesitter-context', + opts = { + -- How many lines the window should span. Values <= 0 mean no limit. + max_lines = 3, + -- Minimum editor window height to enable context. Values <= 0 mean no limit. + min_window_height = 20, + -- Maximum number of lines to show for a single context + multiline_threshold = 20, + -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer' + trim_scope = 'outer', + -- Line used to calculate context. Choices: 'cursor', 'topline' + mode = 'cursor', + }, + }, + }, }, -- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the diff --git a/lazy-lock.json b/lazy-lock.json index 8bdb13b7429..394ea7aedb7 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -34,6 +34,8 @@ "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, "nvim-tmux-navigation": { "branch": "main", "commit": "4898c98702954439233fdaf764c39636681e2861" }, "nvim-treesitter": { "branch": "master", "commit": "3c6af36794b26e1bcac3f126b43e0f646154725d" }, + "nvim-treesitter-context": { "branch": "master", "commit": "7f7eeaa99e5a9beab518f502292871ae5f20de6f" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "bf8d2ad35d1d1a687eae6c065c3d524f7ab61b23" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "375c2d86cee6674afd75b4f727ce3a80065552f7" }, "nvim-web-devicons": { "branch": "master", "commit": "9154484705968658e9aab2b894d1b2a64bf9f83d" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, From 0f1748f045640051010a81679e322d811a2d9a2b Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Fri, 20 Sep 2024 18:35:52 +0300 Subject: [PATCH 58/63] fix: start dprint lsp only if config is available --- init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/init.lua b/init.lua index a145c916aca..acee58ed228 100644 --- a/init.lua +++ b/init.lua @@ -705,6 +705,7 @@ require('lazy').setup({ 'roslyn', }, root_dir = require('lspconfig').util.root_pattern('dprint.json', 'dprint.jsonc'), + single_file_support = false, }, eslint = { From 2c62d31031194e86db4c17f7be2771b8b9421149 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Fri, 20 Sep 2024 19:02:03 +0300 Subject: [PATCH 59/63] feat: display a character as the colorcolumn --- lazy-lock.json | 1 + lua/custom/core/options.lua | 3 --- lua/custom/plugins/init.lua | 7 +++++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 394ea7aedb7..3df6fdf008f 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -49,6 +49,7 @@ "trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" }, "typescript-tools.nvim": { "branch": "master", "commit": "f8c2e0b36b651c85f52ad5c5373ff8b07adc15a7" }, "vim-sleuth": { "branch": "master", "commit": "cd9d382e33bb817abe7f10cdc3a606bf1d491d75" }, + "virt-column.nvim": { "branch": "master", "commit": "b62b4ef0774d19452d4ed18e473e824c7a756f2f" }, "which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" }, "zen-mode.nvim": { "branch": "main", "commit": "29b292bdc58b76a6c8f294c961a8bf92c5a6ebd6" } } diff --git a/lua/custom/core/options.lua b/lua/custom/core/options.lua index c0d2e2a4221..5b5112e93f8 100644 --- a/lua/custom/core/options.lua +++ b/lua/custom/core/options.lua @@ -1,6 +1,3 @@ --- Misc -vim.opt.colorcolumn = '81' - -- Disable line wrap for all file types except Markdown vim.cmd [[ augroup DisableLineWrap diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index cd05f5df66e..1858d183bd6 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -233,4 +233,11 @@ return { single_file_support = false, }, }, + { + 'lukas-reineke/virt-column.nvim', + opts = { + virtcolumn = '81', + highlight = { 'Whitespace' }, + }, + }, } From 09be1b77fc7c504041cecbe8a693b05eb42faa7f Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Sat, 21 Sep 2024 01:51:00 +0300 Subject: [PATCH 60/63] perf: optimize plugins lazy loading --- lua/custom/plugins/init.lua | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 1858d183bd6..d2ae5cd002d 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -5,6 +5,7 @@ return { { 'alexghergh/nvim-tmux-navigation', + event = 'VeryLazy', opts = { disable_when_zoomed = true, -- defaults to false keybindings = { @@ -38,14 +39,12 @@ return { }, { 'zapling/mason-lock.nvim', - init = function() - require('mason-lock').setup { - lockfile_path = vim.fn.stdpath 'config' .. '/mason-lock.json', -- (default) - } - end, + cmd = { 'MasonLock', 'MasonLockRestore' }, + opts = {}, }, { 'folke/noice.nvim', + version = '*', event = 'VeryLazy', --- Configuration Recipes --- @@ -126,6 +125,7 @@ return { }, { 'folke/trouble.nvim', + version = '*', dependencies = { 'nvim-tree/nvim-web-devicons', 'folke/todo-comments.nvim', @@ -167,7 +167,7 @@ return { }, { 'folke/zen-mode.nvim', - event = 'VeryLazy', + cmd = 'ZenMode', config = function() require('zen-mode').setup { window = { backdrop = 1, width = 90 }, @@ -195,7 +195,7 @@ return { 'akinsho/bufferline.nvim', version = '*', dependencies = 'nvim-tree/nvim-web-devicons', - event = 'VeryLazy', + event = { 'BufReadPre', 'BufNewFile' }, opts = { options = { mode = 'tabs', @@ -227,6 +227,7 @@ return { -- references: -- - https://docs.deno.com/runtime/getting_started/setup_your_environment/#neovim-0.6%2B-using-the-built-in-language-server 'pmizio/typescript-tools.nvim', + ft = { 'javascript', 'javascriptreact', 'typescript', 'typescriptreact' }, dependencies = { 'nvim-lua/plenary.nvim', 'neovim/nvim-lspconfig' }, opts = { root_dir = require('lspconfig').util.root_pattern 'package.json', @@ -235,6 +236,8 @@ return { }, { 'lukas-reineke/virt-column.nvim', + version = '*', + event = { 'BufReadPre', 'BufNewFile' }, opts = { virtcolumn = '81', highlight = { 'Whitespace' }, From e242fbae4c94ad9fc0ba3a4c1a99d8b4bfc6430c Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Sat, 21 Sep 2024 18:49:10 +0300 Subject: [PATCH 61/63] chore: update plugins --- lazy-lock.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 3df6fdf008f..727f6c7dc62 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -28,27 +28,27 @@ "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, "nvim-autopairs": { "branch": "master", "commit": "f158dcb865c36f72c92358f87787dab2c272eaf3" }, "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, - "nvim-lint": { "branch": "master", "commit": "99cab0b885aaa2f59736c047d23e9a7835d4f9a9" }, + "nvim-lint": { "branch": "master", "commit": "c823e2d0621b5c15aa6b46be4d69b1379bcb8fa6" }, "nvim-lsp-file-operations": { "branch": "master", "commit": "92a673de7ecaa157dd230d0128def10beb56d103" }, - "nvim-lspconfig": { "branch": "master", "commit": "73e0002b6f211376bbf36c31a2f812aedf6bd6b0" }, + "nvim-lspconfig": { "branch": "master", "commit": "f4fef355efa3c5d0813512480ee7b2c050b09fe4" }, "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, "nvim-tmux-navigation": { "branch": "main", "commit": "4898c98702954439233fdaf764c39636681e2861" }, - "nvim-treesitter": { "branch": "master", "commit": "3c6af36794b26e1bcac3f126b43e0f646154725d" }, + "nvim-treesitter": { "branch": "master", "commit": "929ca9c76ee20bb27cffbde4ee90583b6c54d616" }, "nvim-treesitter-context": { "branch": "master", "commit": "7f7eeaa99e5a9beab518f502292871ae5f20de6f" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "bf8d2ad35d1d1a687eae6c065c3d524f7ab61b23" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "375c2d86cee6674afd75b4f727ce3a80065552f7" }, - "nvim-web-devicons": { "branch": "master", "commit": "9154484705968658e9aab2b894d1b2a64bf9f83d" }, + "nvim-web-devicons": { "branch": "master", "commit": "26220156aafb198b2de6a4cf80c1b120a3768da0" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, - "render-markdown.nvim": { "branch": "main", "commit": "4bf3247dfd06844088768b37cf1976efef1bca26" }, + "render-markdown.nvim": { "branch": "main", "commit": "a0777ec640acbf455da32aa856922d4187c5c27f" }, "supermaven-nvim": { "branch": "main", "commit": "3da044bbc23a354e9cb17602ed2d5ca8528173bb" }, - "telescope-file-browser.nvim": { "branch": "master", "commit": "dd9de68c08b6d678198a99f5ea13e0384a1f04cf" }, + "telescope-file-browser.nvim": { "branch": "master", "commit": "3b8a1e17187cfeedb31decbd625da62398a8ff34" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, - "trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" }, + "trouble.nvim": { "branch": "main", "commit": "40c5317a6e90fe3393f07b0fee580d9e93a216b4" }, "typescript-tools.nvim": { "branch": "master", "commit": "f8c2e0b36b651c85f52ad5c5373ff8b07adc15a7" }, - "vim-sleuth": { "branch": "master", "commit": "cd9d382e33bb817abe7f10cdc3a606bf1d491d75" }, + "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, "virt-column.nvim": { "branch": "master", "commit": "b62b4ef0774d19452d4ed18e473e824c7a756f2f" }, "which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" }, "zen-mode.nvim": { "branch": "main", "commit": "29b292bdc58b76a6c8f294c961a8bf92c5a6ebd6" } From c869934f1ab6cd1bd7caa55bdeea1a87c2a50450 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Sat, 3 May 2025 23:22:01 +0300 Subject: [PATCH 62/63] chore: update plugins --- lazy-lock.json | 90 +++++++++++++++++++++++++------------------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 727f6c7dc62..4d79fb9c9c6 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,55 +1,55 @@ { - "LuaSnip": { "branch": "master", "commit": "e808bee352d1a6fcf902ca1a71cee76e60e24071" }, - "bufferline.nvim": { "branch": "main", "commit": "2e3c8cc5a57ddd32f1edd2ffd2ccb10c09421f6c" }, - "catppuccin": { "branch": "main", "commit": "63685e1562ef53873c9764b483d7ac5c7a608922" }, - "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "LuaSnip": { "branch": "master", "commit": "0d469d83bf4fd90e3420998159012859d694152b" }, + "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, + "catppuccin": { "branch": "main", "commit": "b7bbdf93b42866f166af98d39a2563eedb7cabac" }, + "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" }, "cmp-nvim-lsp-document-symbol": { "branch": "main", "commit": "f94f7ba948e32cd302caba1c2ca3f7c697fb4fcf" }, "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" }, - "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "conform.nvim": { "branch": "master", "commit": "1a99fdc1d3aa9ccdf3021e67982a679a8c5c740c" }, - "friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" }, - "gitsigns.nvim": { "branch": "main", "commit": "1ef74b546732f185d0f806860fa5404df7614f28" }, - "indent-blankline.nvim": { "branch": "master", "commit": "18603eb949eba08300799f64027af11ef922283f" }, - "lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" }, - "lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" }, - "lazygit.nvim": { "branch": "main", "commit": "2432b447483f42ff2e18b2d392cb2bb27e495c08" }, - "lspkind.nvim": { "branch": "master", "commit": "cff4ae321a91ee3473a92ea1a8c637e3a9510aec" }, - "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, + "cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" }, + "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, + "conform.nvim": { "branch": "master", "commit": "372fc521f8421b7830ea6db4d6ea3bae1c77548c" }, + "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, + "gitsigns.nvim": { "branch": "main", "commit": "1796c7cedfe7e5dd20096c5d7b8b753d8f8d22eb" }, + "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, + "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, + "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, + "lazygit.nvim": { "branch": "main", "commit": "b9eae3badab982e71abab96d3ee1d258f0c07961" }, + "lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" }, + "luvit-meta": { "branch": "main", "commit": "1df30b60b1b4aecfebc785aa98943db6c6989716" }, "mason-lock.nvim": { "branch": "main", "commit": "86614f76c3442fba1c5c8d79aa1efcb3ad69de1c" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" }, - "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, - "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, - "mini.nvim": { "branch": "main", "commit": "e50cf9de614500a20e47cfc50e30a100042f91c3" }, - "neo-tree.nvim": { "branch": "main", "commit": "8c75e8a2949cd6cd35525799200a8d34471ee9eb" }, - "noice.nvim": { "branch": "main", "commit": "c1ba80ccf6b3bd8c7fc88fe2e61085131d44ad65" }, - "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, - "nvim-autopairs": { "branch": "master", "commit": "f158dcb865c36f72c92358f87787dab2c272eaf3" }, - "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, - "nvim-lint": { "branch": "master", "commit": "c823e2d0621b5c15aa6b46be4d69b1379bcb8fa6" }, - "nvim-lsp-file-operations": { "branch": "master", "commit": "92a673de7ecaa157dd230d0128def10beb56d103" }, - "nvim-lspconfig": { "branch": "master", "commit": "f4fef355efa3c5d0813512480ee7b2c050b09fe4" }, - "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "1255518cb067e038a4755f5cb3e980f79b6ab89c" }, + "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, + "mini.nvim": { "branch": "main", "commit": "ee23e1abc206efc6d6cce19ec8c0a3da7a897035" }, + "neo-tree.nvim": { "branch": "main", "commit": "1ef260eb4f54515fe121a2267b477efb054d108a" }, + "noice.nvim": { "branch": "main", "commit": "cf758e9df66451889aab56613a21b8673f045ec2" }, + "nui.nvim": { "branch": "main", "commit": "f535005e6ad1016383f24e39559833759453564e" }, + "nvim-autopairs": { "branch": "master", "commit": "4d74e75913832866aa7de35e4202463ddf6efd1b" }, + "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, + "nvim-lint": { "branch": "master", "commit": "9dfb77ef6c5092a19502883c02dc5a02ec648729" }, + "nvim-lsp-file-operations": { "branch": "master", "commit": "9744b738183a5adca0f916527922078a965515ed" }, + "nvim-lspconfig": { "branch": "master", "commit": "1b801f68d09e70e59e6dd967b663b6d84ee3e87d" }, + "nvim-notify": { "branch": "master", "commit": "b5825cf9ee881dd8e43309c93374ed5b87b7a896" }, "nvim-tmux-navigation": { "branch": "main", "commit": "4898c98702954439233fdaf764c39636681e2861" }, - "nvim-treesitter": { "branch": "master", "commit": "929ca9c76ee20bb27cffbde4ee90583b6c54d616" }, - "nvim-treesitter-context": { "branch": "master", "commit": "7f7eeaa99e5a9beab518f502292871ae5f20de6f" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "bf8d2ad35d1d1a687eae6c065c3d524f7ab61b23" }, - "nvim-ts-context-commentstring": { "branch": "main", "commit": "375c2d86cee6674afd75b4f727ce3a80065552f7" }, - "nvim-web-devicons": { "branch": "master", "commit": "26220156aafb198b2de6a4cf80c1b120a3768da0" }, - "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, - "render-markdown.nvim": { "branch": "main", "commit": "a0777ec640acbf455da32aa856922d4187c5c27f" }, - "supermaven-nvim": { "branch": "main", "commit": "3da044bbc23a354e9cb17602ed2d5ca8528173bb" }, - "telescope-file-browser.nvim": { "branch": "master", "commit": "3b8a1e17187cfeedb31decbd625da62398a8ff34" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, + "nvim-treesitter": { "branch": "master", "commit": "94ea4f436d2b59c80f02e293466c374584f03b8c" }, + "nvim-treesitter-context": { "branch": "master", "commit": "6daca3ad780f045550b820f262002f35175a6c04" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "ed373482db797bbf71bdff37a15c7555a84dce47" }, + "nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" }, + "nvim-web-devicons": { "branch": "master", "commit": "2c2b4eafce6cdd0cb165036faa17396eff18f847" }, + "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, + "render-markdown.nvim": { "branch": "main", "commit": "a2c2493c21cf61e5554ee8bc83da75bd695921da" }, + "supermaven-nvim": { "branch": "main", "commit": "07d20fce48a5629686aefb0a7cd4b25e33947d50" }, + "telescope-file-browser.nvim": { "branch": "master", "commit": "626998e5c1b71c130d8bc6cf7abb6709b98287bb" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, - "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, - "trouble.nvim": { "branch": "main", "commit": "40c5317a6e90fe3393f07b0fee580d9e93a216b4" }, - "typescript-tools.nvim": { "branch": "master", "commit": "f8c2e0b36b651c85f52ad5c5373ff8b07adc15a7" }, + "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, + "trouble.nvim": { "branch": "main", "commit": "748ca2789044607f19786b1d837044544c55e80a" }, + "typescript-tools.nvim": { "branch": "master", "commit": "3c501d7c7f79457932a8750a2a1476a004c5c1a9" }, "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, - "virt-column.nvim": { "branch": "master", "commit": "b62b4ef0774d19452d4ed18e473e824c7a756f2f" }, - "which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" }, - "zen-mode.nvim": { "branch": "main", "commit": "29b292bdc58b76a6c8f294c961a8bf92c5a6ebd6" } + "virt-column.nvim": { "branch": "master", "commit": "b87e3e0864211a32724a2ebf3be37e24e9e2fa99" }, + "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }, + "zen-mode.nvim": { "branch": "main", "commit": "863f150ca321b3dd8aa1a2b69b5f411a220e144f" } } From 598b47cd5a0548bf1c73e0cdb6dcf2e1be852a73 Mon Sep 17 00:00:00 2001 From: Mohammed Alrefai Date: Sat, 3 May 2025 23:55:25 +0300 Subject: [PATCH 63/63] chore: update mason lock file --- mason-lock.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mason-lock.json b/mason-lock.json index 5f29db3a3d7..7642710a956 100644 --- a/mason-lock.json +++ b/mason-lock.json @@ -1,13 +1,13 @@ { - "astro-language-server": "2.14.2", - "bash-language-server": "5.4.0", - "deno": "v1.46.3", - "dprint": "0.47.2", + "astro-language-server": "2.15.4", + "bash-language-server": "5.6.0", + "deno": "v2.3.1", + "dprint": "0.49.1", "eslint-lsp": "4.10.0", "graphql-language-service-cli": "3.5.0", "html-lsp": "4.10.0", - "lua-language-server": "3.10.6", - "stylua": "v0.20.0", - "unocss-language-server": "0.1.5", - "yaml-language-server": "1.15.0" + "lua-language-server": "3.14.0", + "stylua": "v2.1.0", + "unocss-language-server": "0.1.7", + "yaml-language-server": "1.18.0" } \ No newline at end of file