From 8e465550110bec414e926e489a58c4665ddc1931 Mon Sep 17 00:00:00 2001 From: ayamir Date: Thu, 4 May 2023 16:32:10 +0800 Subject: [PATCH 01/29] feat: add setting option for inline_diagnostic_virtual_text. --- lua/core/settings.lua | 4 ++++ lua/modules/configs/completion/lsp.lua | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/lua/core/settings.lua b/lua/core/settings.lua index a1250fd0e..d6c30da8a 100644 --- a/lua/core/settings.lua +++ b/lua/core/settings.lua @@ -90,4 +90,8 @@ settings["null_ls_deps"] = { "vint", } +-- Set the inline_diagnostic_virtual_text to false if they are annoying for you +---@type boolean +settings["inline_diagnostic_virtual_text"] = true + return settings diff --git a/lua/modules/configs/completion/lsp.lua b/lua/modules/configs/completion/lsp.lua index 4fa02a7b0..d3bc425dc 100644 --- a/lua/modules/configs/completion/lsp.lua +++ b/lua/modules/configs/completion/lsp.lua @@ -37,6 +37,14 @@ return function() local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities) + vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, { + signs = true, + underline = true, + virtual_text = require("core.settings").inline_diagnostic_virtual_text, + -- set update_in_insert to false bacause it was enabled by lspsaga + update_in_insert = false, + }) + local opts = { on_attach = function() require("lsp_signature").on_attach({ From fa5fb5cc10db4c8e15d8bbac0fa5501a7dc75437 Mon Sep 17 00:00:00 2001 From: Saafo Date: Thu, 4 May 2023 16:45:51 +0800 Subject: [PATCH 02/29] feat(nvim-treesitter): add nvim-treesitter-context Change-Id: I7e06be70de44f1a9962187d6358810f9d7d27fdb --- lua/modules/plugins/editor.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/modules/plugins/editor.lua b/lua/modules/plugins/editor.lua index 88fe34965..4172e5ab2 100644 --- a/lua/modules/plugins/editor.lua +++ b/lua/modules/plugins/editor.lua @@ -82,6 +82,7 @@ editor["nvim-treesitter/nvim-treesitter"] = { config = require("editor.treesitter"), dependencies = { { "nvim-treesitter/nvim-treesitter-textobjects" }, + { "nvim-treesitter/nvim-treesitter-context" }, { "mrjones2014/nvim-ts-rainbow" }, { "JoosepAlviste/nvim-ts-context-commentstring" }, { "mfussenegger/nvim-treehopper" }, From e09dabc952b61b7dc8505ef01be41616a1a67931 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 5 May 2023 01:52:34 +0000 Subject: [PATCH 03/29] chore(lockfile): auto update lazy-lock.json --- lazy-lock.json | 49 +++++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 010fe1ae4..a93694d19 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,14 +1,14 @@ { - "Comment.nvim": { "branch": "master", "commit": "38d3b7eb553872d8866f14a0dd4fe84126068fce" }, - "LuaSnip": { "branch": "master", "commit": "e77fa9ad0b1f4fc6cddf54e51047e17e90c7d7ed" }, + "Comment.nvim": { "branch": "master", "commit": "e1fe53117aab24c378d5e6deaad786789c360123" }, + "LuaSnip": { "branch": "master", "commit": "a46ab6f8bce6bbddd8ce3e287e1a517c1f5e348e" }, "accelerated-jk.nvim": { "branch": "main", "commit": "8fb5dad4ccc1811766cebf16b544038aeeb7806f" }, - "alpha-nvim": { "branch": "main", "commit": "87c204040e3f5d4c1c95067b35905d8f8a2f2545" }, + "alpha-nvim": { "branch": "main", "commit": "447b821d22b0c1e80494638f84cb00ff696f4ef6" }, "auto-session": { "branch": "main", "commit": "9752e6b11327329ed3ba5ec2bec36abe4535a8e0" }, "autoclose.nvim": { "branch": "main", "commit": "c4db42ffc0edbd244502be951c142df0c8a7e582" }, - "better-escape.nvim": { "branch": "master", "commit": "426d29708064d5b1bfbb040424651c92af1f3f64" }, + "better-escape.nvim": { "branch": "master", "commit": "7031dc734add47bb71c010e0551829fa5799375f" }, "bigfile.nvim": { "branch": "main", "commit": "c1bad34ce742b4f360b67ca23c873fef998240fc" }, - "bufferline.nvim": { "branch": "main", "commit": "a4bd44523316928a7c4a5c09a3407d02c30b6027" }, - "catppuccin": { "branch": "main", "commit": "94d10b558e679447064fe72ddf764b6fea3f0c85" }, + "bufferline.nvim": { "branch": "main", "commit": "41660189da6951d14436147dff30ed7f0d12ed01" }, + "catppuccin": { "branch": "main", "commit": "a7e279d6e019f35dd042670f00748b602fff5568" }, "clever-f.vim": { "branch": "master", "commit": "6a3ac5e3688598af9411ab741737f98c47370c22" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-latex-symbols": { "branch": "main", "commit": "165fb66afdbd016eaa1570e41672c4c557b57124" }, @@ -21,45 +21,46 @@ "cmp-under-comparator": { "branch": "master", "commit": "6857f10272c3cfe930cece2afa2406e1385bfef8" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, "copilot-cmp": { "branch": "master", "commit": "ad4c097bf76c544fce95a2cb6b02f245cb18a6bb" }, - "copilot.lua": { "branch": "master", "commit": "19c1c945553918d683a001e697faad933c41bb5d" }, - "crates.nvim": { "branch": "main", "commit": "5a529df8fe3504ccf1ca9526e196f48b2f723c72" }, - "csv.vim": { "branch": "master", "commit": "0f6900bf1d0f2ccdbe59ed246db4a82e5cc16e78" }, + "copilot.lua": { "branch": "master", "commit": "21d8ef6ce4ac931ebfa3fc3c0afb65bb05db9fc3" }, + "crates.nvim": { "branch": "main", "commit": "bb5ce73e9c41865e22329da118d91a565089e4d7" }, + "csv.vim": { "branch": "master", "commit": "15ff93edf5b26c466affbb356e0696b7d6a3b499" }, "diffview.nvim": { "branch": "main", "commit": "8c1702470fd5186cb401b21f9bf8bdfad6d5cc87" }, "edge": { "branch": "master", "commit": "358cb6688ac577470a4eafcb53bdd63899dfc937" }, "fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" }, - "friendly-snippets": { "branch": "main", "commit": "b2ce8aba4d50df6288134c7e5cc2affcb3300dbf" }, + "friendly-snippets": { "branch": "main", "commit": "10f741908e56ce47cf6b3440e3f04b4fdc0da2f2" }, "fzy-lua-native": { "branch": "master", "commit": "45148b3f70d244e8b8b5db60df447a2b7ac2de9d" }, "gitsigns.nvim": { "branch": "main", "commit": "e5edefd9976039f5352e0c900f35206770b33a2d" }, "hop.nvim": { "branch": "v2", "commit": "90db1b2c61b820e230599a04fedcd2679e64bd07" }, "indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" }, - "lazy.nvim": { "branch": "main", "commit": "bb5cc9ef3bbb17541929b745f74551c900188099" }, - "lsp_signature.nvim": { "branch": "master", "commit": "9616a1adde75a108495dd97ec8bb46f908d552e7" }, - "lspsaga.nvim": { "branch": "main", "commit": "349b3d412d4d277a7b2971352319a463952623c4" }, - "lualine.nvim": { "branch": "master", "commit": "84ffb80e452d95e2c46fa29a98ea11a240f7843e" }, + "lazy.nvim": { "branch": "main", "commit": "ceb413678dfcf3d5455208959185e3db1f7892c7" }, + "lsp_signature.nvim": { "branch": "master", "commit": "7a26ebaa7e36aa2aefa6c1994b2b866c96de32e6" }, + "lspsaga.nvim": { "branch": "main", "commit": "f65d03cad9f3ab6c2c83ac0fbe2cda50731eb79b" }, + "lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" }, "markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "43f2ddf0b5f544d9bb20e24b8ff76b79f2a07ab0" }, - "mason-null-ls.nvim": { "branch": "main", "commit": "cfbd83909cbc56e2f07cb3f8a03157e069c5c91c" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "cec0e6dd534ade486b5eeb59ebcfa8d51c3e8c5e" }, + "mason-null-ls.nvim": { "branch": "main", "commit": "54d702020bf94e4eefd357f0b738317af30217eb" }, "mason.nvim": { "branch": "main", "commit": "057ac5ca159c83e302a55bd839a96ff1ea2396db" }, "neodim": { "branch": "master", "commit": "6506918f1b0eee46f87e4ae83bedf0b23a448adb" }, "neoscroll.nvim": { "branch": "master", "commit": "d7601c26c8a183fa8994ed339e70c2d841253e93" }, "nord.nvim": { "branch": "master", "commit": "fab04b2dd4b64f4b1763b9250a8824d0b5194b8f" }, "null-ls.nvim": { "branch": "main", "commit": "33b853a3933eed3137cd055aac4e539e69832ad0" }, "nvim-bufdel": { "branch": "main", "commit": "96c4f7ab053ddab0025bebe5f7c71e4795430e47" }, - "nvim-cmp": { "branch": "main", "commit": "11102d3db12c7f8b35265ad0e17a21511e5b1e68" }, + "nvim-cmp": { "branch": "main", "commit": "0f47dcaf7e39d64cd067e090e6f2eda6326e7366" }, "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, "nvim-dap": { "branch": "master", "commit": "6cedcb527e264c8f25e86afa8dae74c6692dee51" }, - "nvim-dap-ui": { "branch": "master", "commit": "286f682f366fbc652b38dff893569374e9433dd3" }, - "nvim-lspconfig": { "branch": "master", "commit": "427378a03ffc1e1bc023275583a49b1993e524d0" }, + "nvim-dap-ui": { "branch": "master", "commit": "749bfe12d1447703899fa823c1c075fbe2d42c24" }, + "nvim-lspconfig": { "branch": "master", "commit": "3bd4ca412982afa6f88bb7ef890660cee51c3e58" }, "nvim-notify": { "branch": "master", "commit": "159c6cf1be25a933f35e97499314c9faab55c98f" }, "nvim-scrollview": { "branch": "main", "commit": "c0699da2f00976943d39c7b32c015c768f68e74b" }, - "nvim-tree.lua": { "branch": "master", "commit": "0df384b6c0fa62ff1333634d56ee4df0be5d34e1" }, + "nvim-tree.lua": { "branch": "master", "commit": "53295de04d265fba695ec5a21912bdf36647dbad" }, "nvim-treehopper": { "branch": "master", "commit": "5a28bff46c05d28bdb4bcaef67e046eb915a9390" }, - "nvim-treesitter": { "branch": "master", "commit": "54909e8df911bf4c47e51945570d7edb2f31c110" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "85a6f9d1af8b731f09f4031e1f9478d4b40d13ab" }, + "nvim-treesitter": { "branch": "master", "commit": "54741de02c18fae1b33d2b0da36f5ef946712073" }, + "nvim-treesitter-context": { "branch": "master", "commit": "0226dd639712141235d5c9eefde47365d15d0535" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "5632f926833493bf44de3d0c214169a062b068df" }, "nvim-ts-autotag": { "branch": "main", "commit": "40615e96075c743ef47aaf9de966dc348bec6459" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "0bf8fbc2ca8f8cdb6efbd0a9e32740d7a991e4c3" }, "nvim-ts-rainbow": { "branch": "master", "commit": "840039440e012ad798ef31349b93a5d4365023ff" }, - "nvim-web-devicons": { "branch": "master", "commit": "10940542e62087707b3dc0b4157d98c427504eb0" }, + "nvim-web-devicons": { "branch": "master", "commit": "b34362b20a4942b3245f958e73ebe1b09b020ad1" }, "paint.nvim": { "branch": "main", "commit": "6ce64212804f425073c61ab0d9c2b034f0435260" }, "plenary.nvim": { "branch": "master", "commit": "9ac3e9541bbabd9d73663d757e4fe48a675bb054" }, "project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" }, @@ -84,6 +85,6 @@ "vim-go": { "branch": "master", "commit": "a494378f6c106a97e39c62b493c14476f9f7de4f" }, "vim-illuminate": { "branch": "master", "commit": "a2907275a6899c570d16e95b9db5fd921c167502" }, "vim-matchup": { "branch": "master", "commit": "a8d1b8e635d666b19effa842f331ffa32beb57c2" }, - "which-key.nvim": { "branch": "main", "commit": "4acffc92953a90a790603bfdab7c92319ab167b1" }, + "which-key.nvim": { "branch": "main", "commit": "af8f26bfbb61b5f722c9fbc72b296dc9db0bcfdc" }, "wilder.nvim": { "branch": "master", "commit": "679f348dc90d80ff9ba0e7c470c40a4d038dcecf" } } \ No newline at end of file From 0108ed6496885bb28372c17ff6caddf4ef01a00c Mon Sep 17 00:00:00 2001 From: ayamir Date: Sat, 6 May 2023 12:38:45 +0800 Subject: [PATCH 04/29] chore(settings): replace `pright` with `jedi_language_server`. --- lua/core/settings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/settings.lua b/lua/core/settings.lua index d6c30da8a..1f07a2261 100644 --- a/lua/core/settings.lua +++ b/lua/core/settings.lua @@ -71,7 +71,7 @@ settings["lsp_deps"] = { "html", "jsonls", "lua_ls", - "pyright", + "jedi_language_server", -- "gopls", } From 9d3e22d9e1a34dce940742ec1f858d178978dafe Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 7 May 2023 01:59:28 +0000 Subject: [PATCH 05/29] chore(lockfile): auto update lazy-lock.json --- lazy-lock.json | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index a93694d19..1b3b01c94 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,14 +1,14 @@ { "Comment.nvim": { "branch": "master", "commit": "e1fe53117aab24c378d5e6deaad786789c360123" }, - "LuaSnip": { "branch": "master", "commit": "a46ab6f8bce6bbddd8ce3e287e1a517c1f5e348e" }, + "LuaSnip": { "branch": "master", "commit": "b4bc24c4925aeb05fd47d2ee9b24b7f73f5d7e32" }, "accelerated-jk.nvim": { "branch": "main", "commit": "8fb5dad4ccc1811766cebf16b544038aeeb7806f" }, - "alpha-nvim": { "branch": "main", "commit": "447b821d22b0c1e80494638f84cb00ff696f4ef6" }, - "auto-session": { "branch": "main", "commit": "9752e6b11327329ed3ba5ec2bec36abe4535a8e0" }, + "alpha-nvim": { "branch": "main", "commit": "89eaa18a472be680539dee5977e2255f4dbd0738" }, + "auto-session": { "branch": "main", "commit": "21033c6815f249a7839c3a85fc8a6b44d74925c9" }, "autoclose.nvim": { "branch": "main", "commit": "c4db42ffc0edbd244502be951c142df0c8a7e582" }, "better-escape.nvim": { "branch": "master", "commit": "7031dc734add47bb71c010e0551829fa5799375f" }, "bigfile.nvim": { "branch": "main", "commit": "c1bad34ce742b4f360b67ca23c873fef998240fc" }, "bufferline.nvim": { "branch": "main", "commit": "41660189da6951d14436147dff30ed7f0d12ed01" }, - "catppuccin": { "branch": "main", "commit": "a7e279d6e019f35dd042670f00748b602fff5568" }, + "catppuccin": { "branch": "main", "commit": "af8390217cb0b3b714dfd30ebd09264cf33a37be" }, "clever-f.vim": { "branch": "master", "commit": "6a3ac5e3688598af9411ab741737f98c47370c22" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-latex-symbols": { "branch": "main", "commit": "165fb66afdbd016eaa1570e41672c4c557b57124" }, @@ -21,7 +21,7 @@ "cmp-under-comparator": { "branch": "master", "commit": "6857f10272c3cfe930cece2afa2406e1385bfef8" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, "copilot-cmp": { "branch": "master", "commit": "ad4c097bf76c544fce95a2cb6b02f245cb18a6bb" }, - "copilot.lua": { "branch": "master", "commit": "21d8ef6ce4ac931ebfa3fc3c0afb65bb05db9fc3" }, + "copilot.lua": { "branch": "master", "commit": "8b0fd23747ef82154ef9f919c75623156465cc89" }, "crates.nvim": { "branch": "main", "commit": "bb5ce73e9c41865e22329da118d91a565089e4d7" }, "csv.vim": { "branch": "master", "commit": "15ff93edf5b26c466affbb356e0696b7d6a3b499" }, "diffview.nvim": { "branch": "main", "commit": "8c1702470fd5186cb401b21f9bf8bdfad6d5cc87" }, @@ -32,9 +32,9 @@ "gitsigns.nvim": { "branch": "main", "commit": "e5edefd9976039f5352e0c900f35206770b33a2d" }, "hop.nvim": { "branch": "v2", "commit": "90db1b2c61b820e230599a04fedcd2679e64bd07" }, "indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" }, - "lazy.nvim": { "branch": "main", "commit": "ceb413678dfcf3d5455208959185e3db1f7892c7" }, + "lazy.nvim": { "branch": "main", "commit": "83a625f5c884a3ceee821ce54a812c8321ecba31" }, "lsp_signature.nvim": { "branch": "master", "commit": "7a26ebaa7e36aa2aefa6c1994b2b866c96de32e6" }, - "lspsaga.nvim": { "branch": "main", "commit": "f65d03cad9f3ab6c2c83ac0fbe2cda50731eb79b" }, + "lspsaga.nvim": { "branch": "main", "commit": "76696bed4397c3b58563c246dc1f7856ed4af023" }, "lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" }, "markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "cec0e6dd534ade486b5eeb59ebcfa8d51c3e8c5e" }, @@ -43,30 +43,30 @@ "neodim": { "branch": "master", "commit": "6506918f1b0eee46f87e4ae83bedf0b23a448adb" }, "neoscroll.nvim": { "branch": "master", "commit": "d7601c26c8a183fa8994ed339e70c2d841253e93" }, "nord.nvim": { "branch": "master", "commit": "fab04b2dd4b64f4b1763b9250a8824d0b5194b8f" }, - "null-ls.nvim": { "branch": "main", "commit": "33b853a3933eed3137cd055aac4e539e69832ad0" }, + "null-ls.nvim": { "branch": "main", "commit": "71797bb303ac99a4435592e15068f127970513d7" }, "nvim-bufdel": { "branch": "main", "commit": "96c4f7ab053ddab0025bebe5f7c71e4795430e47" }, - "nvim-cmp": { "branch": "main", "commit": "0f47dcaf7e39d64cd067e090e6f2eda6326e7366" }, + "nvim-cmp": { "branch": "main", "commit": "1cad30fcffa282c0a9199c524c821eadc24bf939" }, "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, "nvim-dap": { "branch": "master", "commit": "6cedcb527e264c8f25e86afa8dae74c6692dee51" }, "nvim-dap-ui": { "branch": "master", "commit": "749bfe12d1447703899fa823c1c075fbe2d42c24" }, - "nvim-lspconfig": { "branch": "master", "commit": "3bd4ca412982afa6f88bb7ef890660cee51c3e58" }, + "nvim-lspconfig": { "branch": "master", "commit": "f01429048950195bcab6c430b430fc44b2d9e05a" }, "nvim-notify": { "branch": "master", "commit": "159c6cf1be25a933f35e97499314c9faab55c98f" }, - "nvim-scrollview": { "branch": "main", "commit": "c0699da2f00976943d39c7b32c015c768f68e74b" }, - "nvim-tree.lua": { "branch": "master", "commit": "53295de04d265fba695ec5a21912bdf36647dbad" }, + "nvim-scrollview": { "branch": "main", "commit": "4a04039b80c270f6bd2075935cd3c7943f6ad140" }, + "nvim-tree.lua": { "branch": "master", "commit": "270c95556cad96d18ca547d86ae65927334b108b" }, "nvim-treehopper": { "branch": "master", "commit": "5a28bff46c05d28bdb4bcaef67e046eb915a9390" }, - "nvim-treesitter": { "branch": "master", "commit": "54741de02c18fae1b33d2b0da36f5ef946712073" }, - "nvim-treesitter-context": { "branch": "master", "commit": "0226dd639712141235d5c9eefde47365d15d0535" }, + "nvim-treesitter": { "branch": "master", "commit": "12453e0e3d2e82a4ae813f1540315c7cf2df2363" }, + "nvim-treesitter-context": { "branch": "master", "commit": "922ba682fd08986ef40265099b4b92607d8088af" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "5632f926833493bf44de3d0c214169a062b068df" }, "nvim-ts-autotag": { "branch": "main", "commit": "40615e96075c743ef47aaf9de966dc348bec6459" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "0bf8fbc2ca8f8cdb6efbd0a9e32740d7a991e4c3" }, "nvim-ts-rainbow": { "branch": "master", "commit": "840039440e012ad798ef31349b93a5d4365023ff" }, - "nvim-web-devicons": { "branch": "master", "commit": "b34362b20a4942b3245f958e73ebe1b09b020ad1" }, + "nvim-web-devicons": { "branch": "master", "commit": "986875b7364095d6535e28bd4aac3a9357e91bbe" }, "paint.nvim": { "branch": "main", "commit": "6ce64212804f425073c61ab0d9c2b034f0435260" }, "plenary.nvim": { "branch": "master", "commit": "9ac3e9541bbabd9d73663d757e4fe48a675bb054" }, "project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" }, "rust-tools.nvim": { "branch": "master", "commit": "71d2cf67b5ed120a0e31b2c8adb210dd2834242f" }, "smartyank.nvim": { "branch": "master", "commit": "7e3905578f646503525b2f7018b8afd17861018c" }, - "sniprun": { "branch": "master", "commit": "7afcd7797e2d265732c718264f95e093bae9acfe" }, + "sniprun": { "branch": "master", "commit": "ba15b95e3f9e18ad787f03d36cc080d4d403e3ac" }, "specs.nvim": { "branch": "main", "commit": "2743e412bbe21c9d73954c403d01e8de7377890d" }, "sqlite.lua": { "branch": "master", "commit": "b7e28c8463254c46a8e61c52d27d6a2040492fc3" }, "suda.vim": { "branch": "master", "commit": "08abd39dfe1cee681b8ce3e7321da5fa03e045c1" }, @@ -84,7 +84,7 @@ "vim-fugitive": { "branch": "master", "commit": "5f0d280b517cacb16f59316659966c7ca5e2bea2" }, "vim-go": { "branch": "master", "commit": "a494378f6c106a97e39c62b493c14476f9f7de4f" }, "vim-illuminate": { "branch": "master", "commit": "a2907275a6899c570d16e95b9db5fd921c167502" }, - "vim-matchup": { "branch": "master", "commit": "a8d1b8e635d666b19effa842f331ffa32beb57c2" }, + "vim-matchup": { "branch": "master", "commit": "6c8909b682803d8c3a054259079f158a73a0e30f" }, "which-key.nvim": { "branch": "main", "commit": "af8f26bfbb61b5f722c9fbc72b296dc9db0bcfdc" }, "wilder.nvim": { "branch": "master", "commit": "679f348dc90d80ff9ba0e7c470c40a4d038dcecf" } } \ No newline at end of file From 56538b791d3354dd6a5af257be0bb3eaf52765bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B7=E9=85=94=E9=96=91=E5=90=9F?= <50296129+Jint-lzxy@users.noreply.github.com> Date: Sun, 7 May 2023 12:24:48 +0800 Subject: [PATCH 06/29] fix(icons)!: update icon codepoints (#447) --- dots.tutor | 4 +- init.lua | 17 ++++ lua/core/settings.lua | 8 +- lua/modules/configs/completion/lsp.lua | 2 +- lua/modules/configs/tool/nvim-tree.lua | 8 +- lua/modules/configs/ui/alpha.lua | 8 +- lua/modules/configs/ui/lualine.lua | 1 + lua/modules/utils/icons.lua | 117 +++++++++++++------------ 8 files changed, 92 insertions(+), 73 deletions(-) diff --git a/dots.tutor b/dots.tutor index 3f899cc2f..3e14150f7 100644 --- a/dots.tutor +++ b/dots.tutor @@ -48,9 +48,9 @@ Back to the left window, the status line is showed at the bottom of the window. You will see different content under different conditions. It will looks like this if you switch to the right window and move cursor to the second line. ------------------------------------------------------------------------------- -|Normal|main|  autocmd |~/.config/nvim|utf-8|LF|1%|2:1| +|Normal|main| 󰅩 autocmd |~/.config/nvim|utf-8|LF|1%|2:1| ------------------------------------------------------------------------------- -" autocmd" indicates this line has a variable named "autocmd". So this part of +"󰅩 autocmd" indicates this line has a variable named "autocmd". So this part of status line will show you the context of your cursor position. This feature is based on lsp, so it is disabled if corresponding lsp is not attach to current buffer. diff --git a/init.lua b/init.lua index 15445091f..66fc38337 100644 --- a/init.lua +++ b/init.lua @@ -1,3 +1,20 @@ if not vim.g.vscode then require("core") + + -- Release note + vim.schedule(function() + vim.notify_once( + [[ +We've released version v3.0.0! +Visit https://github.com/ayamir/nvimdots/releases to see the release notes. +If you have icons that can't be rendered correctly (e.g., 𑨩 and � ) or icons with incorrect size, be sure to read this! + +To silence this message, remove it from `init.lua` at the config's root directory. + +To check the glyphs size, make sure the following icons are very close to the crosses but there is no overlap: +XXXXXXXXX +]], + vim.log.levels.WARN + ) + end) end diff --git a/lua/core/settings.lua b/lua/core/settings.lua index 1f07a2261..e6e87050e 100644 --- a/lua/core/settings.lua +++ b/lua/core/settings.lua @@ -9,6 +9,10 @@ settings["use_ssh"] = true ---@type boolean settings["format_on_save"] = true +-- Set it to false if diagnostics virtual text is annoying for you +---@type boolean +settings["diagnostics_virtual_text"] = true + -- Set the format disabled directories here, files under these dirs won't be formatted on save. ---@type string[] settings["format_disabled_dirs"] = { @@ -90,8 +94,4 @@ settings["null_ls_deps"] = { "vint", } --- Set the inline_diagnostic_virtual_text to false if they are annoying for you ----@type boolean -settings["inline_diagnostic_virtual_text"] = true - return settings diff --git a/lua/modules/configs/completion/lsp.lua b/lua/modules/configs/completion/lsp.lua index d3bc425dc..ba36d8cdc 100644 --- a/lua/modules/configs/completion/lsp.lua +++ b/lua/modules/configs/completion/lsp.lua @@ -40,7 +40,7 @@ return function() vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, { signs = true, underline = true, - virtual_text = require("core.settings").inline_diagnostic_virtual_text, + virtual_text = require("core.settings").diagnostics_virtual_text, -- set update_in_insert to false bacause it was enabled by lspsaga update_in_insert = false, }) diff --git a/lua/modules/configs/tool/nvim-tree.lua b/lua/modules/configs/tool/nvim-tree.lua index 2979c4a78..d903ee868 100644 --- a/lua/modules/configs/tool/nvim-tree.lua +++ b/lua/modules/configs/tool/nvim-tree.lua @@ -66,17 +66,17 @@ return function() git = true, }, padding = " ", - symlink_arrow = "  ", + symlink_arrow = " 󰁔 ", glyphs = { default = icons.documents.Default, -- symlink = icons.documents.Symlink, -- bookmark = icons.ui.Bookmark, git = { unstaged = icons.git.Mod_alt, - staged = icons.git.Add, -- + staged = icons.git.Add, --󰄬 unmerged = icons.git.Unmerged, - renamed = icons.git.Rename, -- - untracked = icons.git.Untracked, -- "ﲉ" + renamed = icons.git.Rename, --󰁔 + untracked = icons.git.Untracked, -- "󰞋" deleted = icons.git.Remove, -- ignored = icons.git.Ignore, --◌ }, diff --git a/lua/modules/configs/ui/alpha.lua b/lua/modules/configs/ui/alpha.lua index aad83724d..372213b14 100644 --- a/lua/modules/configs/ui/alpha.lua +++ b/lua/modules/configs/ui/alpha.lua @@ -77,7 +77,7 @@ return function() require("telescope").extensions.frecency.frecency() end, }), - button("space f e", " File history", leader, nil, { + button("space f e", "󰋚 File history", leader, nil, { noremap = true, silent = true, nowait = true, @@ -93,7 +93,7 @@ return function() require("telescope").extensions.projects.projects({}) end, }), - button("space f f", " File find", leader, nil, { + button("space f f", "󰈞 File find", leader, nil, { noremap = true, silent = true, nowait = true, @@ -124,13 +124,13 @@ return function() local stats = require("lazy").stats() local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100) return "  Have Fun with neovim" - .. "  v" + .. " 󰀨 v" .. vim.version().major .. "." .. vim.version().minor .. "." .. vim.version().patch - .. "  " + .. " 󰂖 " .. stats.count .. " plugins in " .. ms diff --git a/lua/modules/configs/ui/lualine.lua b/lua/modules/configs/ui/lualine.lua index 6d84339ae..0d6a3096c 100644 --- a/lua/modules/configs/ui/lualine.lua +++ b/lua/modules/configs/ui/lualine.lua @@ -122,6 +122,7 @@ return function() error = icons.diagnostics.Error, warn = icons.diagnostics.Warning, info = icons.diagnostics.Information, + hint = icons.diagnostics.Hint_alt, }, }, { get_cwd }, diff --git a/lua/modules/utils/icons.lua b/lua/modules/utils/icons.lua index 3d5703e67..365143e4f 100644 --- a/lua/modules/utils/icons.lua +++ b/lua/modules/utils/icons.lua @@ -2,34 +2,34 @@ local icons = {} local data = { kind = { - Class = "ﴯ", - Color = "", - Constant = "", + Class = "󰠱", + Color = "󰏘", + Constant = "󰏿", Constructor = "", Enum = "", EnumMember = "", Event = "", - Field = "", - File = "", - Folder = "", - Function = "", + Field = "󰇽", + File = "󰈙", + Folder = "󰉋", + Function = "󰊕", Interface = "", - Keyword = "", - Method = "", + Keyword = "󰌋", + Method = "󰆧", Module = "", - Namespace = "", + Namespace = "󰌗", Number = "", - Operator = "", + Operator = "󰆕", Package = "", - Property = "ﰠ", + Property = "󰜢", Reference = "", Snippet = "", Struct = "", - Text = "", - TypeParameter = "", - Unit = "", + Text = "󰉿", + TypeParameter = "󰅲", Undefined = "", - Value = "", + Unit = "", + Value = "󰎠", Variable = "", -- ccls-specific icons. TypeAlias = "", @@ -38,18 +38,18 @@ local data = { Macro = "", }, type = { - Array = "", + Array = "󰅪", Boolean = "", - Null = "ﳠ", + Null = "󰟢", Number = "", - Object = "", - String = "", + Object = "󰅩", + String = "󰉿", }, documents = { Default = "", File = "", Files = "", - FileTree = "פּ", + FileTree = "󰙅", Import = "", Symlink = "", }, @@ -57,15 +57,15 @@ local data = { Add = "", Branch = "", Diff = "", - Git = "", + Git = "󰊢", Ignore = "", Mod = "M", Mod_alt = "", Remove = "", Rename = "", Repo = "", - Unmerged = "שׂ", - Untracked = "ﲉ", + Unmerged = "󰘬", + Untracked = "󰞋", Unstaged = "", Staged = "", Conflict = "", @@ -75,55 +75,55 @@ local data = { ArrowOpen = "", BigCircle = "", BigUnfilledCircle = "", - BookMark = "", + BookMark = "󰃃", Bug = "", Calendar = "", - Check = "", + Check = "󰄳", ChevronRight = "", Circle = "", - Close = "", + Close = "󰅖", Close_alt = "", CloudDownload = "", - Comment = "", - CodeAction = "", + Comment = "󰅺", + CodeAction = "󰌵", Dashboard = "", - Emoji = "", + Emoji = "󰱫", EmptyFolder = "", EmptyFolderOpen = "", - File = "", + File = "󰈤", Fire = "", Folder = "", FolderOpen = "", Gear = "", - History = "", - Incoming = "", + History = "󰄉", + Incoming = "󰏷", Indicator = "", Keyboard = "", Left = "", List = "", Square = "", SymlinkFolder = "", - Lock = "", + Lock = "󰍁", Modified = "✥", Modified_alt = "", NewFile = "", Newspaper = "", - Note = "", - Outgoing = "", + Note = "󰍨", + Outgoing = "󰏻", Package = "", - Pencil = "", - Perf = "", + Pencil = "󰏫", + Perf = "󰅒", Play = "", Project = "", Right = "", RootFolderOpened = "", - Search = "", + Search = "󰍉", Separator = "", - DoubleSeparator = "", + DoubleSeparator = "󰄾", SignIn = "", SignOut = "", Sort = "", - Spell = "暈", + Spell = "󰓆", Symlink = "", Table = "", Telescope = "", @@ -133,21 +133,21 @@ local data = { Warning = "", Information = "", Question = "", - Hint = "", + Hint = "󰌵", -- Holo version - Error_alt = "", - Warning_alt = "", + Error_alt = "󰅚", + Warning_alt = "󰀪", Information_alt = "", Question_alt = "", - Hint_alt = "", + Hint_alt = "󰌶", }, misc = { - Campass = "", + Campass = "󰀹", Code = "", - EscapeST = "✺", + EscapeST = "", Gavel = "", - Glass = "", - PyEnv = "", + Glass = "󰂖", + PyEnv = "󰌠", Squirrel = "", Tag = "", Tree = "", @@ -156,7 +156,7 @@ local data = { Vbar = "│", Add = "+", Added = "", - Ghost = "", + Ghost = "󰊠", ManUp = "", Vim = "", }, @@ -164,6 +164,7 @@ local data = { Codeium = "", TabNine = "", Copilot = "", + Copilot_alt = "", -- Add source-specific icons here buffer = "", cmp_tabnine = "", @@ -171,30 +172,30 @@ local data = { copilot = "", copilot_alt = "", latex_symbols = "", - luasnip = "", + luasnip = "󰃐", nvim_lsp = "", nvim_lua = "", orgmode = "", path = "", - spell = "暈", + spell = "󰓆", tmux = "", treesitter = "", undefined = "", }, dap = { - Breakpoint = "", - BreakpointCondition = "ﳁ", + Breakpoint = "󰝥", + BreakpointCondition = "󰟃", BreakpointRejected = "", LogPoint = "", Pause = "", Play = "", RunLast = "↻", StepBack = "", - StepInto = "", - StepOut = "", - StepOver = "", + StepInto = "󰆹", + StepOut = "󰆸", + StepOver = "󰆷", Stopped = "", - Terminate = "ﱢ", + Terminate = "󰝤", }, } From 3a150ef17f93bf3040e124bf47a778f276820be1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 8 May 2023 01:56:05 +0000 Subject: [PATCH 07/29] chore(lockfile): auto update lazy-lock.json --- lazy-lock.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 1b3b01c94..912308423 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -6,9 +6,9 @@ "auto-session": { "branch": "main", "commit": "21033c6815f249a7839c3a85fc8a6b44d74925c9" }, "autoclose.nvim": { "branch": "main", "commit": "c4db42ffc0edbd244502be951c142df0c8a7e582" }, "better-escape.nvim": { "branch": "master", "commit": "7031dc734add47bb71c010e0551829fa5799375f" }, - "bigfile.nvim": { "branch": "main", "commit": "c1bad34ce742b4f360b67ca23c873fef998240fc" }, + "bigfile.nvim": { "branch": "main", "commit": "a34e42616c20bfd52943ed5d6632bb28d22b057e" }, "bufferline.nvim": { "branch": "main", "commit": "41660189da6951d14436147dff30ed7f0d12ed01" }, - "catppuccin": { "branch": "main", "commit": "af8390217cb0b3b714dfd30ebd09264cf33a37be" }, + "catppuccin": { "branch": "main", "commit": "ce06ac2d31e0ec390d308c52809da869c8568812" }, "clever-f.vim": { "branch": "master", "commit": "6a3ac5e3688598af9411ab741737f98c47370c22" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-latex-symbols": { "branch": "main", "commit": "165fb66afdbd016eaa1570e41672c4c557b57124" }, @@ -21,7 +21,7 @@ "cmp-under-comparator": { "branch": "master", "commit": "6857f10272c3cfe930cece2afa2406e1385bfef8" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, "copilot-cmp": { "branch": "master", "commit": "ad4c097bf76c544fce95a2cb6b02f245cb18a6bb" }, - "copilot.lua": { "branch": "master", "commit": "8b0fd23747ef82154ef9f919c75623156465cc89" }, + "copilot.lua": { "branch": "master", "commit": "3bfdf96d5eb7704ece1013ef04d0b0d211d12ee7" }, "crates.nvim": { "branch": "main", "commit": "bb5ce73e9c41865e22329da118d91a565089e4d7" }, "csv.vim": { "branch": "master", "commit": "15ff93edf5b26c466affbb356e0696b7d6a3b499" }, "diffview.nvim": { "branch": "main", "commit": "8c1702470fd5186cb401b21f9bf8bdfad6d5cc87" }, @@ -32,7 +32,7 @@ "gitsigns.nvim": { "branch": "main", "commit": "e5edefd9976039f5352e0c900f35206770b33a2d" }, "hop.nvim": { "branch": "v2", "commit": "90db1b2c61b820e230599a04fedcd2679e64bd07" }, "indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" }, - "lazy.nvim": { "branch": "main", "commit": "83a625f5c884a3ceee821ce54a812c8321ecba31" }, + "lazy.nvim": { "branch": "main", "commit": "9ac19880b677d08f416c5189ffc2dc023084a159" }, "lsp_signature.nvim": { "branch": "master", "commit": "7a26ebaa7e36aa2aefa6c1994b2b866c96de32e6" }, "lspsaga.nvim": { "branch": "main", "commit": "76696bed4397c3b58563c246dc1f7856ed4af023" }, "lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" }, @@ -48,15 +48,15 @@ "nvim-cmp": { "branch": "main", "commit": "1cad30fcffa282c0a9199c524c821eadc24bf939" }, "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, "nvim-dap": { "branch": "master", "commit": "6cedcb527e264c8f25e86afa8dae74c6692dee51" }, - "nvim-dap-ui": { "branch": "master", "commit": "749bfe12d1447703899fa823c1c075fbe2d42c24" }, - "nvim-lspconfig": { "branch": "master", "commit": "f01429048950195bcab6c430b430fc44b2d9e05a" }, + "nvim-dap-ui": { "branch": "master", "commit": "078972d39338a49ec13fc43a44e235cc43189276" }, + "nvim-lspconfig": { "branch": "master", "commit": "5ba7ab746d814413c84ed98c0214c71cd28f130a" }, "nvim-notify": { "branch": "master", "commit": "159c6cf1be25a933f35e97499314c9faab55c98f" }, "nvim-scrollview": { "branch": "main", "commit": "4a04039b80c270f6bd2075935cd3c7943f6ad140" }, "nvim-tree.lua": { "branch": "master", "commit": "270c95556cad96d18ca547d86ae65927334b108b" }, "nvim-treehopper": { "branch": "master", "commit": "5a28bff46c05d28bdb4bcaef67e046eb915a9390" }, - "nvim-treesitter": { "branch": "master", "commit": "12453e0e3d2e82a4ae813f1540315c7cf2df2363" }, - "nvim-treesitter-context": { "branch": "master", "commit": "922ba682fd08986ef40265099b4b92607d8088af" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "5632f926833493bf44de3d0c214169a062b068df" }, + "nvim-treesitter": { "branch": "master", "commit": "b231afbad1569c08f12cac53c6bb8deecdaba013" }, + "nvim-treesitter-context": { "branch": "master", "commit": "c8626af1de45174809fd61f90ade95a2681ee9e2" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "35a60f093fa15a303874975f963428a5cd24e4a0" }, "nvim-ts-autotag": { "branch": "main", "commit": "40615e96075c743ef47aaf9de966dc348bec6459" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "0bf8fbc2ca8f8cdb6efbd0a9e32740d7a991e4c3" }, "nvim-ts-rainbow": { "branch": "master", "commit": "840039440e012ad798ef31349b93a5d4365023ff" }, @@ -76,7 +76,7 @@ "telescope-live-grep-args.nvim": { "branch": "master", "commit": "0f75ea809c46af8997c64f49c52e3c641d887885" }, "telescope-undo.nvim": { "branch": "main", "commit": "231b5ebb4328d2768c830c9a8d1b9c696116848d" }, "telescope-zoxide": { "branch": "main", "commit": "68966349aa1b8e9ade403e18479ecf79447389a7" }, - "telescope.nvim": { "branch": "master", "commit": "713d26b98583b160b50fb827adb751f768238ed3" }, + "telescope.nvim": { "branch": "master", "commit": "d77b37f4520e5fc2cf4c74c12e42ed4b589bd367" }, "toggleterm.nvim": { "branch": "main", "commit": "68fdf851c2b7901a7065ff129b77d3483419ddce" }, "trouble.nvim": { "branch": "main", "commit": "d56bfc0c501ced4002a57cb60433362fb2ce9c4d" }, "vim-cool": { "branch": "master", "commit": "80536b9f2e23292708a64f2e7bcf5e596f9faf24" }, From 9c5f0b52e9f29893a8846d22274fd054824569de Mon Sep 17 00:00:00 2001 From: ayamir Date: Mon, 8 May 2023 16:43:18 +0800 Subject: [PATCH 08/29] fix(lsp): set default python lsp to `pylsp`, avoid high CPU load caused by `jedi`. #721 --- lua/core/settings.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/core/settings.lua b/lua/core/settings.lua index e6e87050e..af736989b 100644 --- a/lua/core/settings.lua +++ b/lua/core/settings.lua @@ -63,6 +63,7 @@ settings["server_formatting_block_list"] = { lua_ls = true, tsserver = true, clangd = true, + pylsp = true, } -- Set the language servers that will be installed during bootstrap here @@ -75,7 +76,7 @@ settings["lsp_deps"] = { "html", "jsonls", "lua_ls", - "jedi_language_server", + "pylsp", -- "gopls", } From 463ac8f67c6e00822bd76e9d5635bfead047ccbb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 9 May 2023 01:56:40 +0000 Subject: [PATCH 09/29] chore(lockfile): auto update lazy-lock.json --- lazy-lock.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 912308423..b637407ff 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -2,13 +2,13 @@ "Comment.nvim": { "branch": "master", "commit": "e1fe53117aab24c378d5e6deaad786789c360123" }, "LuaSnip": { "branch": "master", "commit": "b4bc24c4925aeb05fd47d2ee9b24b7f73f5d7e32" }, "accelerated-jk.nvim": { "branch": "main", "commit": "8fb5dad4ccc1811766cebf16b544038aeeb7806f" }, - "alpha-nvim": { "branch": "main", "commit": "89eaa18a472be680539dee5977e2255f4dbd0738" }, + "alpha-nvim": { "branch": "main", "commit": "eaeb20d25b36880678141534479a0d99591be9a1" }, "auto-session": { "branch": "main", "commit": "21033c6815f249a7839c3a85fc8a6b44d74925c9" }, "autoclose.nvim": { "branch": "main", "commit": "c4db42ffc0edbd244502be951c142df0c8a7e582" }, "better-escape.nvim": { "branch": "master", "commit": "7031dc734add47bb71c010e0551829fa5799375f" }, "bigfile.nvim": { "branch": "main", "commit": "a34e42616c20bfd52943ed5d6632bb28d22b057e" }, "bufferline.nvim": { "branch": "main", "commit": "41660189da6951d14436147dff30ed7f0d12ed01" }, - "catppuccin": { "branch": "main", "commit": "ce06ac2d31e0ec390d308c52809da869c8568812" }, + "catppuccin": { "branch": "main", "commit": "b2f566d43e04557b1b83065cae706d461de04e66" }, "clever-f.vim": { "branch": "master", "commit": "6a3ac5e3688598af9411ab741737f98c47370c22" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-latex-symbols": { "branch": "main", "commit": "165fb66afdbd016eaa1570e41672c4c557b57124" }, @@ -21,7 +21,7 @@ "cmp-under-comparator": { "branch": "master", "commit": "6857f10272c3cfe930cece2afa2406e1385bfef8" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, "copilot-cmp": { "branch": "master", "commit": "ad4c097bf76c544fce95a2cb6b02f245cb18a6bb" }, - "copilot.lua": { "branch": "master", "commit": "3bfdf96d5eb7704ece1013ef04d0b0d211d12ee7" }, + "copilot.lua": { "branch": "master", "commit": "653bbdc44cd569a5fd0617e5a9d3df2b1359e230" }, "crates.nvim": { "branch": "main", "commit": "bb5ce73e9c41865e22329da118d91a565089e4d7" }, "csv.vim": { "branch": "master", "commit": "15ff93edf5b26c466affbb356e0696b7d6a3b499" }, "diffview.nvim": { "branch": "main", "commit": "8c1702470fd5186cb401b21f9bf8bdfad6d5cc87" }, @@ -37,7 +37,7 @@ "lspsaga.nvim": { "branch": "main", "commit": "76696bed4397c3b58563c246dc1f7856ed4af023" }, "lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" }, "markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "cec0e6dd534ade486b5eeb59ebcfa8d51c3e8c5e" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "90a8bbf106b85b76951a34c542058ffa807de2b1" }, "mason-null-ls.nvim": { "branch": "main", "commit": "54d702020bf94e4eefd357f0b738317af30217eb" }, "mason.nvim": { "branch": "main", "commit": "057ac5ca159c83e302a55bd839a96ff1ea2396db" }, "neodim": { "branch": "master", "commit": "6506918f1b0eee46f87e4ae83bedf0b23a448adb" }, @@ -45,7 +45,7 @@ "nord.nvim": { "branch": "master", "commit": "fab04b2dd4b64f4b1763b9250a8824d0b5194b8f" }, "null-ls.nvim": { "branch": "main", "commit": "71797bb303ac99a4435592e15068f127970513d7" }, "nvim-bufdel": { "branch": "main", "commit": "96c4f7ab053ddab0025bebe5f7c71e4795430e47" }, - "nvim-cmp": { "branch": "main", "commit": "1cad30fcffa282c0a9199c524c821eadc24bf939" }, + "nvim-cmp": { "branch": "main", "commit": "935b4069ce73b60ba9075bf05ee6ab50ed3af1a9" }, "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, "nvim-dap": { "branch": "master", "commit": "6cedcb527e264c8f25e86afa8dae74c6692dee51" }, "nvim-dap-ui": { "branch": "master", "commit": "078972d39338a49ec13fc43a44e235cc43189276" }, @@ -54,8 +54,8 @@ "nvim-scrollview": { "branch": "main", "commit": "4a04039b80c270f6bd2075935cd3c7943f6ad140" }, "nvim-tree.lua": { "branch": "master", "commit": "270c95556cad96d18ca547d86ae65927334b108b" }, "nvim-treehopper": { "branch": "master", "commit": "5a28bff46c05d28bdb4bcaef67e046eb915a9390" }, - "nvim-treesitter": { "branch": "master", "commit": "b231afbad1569c08f12cac53c6bb8deecdaba013" }, - "nvim-treesitter-context": { "branch": "master", "commit": "c8626af1de45174809fd61f90ade95a2681ee9e2" }, + "nvim-treesitter": { "branch": "master", "commit": "0ec48923e526d55892b7a1564a01b5111e5e9ba0" }, + "nvim-treesitter-context": { "branch": "master", "commit": "f1179bde94bcbeed68be33e694079afb71d49cac" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "35a60f093fa15a303874975f963428a5cd24e4a0" }, "nvim-ts-autotag": { "branch": "main", "commit": "40615e96075c743ef47aaf9de966dc348bec6459" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "0bf8fbc2ca8f8cdb6efbd0a9e32740d7a991e4c3" }, @@ -66,7 +66,7 @@ "project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" }, "rust-tools.nvim": { "branch": "master", "commit": "71d2cf67b5ed120a0e31b2c8adb210dd2834242f" }, "smartyank.nvim": { "branch": "master", "commit": "7e3905578f646503525b2f7018b8afd17861018c" }, - "sniprun": { "branch": "master", "commit": "ba15b95e3f9e18ad787f03d36cc080d4d403e3ac" }, + "sniprun": { "branch": "master", "commit": "2950121cea284a777423eca0fef021aba29351aa" }, "specs.nvim": { "branch": "main", "commit": "2743e412bbe21c9d73954c403d01e8de7377890d" }, "sqlite.lua": { "branch": "master", "commit": "b7e28c8463254c46a8e61c52d27d6a2040492fc3" }, "suda.vim": { "branch": "master", "commit": "08abd39dfe1cee681b8ce3e7321da5fa03e045c1" }, From 6e2c7a9ed644c192ea8e155d83820f5bfff5488e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B7=E9=85=94=E9=96=91=E5=90=9F?= <50296129+Jint-lzxy@users.noreply.github.com> Date: Wed, 10 May 2023 10:39:55 +0800 Subject: [PATCH 10/29] fix(auto-session): fix command names (#728) Ref: https://github.com/rmagatti/auto-session/commit/a2cc591c7e4f742ffc7321bf1d46090c8b2c48bf --- lua/keymap/editor.lua | 6 +++--- lua/modules/plugins/editor.lua | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/keymap/editor.lua b/lua/keymap/editor.lua index 37f56aeab..0d067aa54 100644 --- a/lua/keymap/editor.lua +++ b/lua/keymap/editor.lua @@ -15,9 +15,9 @@ local plug_map = { end):with_expr(), -- Plugin: auto_session - ["n|ss"] = map_cu("SaveSession"):with_noremap():with_silent():with_desc("session: Save"), - ["n|sr"] = map_cu("RestoreSession"):with_noremap():with_silent():with_desc("session: Restore"), - ["n|sd"] = map_cu("DeleteSession"):with_noremap():with_silent():with_desc("session: Delete"), + ["n|ss"] = map_cu("SessionSave"):with_noremap():with_silent():with_desc("session: Save"), + ["n|sr"] = map_cu("SessionRestore"):with_noremap():with_silent():with_desc("session: Restore"), + ["n|sd"] = map_cu("SessionDelete"):with_noremap():with_silent():with_desc("session: Delete"), -- Plugin: nvim-bufdel ["n|"] = map_cr("BufDel"):with_noremap():with_silent():with_desc("buffer: Close current"), diff --git a/lua/modules/plugins/editor.lua b/lua/modules/plugins/editor.lua index 4172e5ab2..135e65bd0 100644 --- a/lua/modules/plugins/editor.lua +++ b/lua/modules/plugins/editor.lua @@ -7,7 +7,7 @@ editor["rainbowhxch/accelerated-jk.nvim"] = { } editor["rmagatti/auto-session"] = { lazy = true, - cmd = { "SaveSession", "RestoreSession", "DeleteSession" }, + cmd = { "SessionSave", "SessionRestore", "SessionDelete" }, config = require("editor.auto-session"), } editor["m4xshen/autoclose.nvim"] = { From c6b4163407c5aae191a1235077982c245ca4221f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 11 May 2023 01:55:35 +0000 Subject: [PATCH 11/29] chore(lockfile): auto update lazy-lock.json --- lazy-lock.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index b637407ff..1e7e4589d 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -2,13 +2,13 @@ "Comment.nvim": { "branch": "master", "commit": "e1fe53117aab24c378d5e6deaad786789c360123" }, "LuaSnip": { "branch": "master", "commit": "b4bc24c4925aeb05fd47d2ee9b24b7f73f5d7e32" }, "accelerated-jk.nvim": { "branch": "main", "commit": "8fb5dad4ccc1811766cebf16b544038aeeb7806f" }, - "alpha-nvim": { "branch": "main", "commit": "eaeb20d25b36880678141534479a0d99591be9a1" }, + "alpha-nvim": { "branch": "main", "commit": "1838ae926e8d49fe5330d1498ee8289ae2c340bc" }, "auto-session": { "branch": "main", "commit": "21033c6815f249a7839c3a85fc8a6b44d74925c9" }, "autoclose.nvim": { "branch": "main", "commit": "c4db42ffc0edbd244502be951c142df0c8a7e582" }, "better-escape.nvim": { "branch": "master", "commit": "7031dc734add47bb71c010e0551829fa5799375f" }, "bigfile.nvim": { "branch": "main", "commit": "a34e42616c20bfd52943ed5d6632bb28d22b057e" }, - "bufferline.nvim": { "branch": "main", "commit": "41660189da6951d14436147dff30ed7f0d12ed01" }, - "catppuccin": { "branch": "main", "commit": "b2f566d43e04557b1b83065cae706d461de04e66" }, + "bufferline.nvim": { "branch": "main", "commit": "018bdf61a97e00caeff05d16977437c63018762e" }, + "catppuccin": { "branch": "main", "commit": "57b421ee5f7380f816791fa451e86f213b625ece" }, "clever-f.vim": { "branch": "master", "commit": "6a3ac5e3688598af9411ab741737f98c47370c22" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-latex-symbols": { "branch": "main", "commit": "165fb66afdbd016eaa1570e41672c4c557b57124" }, @@ -20,7 +20,7 @@ "cmp-treesitter": { "branch": "master", "commit": "389eadd48c27aa6dc0e6b992644704f026802a2e" }, "cmp-under-comparator": { "branch": "master", "commit": "6857f10272c3cfe930cece2afa2406e1385bfef8" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, - "copilot-cmp": { "branch": "master", "commit": "ad4c097bf76c544fce95a2cb6b02f245cb18a6bb" }, + "copilot-cmp": { "branch": "master", "commit": "dd2c72d2c6eafe2b91198e4b1ce6171df7b58606" }, "copilot.lua": { "branch": "master", "commit": "653bbdc44cd569a5fd0617e5a9d3df2b1359e230" }, "crates.nvim": { "branch": "main", "commit": "bb5ce73e9c41865e22329da118d91a565089e4d7" }, "csv.vim": { "branch": "master", "commit": "15ff93edf5b26c466affbb356e0696b7d6a3b499" }, @@ -29,33 +29,33 @@ "fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" }, "friendly-snippets": { "branch": "main", "commit": "10f741908e56ce47cf6b3440e3f04b4fdc0da2f2" }, "fzy-lua-native": { "branch": "master", "commit": "45148b3f70d244e8b8b5db60df447a2b7ac2de9d" }, - "gitsigns.nvim": { "branch": "main", "commit": "e5edefd9976039f5352e0c900f35206770b33a2d" }, + "gitsigns.nvim": { "branch": "main", "commit": "814158f6c4b1724c039fcefe79b0be72c9131c2d" }, "hop.nvim": { "branch": "v2", "commit": "90db1b2c61b820e230599a04fedcd2679e64bd07" }, "indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" }, - "lazy.nvim": { "branch": "main", "commit": "9ac19880b677d08f416c5189ffc2dc023084a159" }, + "lazy.nvim": { "branch": "main", "commit": "652b6febf8d5c99eb8cf4a1cec63da6db62e77d2" }, "lsp_signature.nvim": { "branch": "master", "commit": "7a26ebaa7e36aa2aefa6c1994b2b866c96de32e6" }, "lspsaga.nvim": { "branch": "main", "commit": "76696bed4397c3b58563c246dc1f7856ed4af023" }, "lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" }, "markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "90a8bbf106b85b76951a34c542058ffa807de2b1" }, "mason-null-ls.nvim": { "branch": "main", "commit": "54d702020bf94e4eefd357f0b738317af30217eb" }, - "mason.nvim": { "branch": "main", "commit": "057ac5ca159c83e302a55bd839a96ff1ea2396db" }, + "mason.nvim": { "branch": "main", "commit": "a51391311e86c295fc7611be2beb58859e93f21b" }, "neodim": { "branch": "master", "commit": "6506918f1b0eee46f87e4ae83bedf0b23a448adb" }, "neoscroll.nvim": { "branch": "master", "commit": "d7601c26c8a183fa8994ed339e70c2d841253e93" }, "nord.nvim": { "branch": "master", "commit": "fab04b2dd4b64f4b1763b9250a8824d0b5194b8f" }, - "null-ls.nvim": { "branch": "main", "commit": "71797bb303ac99a4435592e15068f127970513d7" }, + "null-ls.nvim": { "branch": "main", "commit": "08bb00c7c2cd58c72e02cf54e4b9cbfe14b03e09" }, "nvim-bufdel": { "branch": "main", "commit": "96c4f7ab053ddab0025bebe5f7c71e4795430e47" }, "nvim-cmp": { "branch": "main", "commit": "935b4069ce73b60ba9075bf05ee6ab50ed3af1a9" }, "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, "nvim-dap": { "branch": "master", "commit": "6cedcb527e264c8f25e86afa8dae74c6692dee51" }, "nvim-dap-ui": { "branch": "master", "commit": "078972d39338a49ec13fc43a44e235cc43189276" }, - "nvim-lspconfig": { "branch": "master", "commit": "5ba7ab746d814413c84ed98c0214c71cd28f130a" }, + "nvim-lspconfig": { "branch": "master", "commit": "84717430fb6f51c9e9cc8d63da10cceafc91500c" }, "nvim-notify": { "branch": "master", "commit": "159c6cf1be25a933f35e97499314c9faab55c98f" }, "nvim-scrollview": { "branch": "main", "commit": "4a04039b80c270f6bd2075935cd3c7943f6ad140" }, "nvim-tree.lua": { "branch": "master", "commit": "270c95556cad96d18ca547d86ae65927334b108b" }, "nvim-treehopper": { "branch": "master", "commit": "5a28bff46c05d28bdb4bcaef67e046eb915a9390" }, - "nvim-treesitter": { "branch": "master", "commit": "0ec48923e526d55892b7a1564a01b5111e5e9ba0" }, - "nvim-treesitter-context": { "branch": "master", "commit": "f1179bde94bcbeed68be33e694079afb71d49cac" }, + "nvim-treesitter": { "branch": "master", "commit": "73c7af9cdbce9330eeb9771639c86269f6d7cf9d" }, + "nvim-treesitter-context": { "branch": "master", "commit": "971781fb9a4dcbaed3bc550ff6ce864352f61dfb" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "35a60f093fa15a303874975f963428a5cd24e4a0" }, "nvim-ts-autotag": { "branch": "main", "commit": "40615e96075c743ef47aaf9de966dc348bec6459" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "0bf8fbc2ca8f8cdb6efbd0a9e32740d7a991e4c3" }, @@ -85,6 +85,6 @@ "vim-go": { "branch": "master", "commit": "a494378f6c106a97e39c62b493c14476f9f7de4f" }, "vim-illuminate": { "branch": "master", "commit": "a2907275a6899c570d16e95b9db5fd921c167502" }, "vim-matchup": { "branch": "master", "commit": "6c8909b682803d8c3a054259079f158a73a0e30f" }, - "which-key.nvim": { "branch": "main", "commit": "af8f26bfbb61b5f722c9fbc72b296dc9db0bcfdc" }, + "which-key.nvim": { "branch": "main", "commit": "015fdf3e3e052d4a9fee997ca0aa387c2dd3731c" }, "wilder.nvim": { "branch": "master", "commit": "679f348dc90d80ff9ba0e7c470c40a4d038dcecf" } } \ No newline at end of file From 971b0c76b705dc5a5edde307e447ab610842bfa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B7=E9=85=94=E9=96=91=E5=90=9F?= <50296129+Jint-lzxy@users.noreply.github.com> Date: Sun, 14 May 2023 10:55:59 +0800 Subject: [PATCH 12/29] feat(cmp): enable `experimental.ghost_text` (#733) --- lua/modules/configs/completion/cmp.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/modules/configs/completion/cmp.lua b/lua/modules/configs/completion/cmp.lua index b83b1843e..07c39c0f4 100644 --- a/lua/modules/configs/completion/cmp.lua +++ b/lua/modules/configs/completion/cmp.lua @@ -168,5 +168,10 @@ return function() -- { name = "codeium" }, -- { name = "cmp_tabnine" }, }, + experimental = { + ghost_text = { + hl_group = "Whitespace", + }, + }, }) end From a4295395e20819ee36cdddb985c4b6e03c1e169d Mon Sep 17 00:00:00 2001 From: groveer Date: Sun, 14 May 2023 11:07:48 +0800 Subject: [PATCH 13/29] chore(keymap): lsp keymap should effective at `LspAttach` event (#735) --- lua/core/event.lua | 8 +++++ lua/keymap/completion.lua | 62 ++++++++++++++++----------------------- 2 files changed, 34 insertions(+), 36 deletions(-) diff --git a/lua/core/event.lua b/lua/core/event.lua index bb5dbf90a..3208992ec 100644 --- a/lua/core/event.lua +++ b/lua/core/event.lua @@ -13,6 +13,14 @@ function autocmd.nvim_create_augroups(definitions) end end +local mapping = require("keymap.completion") +vim.api.nvim_create_autocmd("LspAttach", { + group = vim.api.nvim_create_augroup("UserLspConfig", {}), + callback = function(event) + mapping.lsp(event.buf) + end, +}) + -- auto close NvimTree vim.api.nvim_create_autocmd("BufEnter", { group = vim.api.nvim_create_augroup("NvimTreeClose", { clear = true }), diff --git a/lua/keymap/completion.lua b/lua/keymap/completion.lua index adb473953..953e4c770 100644 --- a/lua/keymap/completion.lua +++ b/lua/keymap/completion.lua @@ -4,41 +4,31 @@ local map_cu = bind.map_cu -- local map_cmd = bind.map_cmd local map_callback = bind.map_callback -local plug_map = { - -- LSP-related keymaps, work only when event = { "InsertEnter", "LspStart" } - ["n|li"] = map_cr("LspInfo"):with_noremap():with_silent():with_nowait():with_desc("lsp: Info"), - ["n|lr"] = map_cr("LspRestart"):with_noremap():with_silent():with_nowait():with_desc("lsp: Restart"), - ["n|go"] = map_cr("Lspsaga outline"):with_noremap():with_silent():with_desc("lsp: Toggle outline"), - ["n|g["] = map_cr("Lspsaga diagnostic_jump_prev"):with_noremap():with_silent():with_desc("lsp: Prev diagnostic"), - ["n|g]"] = map_cr("Lspsaga diagnostic_jump_next"):with_noremap():with_silent():with_desc("lsp: Next diagnostic"), - ["n|ld"] = map_cr("Lspsaga show_line_diagnostics") - :with_noremap() - :with_silent() - :with_desc("lsp: Line diagnostic"), - ["n|gs"] = map_callback(function() +local mapping = {} + +function mapping.lsp(buf) + local map = { + -- LSP-related keymaps, work only when event = { "InsertEnter", "LspStart" } + ["n|li"] = map_cr("LspInfo"):with_buffer(buf):with_desc("lsp: Info"), + ["n|lr"] = map_cr("LspRestart"):with_buffer(buf):with_nowait():with_desc("lsp: Restart"), + ["n|go"] = map_cr("Lspsaga outline"):with_buffer(buf):with_desc("lsp: Toggle outline"), + ["n|g["] = map_cr("Lspsaga diagnostic_jump_prev"):with_buffer(buf):with_desc("lsp: Prev diagnostic"), + ["n|g]"] = map_cr("Lspsaga diagnostic_jump_next"):with_buffer(buf):with_desc("lsp: Next diagnostic"), + ["n|ld"] = map_cr("Lspsaga show_line_diagnostics"):with_buffer(buf):with_desc("lsp: Line diagnostic"), + ["n|gs"] = map_callback(function() vim.lsp.buf.signature_help() - end) - :with_noremap() - :with_silent() - :with_desc("lsp: Signature help"), - ["n|gr"] = map_cr("Lspsaga rename"):with_noremap():with_silent():with_desc("lsp: Rename in file range"), - ["n|gR"] = map_cr("Lspsaga rename ++project") - :with_noremap() - :with_silent() - :with_desc("lsp: Rename in project range"), - ["n|K"] = map_cr("Lspsaga hover_doc"):with_noremap():with_silent():with_desc("lsp: Show doc"), - ["nv|ga"] = map_cr("Lspsaga code_action"):with_noremap():with_silent():with_desc("lsp: Code action"), - ["n|gd"] = map_cr("Lspsaga peek_definition"):with_noremap():with_silent():with_desc("lsp: Preview definition"), - ["n|gD"] = map_cr("Lspsaga goto_definition"):with_noremap():with_silent():with_desc("lsp: Goto definition"), - ["n|gh"] = map_cr("Lspsaga lsp_finder"):with_noremap():with_silent():with_desc("lsp: Show reference"), - ["n|ci"] = map_cr("Lspsaga incoming_calls") - :with_noremap() - :with_silent() - :with_desc("lsp: Show incoming calls"), - ["n|co"] = map_cr("Lspsaga outgoing_calls") - :with_noremap() - :with_silent() - :with_desc("lsp: Show outgoing calls"), -} + end):with_desc("lsp: Signature help"), + ["n|gr"] = map_cr("Lspsaga rename"):with_buffer(buf):with_desc("lsp: Rename in file range"), + ["n|gR"] = map_cr("Lspsaga rename ++project"):with_buffer(buf):with_desc("lsp: Rename in project range"), + ["n|K"] = map_cr("Lspsaga hover_doc"):with_buffer(buf):with_desc("lsp: Show doc"), + ["nv|ga"] = map_cr("Lspsaga code_action"):with_buffer(buf):with_desc("lsp: Code action for cursor"), + ["n|gd"] = map_cr("Lspsaga peek_definition"):with_buffer(buf):with_desc("lsp: Preview definition"), + ["n|gD"] = map_cr("Lspsaga goto_definition"):with_buffer(buf):with_desc("lsp: Goto definition"), + ["n|gh"] = map_cr("Lspsaga lsp_finder"):with_buffer(buf):with_desc("lsp: Show reference"), + ["n|ci"] = map_cr("Lspsaga incoming_calls"):with_buffer(buf):with_desc("lsp: Show incoming calls"), + ["n|co"] = map_cr("Lspsaga outgoing_calls"):with_buffer(buf):with_desc("lsp: Show outgoing calls"), + } + bind.nvim_load_mapping(map) +end -bind.nvim_load_mapping(plug_map) +return mapping From 2104162dfc3e00acf9e053e4968e999df084cb49 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 15 May 2023 01:57:45 +0000 Subject: [PATCH 14/29] chore(lockfile): auto update lazy-lock.json --- lazy-lock.json | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 1e7e4589d..dae7b0f63 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -3,11 +3,11 @@ "LuaSnip": { "branch": "master", "commit": "b4bc24c4925aeb05fd47d2ee9b24b7f73f5d7e32" }, "accelerated-jk.nvim": { "branch": "main", "commit": "8fb5dad4ccc1811766cebf16b544038aeeb7806f" }, "alpha-nvim": { "branch": "main", "commit": "1838ae926e8d49fe5330d1498ee8289ae2c340bc" }, - "auto-session": { "branch": "main", "commit": "21033c6815f249a7839c3a85fc8a6b44d74925c9" }, + "auto-session": { "branch": "main", "commit": "571ecb873654554109f63eac3193b133aec2f90c" }, "autoclose.nvim": { "branch": "main", "commit": "c4db42ffc0edbd244502be951c142df0c8a7e582" }, "better-escape.nvim": { "branch": "master", "commit": "7031dc734add47bb71c010e0551829fa5799375f" }, "bigfile.nvim": { "branch": "main", "commit": "a34e42616c20bfd52943ed5d6632bb28d22b057e" }, - "bufferline.nvim": { "branch": "main", "commit": "018bdf61a97e00caeff05d16977437c63018762e" }, + "bufferline.nvim": { "branch": "main", "commit": "1952c33e425ede785d26aa9e250addfe304a8510" }, "catppuccin": { "branch": "main", "commit": "57b421ee5f7380f816791fa451e86f213b625ece" }, "clever-f.vim": { "branch": "master", "commit": "6a3ac5e3688598af9411ab741737f98c47370c22" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, @@ -20,42 +20,42 @@ "cmp-treesitter": { "branch": "master", "commit": "389eadd48c27aa6dc0e6b992644704f026802a2e" }, "cmp-under-comparator": { "branch": "master", "commit": "6857f10272c3cfe930cece2afa2406e1385bfef8" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, - "copilot-cmp": { "branch": "master", "commit": "dd2c72d2c6eafe2b91198e4b1ce6171df7b58606" }, + "copilot-cmp": { "branch": "master", "commit": "c2cdb3c0f5078b0619055af192295830a7987790" }, "copilot.lua": { "branch": "master", "commit": "653bbdc44cd569a5fd0617e5a9d3df2b1359e230" }, - "crates.nvim": { "branch": "main", "commit": "bb5ce73e9c41865e22329da118d91a565089e4d7" }, + "crates.nvim": { "branch": "main", "commit": "dca1949b0405c6ee5173d0627a523a10a63eca3c" }, "csv.vim": { "branch": "master", "commit": "15ff93edf5b26c466affbb356e0696b7d6a3b499" }, - "diffview.nvim": { "branch": "main", "commit": "8c1702470fd5186cb401b21f9bf8bdfad6d5cc87" }, + "diffview.nvim": { "branch": "main", "commit": "1d6ea6ced1c3ec0f6464761a138bb35afd79ef63" }, "edge": { "branch": "master", "commit": "358cb6688ac577470a4eafcb53bdd63899dfc937" }, "fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" }, - "friendly-snippets": { "branch": "main", "commit": "10f741908e56ce47cf6b3440e3f04b4fdc0da2f2" }, + "friendly-snippets": { "branch": "main", "commit": "1d0dac346de7c6895ac72528df3276386c6b149b" }, "fzy-lua-native": { "branch": "master", "commit": "45148b3f70d244e8b8b5db60df447a2b7ac2de9d" }, "gitsigns.nvim": { "branch": "main", "commit": "814158f6c4b1724c039fcefe79b0be72c9131c2d" }, "hop.nvim": { "branch": "v2", "commit": "90db1b2c61b820e230599a04fedcd2679e64bd07" }, "indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" }, - "lazy.nvim": { "branch": "main", "commit": "652b6febf8d5c99eb8cf4a1cec63da6db62e77d2" }, + "lazy.nvim": { "branch": "main", "commit": "aba872ec78ffe7f7367764ab0fff6f0170421fde" }, "lsp_signature.nvim": { "branch": "master", "commit": "7a26ebaa7e36aa2aefa6c1994b2b866c96de32e6" }, - "lspsaga.nvim": { "branch": "main", "commit": "76696bed4397c3b58563c246dc1f7856ed4af023" }, + "lspsaga.nvim": { "branch": "main", "commit": "98bcbc49ba62a96ce4e2072f2e5e7d2e4d454361" }, "lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" }, "markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "90a8bbf106b85b76951a34c542058ffa807de2b1" }, "mason-null-ls.nvim": { "branch": "main", "commit": "54d702020bf94e4eefd357f0b738317af30217eb" }, - "mason.nvim": { "branch": "main", "commit": "a51391311e86c295fc7611be2beb58859e93f21b" }, - "neodim": { "branch": "master", "commit": "6506918f1b0eee46f87e4ae83bedf0b23a448adb" }, + "mason.nvim": { "branch": "main", "commit": "e634134312bb936f472468a401c9cae6485ab54b" }, + "neodim": { "branch": "master", "commit": "89c16fccccfdb5b7e6ad3a6e8286736debc11705" }, "neoscroll.nvim": { "branch": "master", "commit": "d7601c26c8a183fa8994ed339e70c2d841253e93" }, "nord.nvim": { "branch": "master", "commit": "fab04b2dd4b64f4b1763b9250a8824d0b5194b8f" }, "null-ls.nvim": { "branch": "main", "commit": "08bb00c7c2cd58c72e02cf54e4b9cbfe14b03e09" }, "nvim-bufdel": { "branch": "main", "commit": "96c4f7ab053ddab0025bebe5f7c71e4795430e47" }, - "nvim-cmp": { "branch": "main", "commit": "935b4069ce73b60ba9075bf05ee6ab50ed3af1a9" }, + "nvim-cmp": { "branch": "main", "commit": "d153771162bd9795d9f7142df5c674b61066a585" }, "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, "nvim-dap": { "branch": "master", "commit": "6cedcb527e264c8f25e86afa8dae74c6692dee51" }, - "nvim-dap-ui": { "branch": "master", "commit": "078972d39338a49ec13fc43a44e235cc43189276" }, - "nvim-lspconfig": { "branch": "master", "commit": "84717430fb6f51c9e9cc8d63da10cceafc91500c" }, - "nvim-notify": { "branch": "master", "commit": "159c6cf1be25a933f35e97499314c9faab55c98f" }, + "nvim-dap-ui": { "branch": "master", "commit": "4ce7b97dd8f50b4f672948a34bf8f3a56214fdb8" }, + "nvim-lspconfig": { "branch": "master", "commit": "df58d91c9351a9dc5be6cf8d54f49ab0d9a64e73" }, + "nvim-notify": { "branch": "master", "commit": "f3024b912073774111202f5fa6518b0cd2a74432" }, "nvim-scrollview": { "branch": "main", "commit": "4a04039b80c270f6bd2075935cd3c7943f6ad140" }, - "nvim-tree.lua": { "branch": "master", "commit": "270c95556cad96d18ca547d86ae65927334b108b" }, + "nvim-tree.lua": { "branch": "master", "commit": "736c7ff59065275f0483af4b7f07a9bc41449ad0" }, "nvim-treehopper": { "branch": "master", "commit": "5a28bff46c05d28bdb4bcaef67e046eb915a9390" }, - "nvim-treesitter": { "branch": "master", "commit": "73c7af9cdbce9330eeb9771639c86269f6d7cf9d" }, - "nvim-treesitter-context": { "branch": "master", "commit": "971781fb9a4dcbaed3bc550ff6ce864352f61dfb" }, + "nvim-treesitter": { "branch": "master", "commit": "680807fa6a482c639119098bc48ca3831c66db13" }, + "nvim-treesitter-context": { "branch": "master", "commit": "f24a86c32238867f24fbff49913db0068f8488d2" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "35a60f093fa15a303874975f963428a5cd24e4a0" }, "nvim-ts-autotag": { "branch": "main", "commit": "40615e96075c743ef47aaf9de966dc348bec6459" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "0bf8fbc2ca8f8cdb6efbd0a9e32740d7a991e4c3" }, @@ -66,7 +66,7 @@ "project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" }, "rust-tools.nvim": { "branch": "master", "commit": "71d2cf67b5ed120a0e31b2c8adb210dd2834242f" }, "smartyank.nvim": { "branch": "master", "commit": "7e3905578f646503525b2f7018b8afd17861018c" }, - "sniprun": { "branch": "master", "commit": "2950121cea284a777423eca0fef021aba29351aa" }, + "sniprun": { "branch": "master", "commit": "05676989e801ad72c69c14a186ae5a8a3390b055" }, "specs.nvim": { "branch": "main", "commit": "2743e412bbe21c9d73954c403d01e8de7377890d" }, "sqlite.lua": { "branch": "master", "commit": "b7e28c8463254c46a8e61c52d27d6a2040492fc3" }, "suda.vim": { "branch": "master", "commit": "08abd39dfe1cee681b8ce3e7321da5fa03e045c1" }, @@ -76,7 +76,7 @@ "telescope-live-grep-args.nvim": { "branch": "master", "commit": "0f75ea809c46af8997c64f49c52e3c641d887885" }, "telescope-undo.nvim": { "branch": "main", "commit": "231b5ebb4328d2768c830c9a8d1b9c696116848d" }, "telescope-zoxide": { "branch": "main", "commit": "68966349aa1b8e9ade403e18479ecf79447389a7" }, - "telescope.nvim": { "branch": "master", "commit": "d77b37f4520e5fc2cf4c74c12e42ed4b589bd367" }, + "telescope.nvim": { "branch": "master", "commit": "ebf93395e79e5d026e3867d9e5e158b2bbe1499c" }, "toggleterm.nvim": { "branch": "main", "commit": "68fdf851c2b7901a7065ff129b77d3483419ddce" }, "trouble.nvim": { "branch": "main", "commit": "d56bfc0c501ced4002a57cb60433362fb2ce9c4d" }, "vim-cool": { "branch": "master", "commit": "80536b9f2e23292708a64f2e7bcf5e596f9faf24" }, @@ -85,6 +85,6 @@ "vim-go": { "branch": "master", "commit": "a494378f6c106a97e39c62b493c14476f9f7de4f" }, "vim-illuminate": { "branch": "master", "commit": "a2907275a6899c570d16e95b9db5fd921c167502" }, "vim-matchup": { "branch": "master", "commit": "6c8909b682803d8c3a054259079f158a73a0e30f" }, - "which-key.nvim": { "branch": "main", "commit": "015fdf3e3e052d4a9fee997ca0aa387c2dd3731c" }, + "which-key.nvim": { "branch": "main", "commit": "5a6c954a5a46023c19acc03a8b6d7c3e57964fc5" }, "wilder.nvim": { "branch": "master", "commit": "679f348dc90d80ff9ba0e7c470c40a4d038dcecf" } } \ No newline at end of file From a4b8f5c51830e2d5b0d5673cb7097a0ad56747f4 Mon Sep 17 00:00:00 2001 From: groveer Date: Mon, 15 May 2023 20:28:20 +0800 Subject: [PATCH 15/29] fix(catppuccin): use transparent background for `TroubleNormal` (#737) --- lua/modules/configs/ui/catppuccin.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/modules/configs/ui/catppuccin.lua b/lua/modules/configs/ui/catppuccin.lua index 62ccb846d..1df0c7caf 100644 --- a/lua/modules/configs/ui/catppuccin.lua +++ b/lua/modules/configs/ui/catppuccin.lua @@ -149,7 +149,7 @@ return function() FidgetTitle = { fg = cp.blue, style = { "bold" } }, -- For trouble.nvim - TroubleNormal = { bg = cp.base }, + TroubleNormal = { bg = transparent_background and cp.none or cp.base }, -- For lsp semantic tokens ["@lsp.type.comment"] = { fg = cp.overlay0 }, From 0d740d80101c6668b2ae91250a219d5e595eeecd Mon Sep 17 00:00:00 2001 From: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> Date: Mon, 15 May 2023 20:42:19 +0800 Subject: [PATCH 16/29] fix: typos in notifications --- lua/core/init.lua | 2 +- lua/modules/utils/init.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index 7411191cf..3bd5b50ec 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -127,7 +127,7 @@ cmd.exe will be used instead for `:!` (shell bang) and toggleterm.nvim. You're recommended to install PowerShell for better experience.]], vim.log.levels.WARN, - { title = "[core] Runtime error" } + { title = "[core] Runtime Warning" } ) return end diff --git a/lua/modules/utils/init.lua b/lua/modules/utils/init.lua index 47da69d8e..ae89e3abb 100644 --- a/lua/modules/utils/init.lua +++ b/lua/modules/utils/init.lua @@ -212,7 +212,7 @@ function M.tobool(value) vim.notify( "Attempting to convert data of type '" .. type(value) .. "' [other than 0 or 1] to boolean", vim.log.levels.ERROR, - { title = "[utils] Runtime error" } + { title = "[utils] Runtime Error" } ) return nil end From 4796cd1ef6a573102c1a02f0a8c60bb96aaa671b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 16 May 2023 01:57:27 +0000 Subject: [PATCH 17/29] chore(lockfile): auto update lazy-lock.json --- lazy-lock.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index dae7b0f63..21c691931 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -24,7 +24,7 @@ "copilot.lua": { "branch": "master", "commit": "653bbdc44cd569a5fd0617e5a9d3df2b1359e230" }, "crates.nvim": { "branch": "main", "commit": "dca1949b0405c6ee5173d0627a523a10a63eca3c" }, "csv.vim": { "branch": "master", "commit": "15ff93edf5b26c466affbb356e0696b7d6a3b499" }, - "diffview.nvim": { "branch": "main", "commit": "1d6ea6ced1c3ec0f6464761a138bb35afd79ef63" }, + "diffview.nvim": { "branch": "main", "commit": "1fc42e67dfb2da7946edbc9a30cb98ed371b8dde" }, "edge": { "branch": "master", "commit": "358cb6688ac577470a4eafcb53bdd63899dfc937" }, "fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" }, "friendly-snippets": { "branch": "main", "commit": "1d0dac346de7c6895ac72528df3276386c6b149b" }, @@ -34,7 +34,7 @@ "indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" }, "lazy.nvim": { "branch": "main", "commit": "aba872ec78ffe7f7367764ab0fff6f0170421fde" }, "lsp_signature.nvim": { "branch": "master", "commit": "7a26ebaa7e36aa2aefa6c1994b2b866c96de32e6" }, - "lspsaga.nvim": { "branch": "main", "commit": "98bcbc49ba62a96ce4e2072f2e5e7d2e4d454361" }, + "lspsaga.nvim": { "branch": "main", "commit": "33d08e6b2f45933cb4dcd50cf19c47b7352d417b" }, "lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" }, "markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "90a8bbf106b85b76951a34c542058ffa807de2b1" }, @@ -49,12 +49,12 @@ "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, "nvim-dap": { "branch": "master", "commit": "6cedcb527e264c8f25e86afa8dae74c6692dee51" }, "nvim-dap-ui": { "branch": "master", "commit": "4ce7b97dd8f50b4f672948a34bf8f3a56214fdb8" }, - "nvim-lspconfig": { "branch": "master", "commit": "df58d91c9351a9dc5be6cf8d54f49ab0d9a64e73" }, + "nvim-lspconfig": { "branch": "master", "commit": "37ec63fc48ffd2a627ab462224a115ecfb56ff4f" }, "nvim-notify": { "branch": "master", "commit": "f3024b912073774111202f5fa6518b0cd2a74432" }, "nvim-scrollview": { "branch": "main", "commit": "4a04039b80c270f6bd2075935cd3c7943f6ad140" }, "nvim-tree.lua": { "branch": "master", "commit": "736c7ff59065275f0483af4b7f07a9bc41449ad0" }, "nvim-treehopper": { "branch": "master", "commit": "5a28bff46c05d28bdb4bcaef67e046eb915a9390" }, - "nvim-treesitter": { "branch": "master", "commit": "680807fa6a482c639119098bc48ca3831c66db13" }, + "nvim-treesitter": { "branch": "master", "commit": "27079f70603c9d8a002635acfb95db33318e4eef" }, "nvim-treesitter-context": { "branch": "master", "commit": "f24a86c32238867f24fbff49913db0068f8488d2" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "35a60f093fa15a303874975f963428a5cd24e4a0" }, "nvim-ts-autotag": { "branch": "main", "commit": "40615e96075c743ef47aaf9de966dc348bec6459" }, From 770810bd040e436b39a6308de6ac5218b682e3a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B7=E9=85=94=E9=96=91=E5=90=9F?= <50296129+Jint-lzxy@users.noreply.github.com> Date: Tue, 16 May 2023 11:43:19 +0800 Subject: [PATCH 18/29] feat(neodim): support v2 (#739) --- lua/modules/configs/ui/neodim.lua | 7 +++---- lua/modules/utils/init.lua | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lua/modules/configs/ui/neodim.lua b/lua/modules/configs/ui/neodim.lua index 200496b25..5a8d0a31d 100644 --- a/lua/modules/configs/ui/neodim.lua +++ b/lua/modules/configs/ui/neodim.lua @@ -4,14 +4,13 @@ return function() require("neodim").setup({ alpha = 0.45, blend_color = blend_color, - update_in_insert = { - enable = true, - delay = 100, - }, + refresh_delay = 75, -- time in ms to wait after typing before refreshing diagnostics hide = { virtual_text = true, signs = false, underline = false, }, + priority = 80, + disable = { "big_file_disabled_ft" }, }) end diff --git a/lua/modules/utils/init.lua b/lua/modules/utils/init.lua index ae89e3abb..1a5eae87c 100644 --- a/lua/modules/utils/init.lua +++ b/lua/modules/utils/init.lua @@ -110,9 +110,9 @@ function M.hl_to_rgb(hl_group, use_bg, fallback_hl) if hlexists then local result = vim.api.nvim_get_hl(0, { name = hl_group, link = false }) if use_bg then - hex = result.bg and result.bg or "NONE" + hex = result.bg and string.format("#%06x", result.bg) or "NONE" else - hex = result.fg and result.fg or "NONE" + hex = result.fg and string.format("#%06x", result.fg) or "NONE" end end From b607f5a4b3d92411343c1ea5195908c6e850ca49 Mon Sep 17 00:00:00 2001 From: ayamir Date: Tue, 16 May 2023 11:43:48 +0800 Subject: [PATCH 19/29] chore(wsl): use Windows native way to yank and paste. (#736) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(wsl): use Windows native way to yank and paste. * style: update code style. Co-authored-by: 冷酔閑吟 <50296129+Jint-lzxy@users.noreply.github.com> --------- Co-authored-by: 冷酔閑吟 <50296129+Jint-lzxy@users.noreply.github.com> --- lua/core/init.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index 3bd5b50ec..18323c6ec 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -101,14 +101,14 @@ local clipboard_config = function() } elseif global.is_wsl then vim.g.clipboard = { - name = "win32yank-wsl", + name = "psyank-wsl", copy = { - ["+"] = "win32yank.exe -i --crlf", - ["*"] = "win32yank.exe -i --crlf", + ["+"] = "clip.exe", + ["*"] = "clip.exe", }, paste = { - ["+"] = "win32yank.exe -o --lf", - ["*"] = "win32yank.exe -o --lf", + ["+"] = [[powershell.exe -NoProfile -NoLogo -NonInteractive -MTA -Command [console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))]], + ["*"] = [[powershell.exe -NoProfile -NoLogo -NonInteractive -MTA -Command [console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))]], }, cache_enabled = 0, } From 42e816b9d465b69110de639b1afd94b3ce1fa5c8 Mon Sep 17 00:00:00 2001 From: ayamir Date: Tue, 16 May 2023 19:19:52 +0800 Subject: [PATCH 20/29] fix(wsl): paste selected clipboard content correctly. --- lua/core/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index 18323c6ec..458b50d83 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -107,8 +107,8 @@ local clipboard_config = function() ["*"] = "clip.exe", }, paste = { - ["+"] = [[powershell.exe -NoProfile -NoLogo -NonInteractive -MTA -Command [console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))]], - ["*"] = [[powershell.exe -NoProfile -NoLogo -NonInteractive -MTA -Command [console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))]], + ["+"] = [[powershell.exe -NoProfile -NoLogo -NonInteractive -Command [console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))]], + ["*"] = [[powershell.exe -NoProfile -NoLogo -NonInteractive -Command [console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))]], }, cache_enabled = 0, } From 1b53c90eca5bb1039ef67667214c36483ff2d021 Mon Sep 17 00:00:00 2001 From: groveer Date: Tue, 16 May 2023 21:45:51 +0800 Subject: [PATCH 21/29] feat!: use executables on `$PATH` (#738) * fix: use commands in environment variables instead of absolute paths * fixup! fix: use commands in environment variables instead of absolute paths --------- Co-authored-by: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> --- lua/core/options.lua | 7 ++----- lua/modules/configs/tool/dap/dap-debugpy.lua | 8 ++++---- lua/modules/configs/tool/dap/dap-lldb.lua | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/lua/core/options.lua b/lua/core/options.lua index 647a25005..a2b9a3ee2 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -110,12 +110,9 @@ local function load_options() if not isempty(conda_prefix) then vim.g.python_host_prog = conda_prefix .. "/bin/python" vim.g.python3_host_prog = conda_prefix .. "/bin/python" - elseif global.is_mac then - vim.g.python_host_prog = "/usr/bin/python" - vim.g.python3_host_prog = "/usr/local/bin/python3" else - vim.g.python_host_prog = "/usr/bin/python" - vim.g.python3_host_prog = "/usr/bin/python3" + vim.g.python_host_prog = "python" + vim.g.python3_host_prog = "python3" end for name, value in pairs(global_local) do diff --git a/lua/modules/configs/tool/dap/dap-debugpy.lua b/lua/modules/configs/tool/dap/dap-debugpy.lua index cbd7980b6..21c014cdf 100644 --- a/lua/modules/configs/tool/dap/dap-debugpy.lua +++ b/lua/modules/configs/tool/dap/dap-debugpy.lua @@ -6,7 +6,7 @@ end dap.adapters.python = { type = "executable", - command = "/usr/bin/python", + command = "python", args = { "-m", "debugpy.adapter" }, } dap.configurations.python = { @@ -22,13 +22,13 @@ dap.configurations.python = { if not isempty(vim.env.CONDA_PREFIX) then return vim.env.CONDA_PREFIX .. "/bin/python" else - return "/usr/bin/python3" + return "python3" end end, }, } --- NOTE: for people using venv +-- NOTE: This setting is for people using venv -- pythonPath = function() -- -- debugpy supports launching an application with a different interpreter then the one used to launch debugpy itself. -- -- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within. @@ -41,6 +41,6 @@ dap.configurations.python = { -- elseif vim.fn.executable(cwd .. "/.venv/bin/python") == 1 then -- return cwd .. "/.venv/bin/python" -- else --- return "/usr/bin/python" +-- return "python3" -- end -- end, diff --git a/lua/modules/configs/tool/dap/dap-lldb.lua b/lua/modules/configs/tool/dap/dap-lldb.lua index 53aa9adfd..ed1e628eb 100644 --- a/lua/modules/configs/tool/dap/dap-lldb.lua +++ b/lua/modules/configs/tool/dap/dap-lldb.lua @@ -2,7 +2,7 @@ local dap = require("dap") dap.adapters.lldb = { type = "executable", - command = "/usr/bin/lldb-vscode", + command = "lldb-vscode", name = "lldb", } dap.configurations.cpp = { From a860c4b21450df3d1784ca1e6a9ebf5009f09225 Mon Sep 17 00:00:00 2001 From: ayamir Date: Tue, 16 May 2023 22:22:27 +0800 Subject: [PATCH 22/29] feat(cmp): reimplement comparators for completion entries (#746) * feat(cmp): update sort logic. * fixup! feat(cmp): update sort logic * fixup commit --------- Co-authored-by: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> --- lua/modules/configs/completion/cmp.lua | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/lua/modules/configs/completion/cmp.lua b/lua/modules/configs/completion/cmp.lua index 07c39c0f4..4331b363b 100644 --- a/lua/modules/configs/completion/cmp.lua +++ b/lua/modules/configs/completion/cmp.lua @@ -21,15 +21,6 @@ return function() } end - local cmp_window = require("cmp.utils.window") - - cmp_window.info_ = cmp_window.info - cmp_window.info = function(self) - local info = self:info_() - info.scrollable = false - return info - end - local compare = require("cmp.config.compare") compare.lsp_scores = function(entry1, entry2) local diff @@ -71,13 +62,14 @@ return function() end local cmp = require("cmp") - cmp.setup({ + preselect = cmp.PreselectMode.Item, window = { completion = { border = border("Normal"), max_width = 80, max_height = 20, + scrollbar = false, }, documentation = { border = border("CmpDocBorder"), @@ -89,12 +81,16 @@ return function() require("copilot_cmp.comparators").prioritize, require("copilot_cmp.comparators").score, -- require("cmp_tabnine.compare"), - compare.offset, + compare.offset, -- Items closer to cursor will have lower priority compare.exact, + -- compare.scopes, compare.lsp_scores, + compare.sort_text, + compare.score, + compare.recently_used, + -- compare.locality, -- Items closer to cursor will have higher priority, conflicts with `offset` require("cmp-under-comparator").under, compare.kind, - compare.sort_text, compare.length, compare.order, }, @@ -110,6 +106,9 @@ return function() return kind end, }, + matching = { + disallow_partial_fuzzy_matching = false, + }, -- You can set mappings if you want mapping = cmp.mapping.preset.insert({ [""] = cmp.mapping.confirm({ select = true, behavior = cmp.ConfirmBehavior.Replace }), @@ -144,7 +143,7 @@ return function() }, -- You should specify your *installed* sources. sources = { - { name = "nvim_lsp" }, + { name = "nvim_lsp", max_item_count = 350 }, { name = "nvim_lua" }, { name = "luasnip" }, { name = "path" }, From 351549c53476af854ab94aaa93ae9dfac045316d Mon Sep 17 00:00:00 2001 From: ayamir Date: Tue, 16 May 2023 22:49:41 +0800 Subject: [PATCH 23/29] feat: load `SessionLens` manually via user command (#745) * feat: disable session_lens load_on_setup, create command for search_session. * perf: setup_session_lens only it not loaded. * perf: update command name and side note. --------- Co-authored-by: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> --- lua/modules/configs/editor/auto-session.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lua/modules/configs/editor/auto-session.lua b/lua/modules/configs/editor/auto-session.lua index c056c5173..75ee2b21f 100644 --- a/lua/modules/configs/editor/auto-session.lua +++ b/lua/modules/configs/editor/auto-session.lua @@ -7,5 +7,18 @@ return function() auto_save_enabled = true, auto_restore_enabled = true, auto_session_suppress_dirs = nil, + session_lens = { + -- If `load_on_setup` is set to false, please use `SessionLensToggle` to manually load this add-on. + load_on_setup = false, + theme_conf = { border = true }, + previewer = false, + }, }) + + vim.api.nvim_create_user_command("SessionLensToggle", function() + if not package.loaded["auto-session.session-lens"] then + require("auto-session").setup_session_lens() + end + require("auto-session.session-lens").search_session() + end, { nargs = 0 }) end From ad5eff7d362bd1388174fd0d9e086157d88ce197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B7=E9=85=94=E9=96=91=E5=90=9F?= <50296129+Jint-lzxy@users.noreply.github.com> Date: Wed, 17 May 2023 00:45:54 +0800 Subject: [PATCH 24/29] fix(vim_fn): check return values of `vim.fn` against 1 (#747) --- lua/core/init.lua | 4 ++-- lua/keymap/helpers.lua | 2 +- lua/modules/configs/completion/lsp.lua | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index 458b50d83..1d107963f 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -117,7 +117,7 @@ end local shell_config = function() if global.is_windows then - if not (vim.fn.executable("pwsh") or vim.fn.executable("powershell")) then + if not (vim.fn.executable("pwsh") == 1 or vim.fn.executable("powershell") == 1) then vim.notify( [[ Failed to setup terminal config @@ -134,7 +134,7 @@ You're recommended to install PowerShell for better experience.]], local basecmd = "-NoLogo -MTA -ExecutionPolicy RemoteSigned" local ctrlcmd = "-Command [console]::InputEncoding = [console]::OutputEncoding = [System.Text.Encoding]::UTF8" - vim.api.nvim_set_option_value("shell", vim.fn.executable("pwsh") and "pwsh" or "powershell", {}) + vim.api.nvim_set_option_value("shell", vim.fn.executable("pwsh") == 1 and "pwsh" or "powershell", {}) vim.api.nvim_set_option_value("shellcmdflag", string.format("%s %s;", basecmd, ctrlcmd), {}) vim.api.nvim_set_option_value("shellredir", "-RedirectStandardOutput %s -NoNewWindow -Wait", {}) vim.api.nvim_set_option_value("shellpipe", "2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode", {}) diff --git a/lua/keymap/helpers.lua b/lua/keymap/helpers.lua index 1229fd57a..f4f26d26f 100644 --- a/lua/keymap/helpers.lua +++ b/lua/keymap/helpers.lua @@ -13,7 +13,7 @@ end local _lazygit = nil _G._toggle_lazygit = function() - if vim.fn.executable("lazygit") then + if vim.fn.executable("lazygit") == 1 then if not _lazygit then _lazygit = require("toggleterm.terminal").Terminal:new({ cmd = "lazygit", diff --git a/lua/modules/configs/completion/lsp.lua b/lua/modules/configs/completion/lsp.lua index ba36d8cdc..4130ac8a8 100644 --- a/lua/modules/configs/completion/lsp.lua +++ b/lua/modules/configs/completion/lsp.lua @@ -93,7 +93,7 @@ return function() mason_lspconfig.setup_handlers({ mason_handler }) -- Set lsps that are not supported by `mason.nvim` but supported by `nvim-lspconfig` here. - if vim.fn.executable("dart") then + if vim.fn.executable("dart") == 1 then local _opts = require("completion.servers.dartls") local final_opts = vim.tbl_deep_extend("keep", _opts, opts) nvim_lsp.dartls.setup(final_opts) From 986be6e18683f02bb3ed2c5183de82efbca34345 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 17 May 2023 01:57:36 +0000 Subject: [PATCH 25/29] chore(lockfile): auto update lazy-lock.json --- lazy-lock.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 21c691931..8cae8d2f5 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -34,7 +34,7 @@ "indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" }, "lazy.nvim": { "branch": "main", "commit": "aba872ec78ffe7f7367764ab0fff6f0170421fde" }, "lsp_signature.nvim": { "branch": "master", "commit": "7a26ebaa7e36aa2aefa6c1994b2b866c96de32e6" }, - "lspsaga.nvim": { "branch": "main", "commit": "33d08e6b2f45933cb4dcd50cf19c47b7352d417b" }, + "lspsaga.nvim": { "branch": "main", "commit": "426df9972053422c24d38c6fc23f90e423091a79" }, "lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" }, "markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "90a8bbf106b85b76951a34c542058ffa807de2b1" }, @@ -43,19 +43,19 @@ "neodim": { "branch": "master", "commit": "89c16fccccfdb5b7e6ad3a6e8286736debc11705" }, "neoscroll.nvim": { "branch": "master", "commit": "d7601c26c8a183fa8994ed339e70c2d841253e93" }, "nord.nvim": { "branch": "master", "commit": "fab04b2dd4b64f4b1763b9250a8824d0b5194b8f" }, - "null-ls.nvim": { "branch": "main", "commit": "08bb00c7c2cd58c72e02cf54e4b9cbfe14b03e09" }, + "null-ls.nvim": { "branch": "main", "commit": "9fa0e8e7abae0a783c6bff6aecb485130e67bac6" }, "nvim-bufdel": { "branch": "main", "commit": "96c4f7ab053ddab0025bebe5f7c71e4795430e47" }, - "nvim-cmp": { "branch": "main", "commit": "d153771162bd9795d9f7142df5c674b61066a585" }, + "nvim-cmp": { "branch": "main", "commit": "41c60279948d5862b830eeff8c9bed16fe183c85" }, "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, "nvim-dap": { "branch": "master", "commit": "6cedcb527e264c8f25e86afa8dae74c6692dee51" }, "nvim-dap-ui": { "branch": "master", "commit": "4ce7b97dd8f50b4f672948a34bf8f3a56214fdb8" }, - "nvim-lspconfig": { "branch": "master", "commit": "37ec63fc48ffd2a627ab462224a115ecfb56ff4f" }, + "nvim-lspconfig": { "branch": "master", "commit": "30a232052b3e1c0c51d190d5f5a12ad9b42c5ebc" }, "nvim-notify": { "branch": "master", "commit": "f3024b912073774111202f5fa6518b0cd2a74432" }, "nvim-scrollview": { "branch": "main", "commit": "4a04039b80c270f6bd2075935cd3c7943f6ad140" }, "nvim-tree.lua": { "branch": "master", "commit": "736c7ff59065275f0483af4b7f07a9bc41449ad0" }, "nvim-treehopper": { "branch": "master", "commit": "5a28bff46c05d28bdb4bcaef67e046eb915a9390" }, - "nvim-treesitter": { "branch": "master", "commit": "27079f70603c9d8a002635acfb95db33318e4eef" }, - "nvim-treesitter-context": { "branch": "master", "commit": "f24a86c32238867f24fbff49913db0068f8488d2" }, + "nvim-treesitter": { "branch": "master", "commit": "d2b78324f2191db72e9bc063ff435278c36bf06b" }, + "nvim-treesitter-context": { "branch": "master", "commit": "8b6739053afdd49d4e243781615e21f3b29502fa" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "35a60f093fa15a303874975f963428a5cd24e4a0" }, "nvim-ts-autotag": { "branch": "main", "commit": "40615e96075c743ef47aaf9de966dc348bec6459" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "0bf8fbc2ca8f8cdb6efbd0a9e32740d7a991e4c3" }, @@ -76,7 +76,7 @@ "telescope-live-grep-args.nvim": { "branch": "master", "commit": "0f75ea809c46af8997c64f49c52e3c641d887885" }, "telescope-undo.nvim": { "branch": "main", "commit": "231b5ebb4328d2768c830c9a8d1b9c696116848d" }, "telescope-zoxide": { "branch": "main", "commit": "68966349aa1b8e9ade403e18479ecf79447389a7" }, - "telescope.nvim": { "branch": "master", "commit": "ebf93395e79e5d026e3867d9e5e158b2bbe1499c" }, + "telescope.nvim": { "branch": "master", "commit": "40c31fdde93bcd85aeb3447bb3e2a3208395a868" }, "toggleterm.nvim": { "branch": "main", "commit": "68fdf851c2b7901a7065ff129b77d3483419ddce" }, "trouble.nvim": { "branch": "main", "commit": "d56bfc0c501ced4002a57cb60433362fb2ce9c4d" }, "vim-cool": { "branch": "master", "commit": "80536b9f2e23292708a64f2e7bcf5e596f9faf24" }, From fff57e1202abf01240d36bd182733937b1256959 Mon Sep 17 00:00:00 2001 From: groveer Date: Wed, 17 May 2023 21:15:25 +0800 Subject: [PATCH 26/29] chore(keymap): move gitsigns's keymap to keymap/ui.lua (#748) --- lua/keymap/ui.lua | 79 +++++++++++++++++++++++++++++ lua/modules/configs/ui/gitsigns.lua | 76 +-------------------------- 2 files changed, 81 insertions(+), 74 deletions(-) diff --git a/lua/keymap/ui.lua b/lua/keymap/ui.lua index bccf4e5a5..d52e6b289 100644 --- a/lua/keymap/ui.lua +++ b/lua/keymap/ui.lua @@ -24,3 +24,82 @@ local plug_map = { } bind.nvim_load_mapping(plug_map) + +local mapping = {} + +function mapping.gitsigns(buf) + local actions = require("gitsigns.actions") + local map = { + ["n|]g"] = bind.map_callback(function() + if vim.wo.diff then + return "]g" + end + vim.schedule(function() + actions.next_hunk() + end) + return "" + end) + :with_buffer(buf) + :with_expr() + :with_desc("git: Goto next hunk"), + ["n|[g"] = bind.map_callback(function() + if vim.wo.diff then + return "[g" + end + vim.schedule(function() + actions.prev_hunk() + end) + return "" + end) + :with_buffer(buf) + :with_expr() + :with_desc("git: Goto prev hunk"), + ["n|hs"] = bind.map_callback(function() + actions.stage_hunk() + end) + :with_buffer(buf) + :with_desc("git: Stage hunk"), + ["v|hs"] = bind.map_callback(function() + actions.stage_hunk({ vim.fn.line("."), vim.fn.line("v") }) + end) + :with_buffer(buf) + :with_desc("git: Stage hunk"), + ["n|hu"] = bind.map_callback(function() + actions.undo_stage_hunk() + end) + :with_buffer(buf) + :with_desc("git: Undo stage hunk"), + ["n|hr"] = bind.map_callback(function() + actions.reset_hunk() + end) + :with_buffer(buf) + :with_desc("git: Reset hunk"), + ["v|hr"] = bind.map_callback(function() + actions.reset_hunk({ vim.fn.line("."), vim.fn.line("v") }) + end) + :with_buffer(buf) + :with_desc("git: Reset hunk"), + ["n|hR"] = bind.map_callback(function() + actions.reset_buffer() + end) + :with_buffer(buf) + :with_desc("git: Reset buffer"), + ["n|hp"] = bind.map_callback(function() + actions.preview_hunk() + end) + :with_buffer(buf) + :with_desc("git: Preview hunk"), + ["n|hb"] = bind.map_callback(function() + actions.blame_line({ full = true }) + end) + :with_buffer(buf) + :with_desc("git: Blame line"), + -- Text objects + ["ox|ih"] = bind.map_callback(function() + actions.text_object() + end):with_buffer(buf), + } + bind.nvim_load_mapping(map) +end + +return mapping diff --git a/lua/modules/configs/ui/gitsigns.lua b/lua/modules/configs/ui/gitsigns.lua index 97ea8ebe8..cefc4712c 100644 --- a/lua/modules/configs/ui/gitsigns.lua +++ b/lua/modules/configs/ui/gitsigns.lua @@ -1,4 +1,5 @@ return function() + local mapping = require("keymap.ui") require("gitsigns").setup({ signs = { add = { @@ -32,80 +33,7 @@ return function() linehl = "GitSignsChangeLn", }, }, - on_attach = function(bufnr) - local bind = require("keymap.bind") - - bind.nvim_load_mapping({ - ["n|]g"] = bind.map_callback(function() - if vim.wo.diff then - return "]g" - end - vim.schedule(function() - require("gitsigns.actions").next_hunk() - end) - return "" - end) - :with_buffer(bufnr) - :with_expr() - :with_desc("git: Goto next hunk"), - ["n|[g"] = bind.map_callback(function() - if vim.wo.diff then - return "[g" - end - vim.schedule(function() - require("gitsigns.actions").prev_hunk() - end) - return "" - end) - :with_buffer(bufnr) - :with_expr() - :with_desc("git: Goto prev hunk"), - ["n|hs"] = bind.map_callback(function() - require("gitsigns.actions").stage_hunk() - end) - :with_buffer(bufnr) - :with_desc("git: Stage hunk"), - ["v|hs"] = bind.map_callback(function() - require("gitsigns.actions").stage_hunk({ vim.fn.line("."), vim.fn.line("v") }) - end) - :with_buffer(bufnr) - :with_desc("git: Stage hunk"), - ["n|hu"] = bind.map_callback(function() - require("gitsigns.actions").undo_stage_hunk() - end) - :with_buffer(bufnr) - :with_desc("git: Undo stage hunk"), - ["n|hr"] = bind.map_callback(function() - require("gitsigns.actions").reset_hunk() - end) - :with_buffer(bufnr) - :with_desc("git: Reset hunk"), - ["v|hr"] = bind.map_callback(function() - require("gitsigns.actions").reset_hunk({ vim.fn.line("."), vim.fn.line("v") }) - end) - :with_buffer(bufnr) - :with_desc("git: Reset hunk"), - ["n|hR"] = bind.map_callback(function() - require("gitsigns.actions").reset_buffer() - end) - :with_buffer(bufnr) - :with_desc("git: Reset buffer"), - ["n|hp"] = bind.map_callback(function() - require("gitsigns.actions").preview_hunk() - end) - :with_buffer(bufnr) - :with_desc("git: Preview hunk"), - ["n|hb"] = bind.map_callback(function() - require("gitsigns.actions").blame_line({ full = true }) - end) - :with_buffer(bufnr) - :with_desc("git: Blame line"), - -- Text objects - ["ox|ih"] = bind.map_callback(function() - require("gitsigns.actions").text_object() - end):with_buffer(bufnr), - }) - end, + on_attach = mapping.gitsigns, watch_gitdir = { interval = 1000, follow_files = true }, current_line_blame = true, current_line_blame_opts = { delay = 1000, virtual_text_pos = "eol" }, From 0f79d017ddbfbbe651cd96364418f4c8b32cca20 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 18 May 2023 01:56:07 +0000 Subject: [PATCH 27/29] chore(lockfile): auto update lazy-lock.json --- lazy-lock.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 8cae8d2f5..3d80a041f 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -32,30 +32,30 @@ "gitsigns.nvim": { "branch": "main", "commit": "814158f6c4b1724c039fcefe79b0be72c9131c2d" }, "hop.nvim": { "branch": "v2", "commit": "90db1b2c61b820e230599a04fedcd2679e64bd07" }, "indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" }, - "lazy.nvim": { "branch": "main", "commit": "aba872ec78ffe7f7367764ab0fff6f0170421fde" }, + "lazy.nvim": { "branch": "main", "commit": "53e1c49baed4009eccf103dbc77fcb06255019d8" }, "lsp_signature.nvim": { "branch": "master", "commit": "7a26ebaa7e36aa2aefa6c1994b2b866c96de32e6" }, "lspsaga.nvim": { "branch": "main", "commit": "426df9972053422c24d38c6fc23f90e423091a79" }, "lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" }, "markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "90a8bbf106b85b76951a34c542058ffa807de2b1" }, "mason-null-ls.nvim": { "branch": "main", "commit": "54d702020bf94e4eefd357f0b738317af30217eb" }, - "mason.nvim": { "branch": "main", "commit": "e634134312bb936f472468a401c9cae6485ab54b" }, + "mason.nvim": { "branch": "main", "commit": "e60b855bfa8c7d34387200daa6e54a5e22d3da05" }, "neodim": { "branch": "master", "commit": "89c16fccccfdb5b7e6ad3a6e8286736debc11705" }, "neoscroll.nvim": { "branch": "master", "commit": "d7601c26c8a183fa8994ed339e70c2d841253e93" }, "nord.nvim": { "branch": "master", "commit": "fab04b2dd4b64f4b1763b9250a8824d0b5194b8f" }, - "null-ls.nvim": { "branch": "main", "commit": "9fa0e8e7abae0a783c6bff6aecb485130e67bac6" }, + "null-ls.nvim": { "branch": "main", "commit": "77e53bc3bac34cc273be8ed9eb9ab78bcf67fa48" }, "nvim-bufdel": { "branch": "main", "commit": "96c4f7ab053ddab0025bebe5f7c71e4795430e47" }, - "nvim-cmp": { "branch": "main", "commit": "41c60279948d5862b830eeff8c9bed16fe183c85" }, + "nvim-cmp": { "branch": "main", "commit": "3ac8d6cd29c74ff482d8ea47d45e5081bfc3f5ad" }, "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, - "nvim-dap": { "branch": "master", "commit": "6cedcb527e264c8f25e86afa8dae74c6692dee51" }, + "nvim-dap": { "branch": "master", "commit": "56118cee6af15cb9ddba9d080880949d8eeb0c9f" }, "nvim-dap-ui": { "branch": "master", "commit": "4ce7b97dd8f50b4f672948a34bf8f3a56214fdb8" }, - "nvim-lspconfig": { "branch": "master", "commit": "30a232052b3e1c0c51d190d5f5a12ad9b42c5ebc" }, + "nvim-lspconfig": { "branch": "master", "commit": "8dc45a5c142f0b5a5dd34e5cdba33217d5dc6a86" }, "nvim-notify": { "branch": "master", "commit": "f3024b912073774111202f5fa6518b0cd2a74432" }, "nvim-scrollview": { "branch": "main", "commit": "4a04039b80c270f6bd2075935cd3c7943f6ad140" }, "nvim-tree.lua": { "branch": "master", "commit": "736c7ff59065275f0483af4b7f07a9bc41449ad0" }, "nvim-treehopper": { "branch": "master", "commit": "5a28bff46c05d28bdb4bcaef67e046eb915a9390" }, - "nvim-treesitter": { "branch": "master", "commit": "d2b78324f2191db72e9bc063ff435278c36bf06b" }, - "nvim-treesitter-context": { "branch": "master", "commit": "8b6739053afdd49d4e243781615e21f3b29502fa" }, + "nvim-treesitter": { "branch": "master", "commit": "102f1b2f55575f0a2f18be92eafc0e7142024ad1" }, + "nvim-treesitter-context": { "branch": "master", "commit": "c8f3a62c64bf6f9fed11260a424207f780505f83" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "35a60f093fa15a303874975f963428a5cd24e4a0" }, "nvim-ts-autotag": { "branch": "main", "commit": "40615e96075c743ef47aaf9de966dc348bec6459" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "0bf8fbc2ca8f8cdb6efbd0a9e32740d7a991e4c3" }, From 41262de69c0cfbd528deed2676c202c1cb5c0bfc Mon Sep 17 00:00:00 2001 From: groveer Date: Thu, 18 May 2023 23:47:31 +0800 Subject: [PATCH 28/29] feat: add `FormatToggle` keymap (#750) (#751) * feat: add `FormatToggle` keymap (#750) * remove reduntant note. --------- Co-authored-by: ayamir --- lua/keymap/completion.lua | 7 ++++++- lua/modules/configs/completion/formatting.lua | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lua/keymap/completion.lua b/lua/keymap/completion.lua index 953e4c770..b4cbe025f 100644 --- a/lua/keymap/completion.lua +++ b/lua/keymap/completion.lua @@ -1,9 +1,14 @@ local bind = require("keymap.bind") local map_cr = bind.map_cr local map_cu = bind.map_cu --- local map_cmd = bind.map_cmd +local map_cmd = bind.map_cmd local map_callback = bind.map_callback +local plug_map = { + ["n|"] = map_cmd("FormatToggle"):with_noremap():with_desc("Formater: Toggle format on save"), +} +bind.nvim_load_mapping(plug_map) + local mapping = {} function mapping.lsp(buf) diff --git a/lua/modules/configs/completion/formatting.lua b/lua/modules/configs/completion/formatting.lua index 42dfe4c3d..4204e9ed5 100644 --- a/lua/modules/configs/completion/formatting.lua +++ b/lua/modules/configs/completion/formatting.lua @@ -54,9 +54,9 @@ function M.enable_format_on_save(is_configured) end end -function M.disable_format_on_save() +function M.disable_format_on_save(is_configured) pcall(vim.api.nvim_del_augroup_by_name, "format_on_save") - if format_on_save then + if not is_configured then vim.notify( "Successfully disabled format-on-save", vim.log.levels.INFO, @@ -69,7 +69,7 @@ function M.configure_format_on_save() if format_on_save then M.enable_format_on_save(true) else - M.disable_format_on_save() + M.disable_format_on_save(true) end end @@ -81,7 +81,7 @@ function M.toggle_format_on_save() if not status then M.enable_format_on_save(false) else - M.disable_format_on_save() + M.disable_format_on_save(false) end end From 32cc577cefecfb9adf15f52fc1d8a5c100ae6476 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 19 May 2023 01:56:26 +0000 Subject: [PATCH 29/29] chore(lockfile): auto update lazy-lock.json --- lazy-lock.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 3d80a041f..2b8386856 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -8,7 +8,7 @@ "better-escape.nvim": { "branch": "master", "commit": "7031dc734add47bb71c010e0551829fa5799375f" }, "bigfile.nvim": { "branch": "main", "commit": "a34e42616c20bfd52943ed5d6632bb28d22b057e" }, "bufferline.nvim": { "branch": "main", "commit": "1952c33e425ede785d26aa9e250addfe304a8510" }, - "catppuccin": { "branch": "main", "commit": "57b421ee5f7380f816791fa451e86f213b625ece" }, + "catppuccin": { "branch": "main", "commit": "8338b02e9a8ffcb999520de7f15943712618760f" }, "clever-f.vim": { "branch": "master", "commit": "6a3ac5e3688598af9411ab741737f98c47370c22" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-latex-symbols": { "branch": "main", "commit": "165fb66afdbd016eaa1570e41672c4c557b57124" }, @@ -24,7 +24,7 @@ "copilot.lua": { "branch": "master", "commit": "653bbdc44cd569a5fd0617e5a9d3df2b1359e230" }, "crates.nvim": { "branch": "main", "commit": "dca1949b0405c6ee5173d0627a523a10a63eca3c" }, "csv.vim": { "branch": "master", "commit": "15ff93edf5b26c466affbb356e0696b7d6a3b499" }, - "diffview.nvim": { "branch": "main", "commit": "1fc42e67dfb2da7946edbc9a30cb98ed371b8dde" }, + "diffview.nvim": { "branch": "main", "commit": "7987d7f5c9ca3838ef950053b6d00c4251efadb0" }, "edge": { "branch": "master", "commit": "358cb6688ac577470a4eafcb53bdd63899dfc937" }, "fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" }, "friendly-snippets": { "branch": "main", "commit": "1d0dac346de7c6895ac72528df3276386c6b149b" }, @@ -32,14 +32,14 @@ "gitsigns.nvim": { "branch": "main", "commit": "814158f6c4b1724c039fcefe79b0be72c9131c2d" }, "hop.nvim": { "branch": "v2", "commit": "90db1b2c61b820e230599a04fedcd2679e64bd07" }, "indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" }, - "lazy.nvim": { "branch": "main", "commit": "53e1c49baed4009eccf103dbc77fcb06255019d8" }, + "lazy.nvim": { "branch": "main", "commit": "6d4135d83d00f83a797dfe0f93a8d3fce08e6a2f" }, "lsp_signature.nvim": { "branch": "master", "commit": "7a26ebaa7e36aa2aefa6c1994b2b866c96de32e6" }, - "lspsaga.nvim": { "branch": "main", "commit": "426df9972053422c24d38c6fc23f90e423091a79" }, + "lspsaga.nvim": { "branch": "main", "commit": "505da68c1f552f8919751cfc6e3bd740f26f4e46" }, "lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" }, "markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "90a8bbf106b85b76951a34c542058ffa807de2b1" }, "mason-null-ls.nvim": { "branch": "main", "commit": "54d702020bf94e4eefd357f0b738317af30217eb" }, - "mason.nvim": { "branch": "main", "commit": "e60b855bfa8c7d34387200daa6e54a5e22d3da05" }, + "mason.nvim": { "branch": "main", "commit": "08b2fd308e0107eab9f0b59d570b69089fd0b522" }, "neodim": { "branch": "master", "commit": "89c16fccccfdb5b7e6ad3a6e8286736debc11705" }, "neoscroll.nvim": { "branch": "master", "commit": "d7601c26c8a183fa8994ed339e70c2d841253e93" }, "nord.nvim": { "branch": "master", "commit": "fab04b2dd4b64f4b1763b9250a8824d0b5194b8f" }, @@ -49,12 +49,12 @@ "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, "nvim-dap": { "branch": "master", "commit": "56118cee6af15cb9ddba9d080880949d8eeb0c9f" }, "nvim-dap-ui": { "branch": "master", "commit": "4ce7b97dd8f50b4f672948a34bf8f3a56214fdb8" }, - "nvim-lspconfig": { "branch": "master", "commit": "8dc45a5c142f0b5a5dd34e5cdba33217d5dc6a86" }, + "nvim-lspconfig": { "branch": "master", "commit": "5c1dba3bf96161453ba91883c2606dfe9400d78c" }, "nvim-notify": { "branch": "master", "commit": "f3024b912073774111202f5fa6518b0cd2a74432" }, "nvim-scrollview": { "branch": "main", "commit": "4a04039b80c270f6bd2075935cd3c7943f6ad140" }, "nvim-tree.lua": { "branch": "master", "commit": "736c7ff59065275f0483af4b7f07a9bc41449ad0" }, "nvim-treehopper": { "branch": "master", "commit": "5a28bff46c05d28bdb4bcaef67e046eb915a9390" }, - "nvim-treesitter": { "branch": "master", "commit": "102f1b2f55575f0a2f18be92eafc0e7142024ad1" }, + "nvim-treesitter": { "branch": "master", "commit": "a02a06a068f92ec0e4cc0490afdc76bf4fcc407b" }, "nvim-treesitter-context": { "branch": "master", "commit": "c8f3a62c64bf6f9fed11260a424207f780505f83" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "35a60f093fa15a303874975f963428a5cd24e4a0" }, "nvim-ts-autotag": { "branch": "main", "commit": "40615e96075c743ef47aaf9de966dc348bec6459" }, @@ -77,14 +77,14 @@ "telescope-undo.nvim": { "branch": "main", "commit": "231b5ebb4328d2768c830c9a8d1b9c696116848d" }, "telescope-zoxide": { "branch": "main", "commit": "68966349aa1b8e9ade403e18479ecf79447389a7" }, "telescope.nvim": { "branch": "master", "commit": "40c31fdde93bcd85aeb3447bb3e2a3208395a868" }, - "toggleterm.nvim": { "branch": "main", "commit": "68fdf851c2b7901a7065ff129b77d3483419ddce" }, + "toggleterm.nvim": { "branch": "main", "commit": "26f16d3bab1761d0d11117a8e431faba11a1b865" }, "trouble.nvim": { "branch": "main", "commit": "d56bfc0c501ced4002a57cb60433362fb2ce9c4d" }, "vim-cool": { "branch": "master", "commit": "80536b9f2e23292708a64f2e7bcf5e596f9faf24" }, "vim-easy-align": { "branch": "master", "commit": "12dd6316974f71ce333e360c0260b4e1f81169c3" }, "vim-fugitive": { "branch": "master", "commit": "5f0d280b517cacb16f59316659966c7ca5e2bea2" }, - "vim-go": { "branch": "master", "commit": "a494378f6c106a97e39c62b493c14476f9f7de4f" }, + "vim-go": { "branch": "master", "commit": "2a874910a242fd4a5da021ea32fb1cde3b69f79b" }, "vim-illuminate": { "branch": "master", "commit": "a2907275a6899c570d16e95b9db5fd921c167502" }, - "vim-matchup": { "branch": "master", "commit": "6c8909b682803d8c3a054259079f158a73a0e30f" }, + "vim-matchup": { "branch": "master", "commit": "b8eca3b588e41e0bb1b3ae200fae88183b91a76d" }, "which-key.nvim": { "branch": "main", "commit": "5a6c954a5a46023c19acc03a8b6d7c3e57964fc5" }, "wilder.nvim": { "branch": "master", "commit": "679f348dc90d80ff9ba0e7c470c40a4d038dcecf" } } \ No newline at end of file