♻️ refactor(nvim): use Lazyvim notify api instead of neovim vim.notify

This commit is contained in:
Sergio Laín 2024-05-27 16:28:13 +02:00
parent 19782b342b
commit eca8325ec5
No known key found for this signature in database
GPG key ID: FB00AF7015FFE76B
3 changed files with 4 additions and 4 deletions

View file

@ -124,7 +124,7 @@ local linters = function()
local buf_linters = {} local buf_linters = {}
if not linters_attached then if not linters_attached then
vim.notify("No linters attached", vim.log.levels.WARN, { title = "Linter" }) LazyVim.warn("No linters attached", { title = "Linter" })
return return
end end
@ -135,7 +135,7 @@ local linters = function()
local unique_client_names = table.concat(buf_linters, ", ") local unique_client_names = table.concat(buf_linters, ", ")
local linters = string.format("%s", unique_client_names) local linters = string.format("%s", unique_client_names)
vim.notify(linters, vim.log.levels.INFO, { title = "Linter" }) LazyVim.notify(linters, { title = "Linter" })
end end
map("n", "<leader>ciL", linters, { desc = "Lint" }) map("n", "<leader>ciL", linters, { desc = "Lint" })
map("n", "<leader>cir", "<cmd>LazyRoot<cr>", { desc = "Root" }) map("n", "<leader>cir", "<cmd>LazyRoot<cr>", { desc = "Root" })

View file

@ -37,5 +37,5 @@ if vim.fn.has("nvim-0.10") == 1 then
}, },
} }
else 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 end

View file

@ -8,7 +8,7 @@ return {
"<leader>qS", "<leader>qS",
function() function()
p.save() p.save()
vim.notify("Session Saved", vim.log.levels.INFO, { title = "Persistence" }) LazyVim.notify("Session Saved", { title = "Persistence" })
end, end,
desc = "Save Session", desc = "Save Session",
}, },