Git Product home page Git Product logo

notifier.nvim's Introduction

Hey there !

I am Thomas, a CS student mainly interested in software security, low-level programming, and programing language theory !

As a low-level enthusiast, I tend to like minimalistic tools, and I happen to have a Gopher hole open at vigoux.giize.com, so grab your favorite gopher browser, and come to the dark side ! I happen to maintain some things on a self hosted git server too, which is over at vigoux.giize.com.

My neovim config is available here

Wanna chat ?

You can send me an email if you want to ask anything private, or in a secure manner.

Otherwise if you want to chat, I usually hang around my personnal channel ##vigoux_lair on libera.chat

I am almost always connected on nvim-treesitter's Zulip.

I am also hanging around in the #neovim:matrix.org channel.

Wanna help me a bit ?

First, thank you very much !

You can click on the little sponsor icon on the left, that'll help me a lot !

Also, if you are a Brave user, you can send me some BATs (I am a verified creator) !

My metrics

Metrics

notifier.nvim's People

Contributors

folke avatar fymyte avatar odrling avatar vigoux avatar williamboman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

notifier.nvim's Issues

Error "E565: Not allowed to change text or change window"

I have this random error, I don't know how it happens ¯_(ツ)_/¯

Error executing lua callback: .../pack/packer/start/notifier.nvim/lua/notifier/status.lua:80: E565: Not allowed to change text or change window                                                                                                                                             
stack traceback:                                                                                                                                                                                                                                                                            
        [C]: in function 'nvim_win_close'                                                                                                                                                                                                                                                   
        .../pack/packer/start/notifier.nvim/lua/notifier/status.lua:80: in function '_delete_win'                                                                                                                                                                                           
        .../pack/packer/start/notifier.nvim/lua/notifier/status.lua:217: in function 'redraw'                                                                                                                                                                                               
        .../pack/packer/start/notifier.nvim/lua/notifier/status.lua:273: in function 'pop'                                                                                                                                                                                                  
        .../pack/packer/start/notifier.nvim/lua/notifier/status.lua:283: in function 'handle'                                                                                                                                                                                               
        ...te/pack/packer/start/notifier.nvim/lua/notifier/init.lua:64: in function <...te/pack/packer/start/notifier.nvim/lua/notifier/init.lua:60>                                                                                                                                        
        [C]: in function 'nvim_exec_autocmds'                                                                                                                                                                                                                                               
        ...im4CQimE/usr/share/nvim/runtime/lua/vim/lsp/handlers.lua:64: in function 'handler'                                                                                                                                                                                               
        ...te/pack/packer/start/null-ls.nvim/lua/null-ls/client.lua:238: in function <...te/pack/packer/start/null-ls.nvim/lua/null-ls/client.lua:237>                                                                                                                                      

Write to `:messages`

Kind of related to #11.

By default vim.notify writes to :messages as well, so users can use :messages or something like tpope/vim-scriptease to read notifications again. However, vim.notify uses nvim_echo to display messages and write to :messages, so if nvim_echo is used to write to :messages messages will be duplicated.

Is there a way to write to :messages directly?

"String cannot contain newlines" error when running `range_code_action`

I've encoutered this error running a range_code_action.
I can try to create a PR to fix it if you want ?

E5108: Error executing lua .../pack/packer/start/notifier.nvim/lua/notifier/status.lua:151: String cannot contain newlines                                                                                                                                                                  
stack traceback:                                                                                                                                                                                                                                                                            
        [C]: in function 'nvim_buf_set_lines'                                                                                                                                                                                                                                               
        .../pack/packer/start/notifier.nvim/lua/notifier/status.lua:151: in function 'redraw'                                                                                                                                                                                               
        .../pack/packer/start/notifier.nvim/lua/notifier/status.lua:212: in function 'push'                                                                                                                                                                                                 
        ...te/pack/packer/start/notifier.nvim/lua/notifier/init.lua:16: in function 'notify'                                                                                                                                                                                                
        ...te/pack/packer/start/notifier.nvim/lua/notifier/init.lua:48: in function 'notify'                                                                                                                                                                                                
        vim/_editor.lua: in function 'notify_once'                                                                                                                                                                                                                                          
        vim/_editor.lua: in function 'deprecate'                                                                                                                                                                                                                                            
        ...nt_nvimfOuQRg/usr/share/nvim/runtime/lua/vim/lsp/buf.lua:928: in function 'range_code_action'                                                                                                                                                                                    
        [string ":lua"]:1: in main chunk    

Support for optional icons

I know it’s not a documented nor default thing, but nvim-notify has this opts.icon support that is quite nice, and I think you should also support it (I set it my plugins / configuration / shortcuts so it feels like a feature loss to me). And you already read the title so… :)

Entering command-line window while loading workspace results in an error

Steps to reproduce:

  1. Open a workspace file (So it shows the "Loading workspace" indication)
  2. Press q: to go inside the command-line window while the workspace is still loading
  3. The following error will appear once or more:
