shortcuts / no-neck-pain.nvim

☕ Dead simple yet super extensible plugin to center the currently focused buffer to the middle of the screen.
MIT License
543 stars 13 forks source link

`windows.nvim` conficts with size #227

Open NormTurtle opened 1 year ago

NormTurtle commented 1 year ago

note : **PLEASE** be Chill while reading this

Describe the problem

Size is the Problem , window.nvim which i use everyday , is having confict with no-neck-pain
window.nvim is resizesing no-neck-pain unwantedly , which i do not want , here is the demonstration !

step to reproduce

  1. install WINDOW.nvim with animation enabled
  2. try to use no-neck-pain with it

WITH WINDOW.nvim OFF

https://user-images.githubusercontent.com/108952834/236214338-2bddba8f-d9ea-4db4-8064-7b2a380d321a.mp4

WITH WINDOW.nvim ON

https://user-images.githubusercontent.com/108952834/236217672-e0c41fdd-fe13-4f18-8062-2d735cf65e91.mp4

THE SOLUTION

  • IGNORE no-neck-pain from window.nvim

some WORKAROUND

i tried using window.nvim CONFIG as

   ignore = {               
      buftype = { "quickfix" },
      filetype = { "NvimTree", "neo-tree", "undotree", "gundo","no-neck-pain" }
   },

PS : it din't worked

Final thought

i don't know if that's a issue or not , but Im having problem , with it

maybe its wrong with window.nvim 🤷 , idk man my knowledge to small 🤌

NormTurtle commented 1 year ago

this is the whole config of no-neck-pain

require("no-neck-pain").setup({
    buffers = {
        right = { enabled = false, },
        scratchPad = {
            enabled = true,
            location = "~/Desktop/",
        },
        bo = {
            filetype = "md"
        },
    },
})
shortcuts commented 1 year ago

note : PLEASE be Chill while reading this

this made me laugh, I'm chill thanks for opening the issue and testing the plugin!


I guess this is indeed window.nvim trying to resize the padding buffers, I'll see if it's possible to make their ignore option work and let you know!

NormTurtle commented 1 year ago

this made me laugh

im glad , i did that :) LOL


fun fact :

window.nvim has ignore filetype but i din't know the Filytype of no-neck-pain 🤷 , or i been lazy at that time :(

shortcuts commented 1 year ago

OK so I did some tests, I can confirm that it's windows.nvim that resizes the window.

window.nvim has ignore filetype but i din't know the Filytype of no-neck-pain 🤷 , or i been lazy at that time :(

The default filetype for NNP windows are no-neck-pain, but here you define bo.filetype = "md" (which make sense since you take notes in markdown) in your config, so the filetype is now md.

I guess the straight forward solution is to ignore md on the windows.nvim side, or to make a feature request on their side to allow ignore by filename, which would allow them to prevent resizing on files named like no-neck-pain.md

NormTurtle commented 1 year ago

😬 i really don't know what to say now

shortcuts commented 1 year ago

You can open an issue on the windows.nvim side, with a reference to this one and see if they'd be keen to implement an ignore by filename option :D

NormTurtle commented 1 year ago

i dont think they are goin to help us soon , there development is pretty much dead from months , :(
the last commit was pretty old image