1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

nvim-notify update

This commit is contained in:
jdhao
2021-10-18 22:32:38 +08:00
parent 30ca579ee9
commit 6464539399
7 changed files with 18 additions and 9 deletions

View File

@@ -62,8 +62,7 @@ local custom_attach = function(client, bufnr)
end
local msg = string.format("Language server %s started!", client.name)
vim.api.nvim_echo({ { msg, "MoreMsg" } }, false, {})
-- vim.notify(msg, 'info', {title = 'Nvim-config', timeout = 2500})
vim.notify(msg, 'info', {title = 'Nvim-config'})
end
capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())

View File

@@ -0,0 +1,9 @@
local nvim_notify = require("notify")
nvim_notify.setup({
-- Animation style
stages = "fade_in_slide_out",
-- Default timeout for notifications
timeout = 1500,
})
vim.notify = nvim_notify

View File

@@ -132,7 +132,7 @@ require("packer").startup({
use({"itchyny/vim-highlighturl", event = "VimEnter"})
-- notification plugin
use({ "rcarriga/nvim-notify", event = "VimEnter", config = 'vim.notify = require("notify")' })
use({ "rcarriga/nvim-notify", event = "BufEnter", config = [[require('config.nvim-notify')]] })
-- For Windows and Mac, we can open an URL in the browser. For Linux, it may
-- not be possible since we maybe in a server which disables GUI.