Error detected while processing User Autocommands for "LspProgressUpdate":                                                                                 
Error executing lua callback: ...site/pack/lazy/opt/notifier.nvim/lua/notifier/status.lua:80: E11: Invalid in command-line window; <CR> executes, CTRL-C qu
its                                                                                                                                                        
stack traceback:                                                                                                                                           
        [C]: in function 'nvim_win_close'                                                                                                                  
        ...site/pack/lazy/opt/notifier.nvim/lua/notifier/status.lua:80: in function '_delete_win'                                                          
        ...site/pack/lazy/opt/notifier.nvim/lua/notifier/status.lua:258: in function 'redraw'                                                              
        ...site/pack/lazy/opt/notifier.nvim/lua/notifier/status.lua:314: in function 'pop'                                                                 
        ...site/pack/lazy/opt/notifier.nvim/lua/notifier/status.lua:324: in function 'handle'                                                              
        ...m/site/pack/lazy/opt/notifier.nvim/lua/notifier/init.lua:91: in function <...m/site/pack/lazy/opt/notifier.nvim/lua/notifier/init.lua:87>       
        [C]: in function 'nvim_exec_autocmds'                                                                                                              
        /usr/share/nvim/runtime/lua/vim/lsp/handlers.lua:64: in function 'handler'                                                                         
        /usr/share/nvim/runtime/lua/vim/lsp.lua:1049: in function ''                                                                                       
        vim/_editor.lua: in function <vim/_editor.lua:0>

The "Loading workspace" indicator is then permanently stuck.

Can't quit because of unwritten buffer

Hi,

I need to apologise for vague issue, I am not able to replicate it as it only happens now and then. I am not sure what causes it but sometimes when I try to quit nvim with :wqa I get an error saying that [No name] buffer is modified and not saved preventing nvim from quitting. When I open buffer mentioned in error message I can see its content being one of messages that were displayed in notifier.nvim's window.

Did you ever come across it? Any idea how I could try to replicate it and provide you with more details?

Thanks!

Very long notifications

Currently, very long notifications get truncated and there is no way to read them to the end.
Can notifications be displayed on multiple lines if they are too long?

I can try to implement this myself. However, I'd like to get some guidance on how to better approach this.

Disable null ls notifications

Hello,

Is there way to disable null-ls(none-ls) notifications? The plugin triggers when formatting a file and I want to disable/ignore everything related to null-ls. Currently my setup is as follows

require("notifier").setup({
  components = { "lsp" },
})

Using notifier.notify without component nvim

for _, compname in ipairs(cfg.config.components) do

If you don't configure any components, message sent through notifier.notify will never be displayed.

Reason I dont want to confiure vim.notify, is because Noice itself can also be vim.notify, which makes it easy to route any messages to different views, like notify or notifier based on filters.

I'm willing to make a PR to make this works, but not sure what the best way would be. Any suggestions?

Open the quickfix window in `NotifierReplay!`

NotifierReplay! with a bang should open the quickfix window. In this way it will be analogous to :messages, letting users read the error messages in the replay at their leisure.

Account for right panel like nvim-tree

I use nvim-tree on the right side, and what happens is that notifier will overlap with it, when it display notifications.
Is it possible to configure the offset from the right edge of the screen?

  • In lualine I'm doing this to account for the file tree:
local nvim_tree_shift = {
  function()
    local empty_space = string.rep(" ", vim.api.nvim_win_get_width(tree_view.get_winnr())
    return empty_space
  end,
  cond = require("nvim-tree").view.is_visible,
}
  • In bufferline (which I don't use) they do it this way:
>
    offsets = {
        {
            filetype = "NvimTree",
            text = "File Explorer",
            highlight = "Directory"
            separator = true -- use a "true" to enable the default, or set your own character
        }
    }
<

The `filetype` is used to check whether a particular window is a match, the
`text` is *optional* and will show above the window if specified.

I like this approach.

WDYT?

Error message at startup

E5108: Error executing lua .../pack/packer/start/notifier.nvim/lua/notifier/config.lua:70: 'bg' is not a valid color

Error occurs on Neovim v0.7.2 & v0.8.0-dev-973-g253f0ffd8

Allow to replace notifications belonging to the same group

Hi @vigoux

I was wondering, if you could add support to enable message replacement for the nvim component as you have for the lsp one.

I locally modify init.lua replacing:

status.push("nvim", { mandat = msg, title = opts.title, icon = opts.icon })

with

    if opts.group and opts.done then
      status.pop("lsp", opts.group)
    elseif opts.group then
      status.push("lsp", { mandat = msg, title = opts.title, dim = true }, opts.group)
    else
      status.push("nvim", { mandat = msg, title = opts.title, icon = opts.icon })
    end

So I can group notifications using vim.notify(msg, level, { group = "foo" }. Sorry, for not sending a PR but havent used Teal ever :( Also, I was not sure you were ok with this change.

Thanks for yet another great neovim contribution!

lazy load on `vim.notify`

Since there is no discussions section in this repo, I am asking a question as an issue, so apologies in advance!

I am trying to switch to this plugin from nvim-notify, not a fan of popups!

I use the following somewhere in my config: vim.notify = require("notify") when i use nvim-notify. That way I can lazy load nvim-notify with packer using module = "notify", and have it loaded on vim.notify calls.

How do I do something similar with this plugin? I can of course do module = "notifier" but that does not allow it to be lazy loaded when some function calls vim.notify.

Basically any method that allows me to lazy load this plugin on vim.notify calls?

Truncating senders name

Hi there. I have noticed that sender name gets truncated, for example I will see sumneko_lu, but would like to see the whole string. How could I achieve that?

Thanks!

Feature request

I typically send things down to locationlist/quickfix; i use tpope's scripttease to send :messages down there via :Messages; I'd love to be able to replay notifier entries down to the quickfixlist.

Thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.