GithubHelp home page GithubHelp logo

Turn off Notifications? about guess-indent.nvim HOT 5 OPEN

nmac427 avatar nmac427 commented on June 14, 2024
Turn off Notifications?

from guess-indent.nvim.

Comments (5)

NMAC427 avatar NMAC427 commented on June 14, 2024

Are you seeing a notification every time you enter a buffer? Because when guess-indent sets up the autocommand, it should get executed silently.

from guess-indent.nvim.

chrisgrieser avatar chrisgrieser commented on June 14, 2024

ah yes, I use nvim-notify to redirect all print commands to a notification. (noice.nvim does a similar thing).

For whatever reason, it seems silent notifications still get redirected. Maybe the notification could be skipped alltogether when guess-indent is triggered via autocmd? Would save users like me the complications

from guess-indent.nvim.

NMAC427 avatar NMAC427 commented on June 14, 2024

I assume you overwrite the lua print function to achieve this (similar to this reddit post)? If this is the case, then I would suggest you to just filter out any messages that start with "Did set indentation to" and "Failed to detect indentation style.".

The way noice.nvim redirects print/echo to notifications is using the vim.ui_attach API, which does not suffer from this issue. Instead of overriding print you could use noice.nvim in conjunction with nvim-notify.

from guess-indent.nvim.

AlexSWall avatar AlexSWall commented on June 14, 2024

I'm actually getting this issue too, but only when I navigate using default Telescope file finders (e.g. :e doesn't trigger this) and only when I have cmdheight = 0 set. But I don't get this issue when guess-indent.nvim isn't installed; seems to be due to auto_cmd being true and the print statements in set_indentation. I'm not using any redirection of print, nvim-notify, or the like (that I know of). I'm using Neovim v0.9.4.

Seems like this is probably a Neovim issue, and not a guess-indent.nvim issue.

from guess-indent.nvim.

AlexSWall avatar AlexSWall commented on June 14, 2024

My workaround will be to set auto_cmd to false and implement my own setup_autocommands, where instead of triggering on BufReadPost the autocmd triggers on InsertEnter. Not ideal, it obviously won't run before I've entered insert mode, but it fixes my issue and I just need something that isn't immediate, it seems.

from guess-indent.nvim.

Related Issues (10)

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.