From eca8325ec5002f24258c18d4c0f49c6e3b8a061f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Mon, 27 May 2024 16:28:13 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(nvim):=20use=20La?= =?UTF-8?q?zyvim=20notify=20api=20instead=20of=20neovim=20vim.notify?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/nvim/lua/config/keymaps.lua | 4 ++-- .../nvim/lua/plugins/extras/editor/treesitter-playground.lua | 2 +- .config/nvim/lua/plugins/extras/lazyvim/persistence.lua | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.config/nvim/lua/config/keymaps.lua b/.config/nvim/lua/config/keymaps.lua index 55ef06a7..d2cb0685 100644 --- a/.config/nvim/lua/config/keymaps.lua +++ b/.config/nvim/lua/config/keymaps.lua @@ -124,7 +124,7 @@ local linters = function() local buf_linters = {} if not linters_attached then - vim.notify("No linters attached", vim.log.levels.WARN, { title = "Linter" }) + LazyVim.warn("No linters attached", { title = "Linter" }) return end @@ -135,7 +135,7 @@ local linters = function() local unique_client_names = table.concat(buf_linters, ", ") local linters = string.format("%s", unique_client_names) - vim.notify(linters, vim.log.levels.INFO, { title = "Linter" }) + LazyVim.notify(linters, { title = "Linter" }) end map("n", "ciL", linters, { desc = "Lint" }) map("n", "cir", "LazyRoot", { desc = "Root" }) diff --git a/.config/nvim/lua/plugins/extras/editor/treesitter-playground.lua b/.config/nvim/lua/plugins/extras/editor/treesitter-playground.lua index be835ba5..b3741c5d 100644 --- a/.config/nvim/lua/plugins/extras/editor/treesitter-playground.lua +++ b/.config/nvim/lua/plugins/extras/editor/treesitter-playground.lua @@ -37,5 +37,5 @@ if vim.fn.has("nvim-0.10") == 1 then }, } else - vim.notify("Treesitter Playground only works with the nightly build") + LazyVim.notify("Treesitter Playground only works with the nightly build", { title = "Treesitter Playground" }) end diff --git a/.config/nvim/lua/plugins/extras/lazyvim/persistence.lua b/.config/nvim/lua/plugins/extras/lazyvim/persistence.lua index b9193e51..2d25d580 100644 --- a/.config/nvim/lua/plugins/extras/lazyvim/persistence.lua +++ b/.config/nvim/lua/plugins/extras/lazyvim/persistence.lua @@ -8,7 +8,7 @@ return { "qS", function() p.save() - vim.notify("Session Saved", vim.log.levels.INFO, { title = "Persistence" }) + LazyVim.notify("Session Saved", { title = "Persistence" }) end, desc = "Save Session", },