Comments (5)
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.
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.
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.
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.
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)
- Does not apply to elements in jsx or tsx files
- Feature Suggestion: also set `listchars` depending on tabs/spaces
- Google C++ style HOT 4
- Not detect tabs with size 4 HOT 1
- Will not automatically start the plugin. HOT 12
- Provide comparison/benchmarks against `indent-o-matic` HOT 4
- How to use GuessIndent plugin and ftplugin files ?
- Silence :GuessIndent command output? HOT 1
- User config is ignored if `auto_cmd` is set to false
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from guess-indent.nvim.