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:
@@ -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())
|
||||
|
||||
9
lua/config/nvim-notify.lua
Normal file
9
lua/config/nvim-notify.lua
Normal 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
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user