vimpostor / vim-lumen

Make vim follow your system-wide dark mode preference
GNU General Public License v3.0
80 stars 2 forks source link

vim-lumen doesn't work without error messages in macOS #14

Closed gmmyung closed 2 months ago

gmmyung commented 2 months ago

Describe the bug

After running Neovim, no error is observable. Toggling vim-lumen doesn't change the colorscheme. It worked before, but it suddenly doesn't since I have updated the package.

To reproduce

run Neovim

Expected behavior

vim-lumen should work as expected

Debug output

{'platform': 'macos', 'job_state': 'dead (exit code 257)', 'job_errors': []}
vimpostor commented 2 months ago

but it suddenly doesn't since I have updated the package.

Which package did you update? If you mean this plugin, could you find out which commit broke it?

gmmyung commented 2 months ago

Unfortunately not. I haven't updated the package for a few months before this happened.

gmmyung commented 2 months ago

I have tried multiple versions, and 145a2fd seems to be where it starts to break.

vimpostor commented 2 months ago

What is the output of :echom lumen#platforms#macos#watch_cmd()?

gmmyung commented 2 months ago

/Users/gmmyung/.local/share/nvim/lazy/vim-lumen/autoload/lumen/platforms/macos/watcher

gmmyung commented 2 months ago

I am using lazy.nvim for my package manager.

vimpostor commented 2 months ago

Hmm I do not see anything wrong with that path.

If you run ~/.local/share/nvim/lazy/vim-lumen/autoload/lumen/platforms/macos/watcher.swift get in a shell, does it output something? And if you run ~/.local/share/nvim/lazy/vim-lumen/autoload/lumen/platforms/macos/watcher, does it output something when you change the system dark mode?

gmmyung commented 2 months ago

If you run ~/.local/share/nvim/lazy/vim-lumen/autoload/lumen/platforms/macos/watcher.swift get in a shell, does it output something?

~/.local/share/nvim/lazy/vim-lumen/autoload/lumen/platforms/macos/watcher.swift get
Dark_

And if you run ~/.local/share/nvim/lazy/vim-lumen/autoload/lumen/platforms/macos/watcher, does it output something when you change the system dark mode?

~/.local/share/nvim/lazy/vim-lumen/autoload/lumen/platforms/macos/watcher
Light
Dark_
vimpostor commented 2 months ago

Can you confirm that :echom jobstart(["/Users/gmmyung/.local/share/nvim/lazy/vim-lumen/autoload/lumen/platforms/macos/watcher"]) outputs -1?

According to :h jobstart() this means that neovim thinks that this file is not executable. Can you figure out why that would be the case, e.g. check that chmod +x is set on that file.

Also make sure that the path you posted for :echom lumen#platforms#macos#watch_cmd() really is that path and doesn't contain any hidden other characters, e.g. also try running :echom jobstart(lumen#platforms#macos#watch_cmd()).

vimpostor commented 2 months ago

I think I found the problem now, please kindly test the latest version.

gmmyung commented 2 months ago

Can you confirm that :echom jobstart(["/Users/gmmyung/.local/share/nvim/lazy/vim-lumen/autoload/lumen/platforms/macos/watcher"]) outputs -1?

This command outputs increasing number every time I enter. It increase more than 1 each time. I am at 43 now lol

According to :h jobstart() this means that neovim thinks that this file is not executable. Can you figure out why that would be the case, e.g. check that chmod +x is set on that file.

-rwxr-xr-x  1 gmmyung  staff  65416 Feb 11 18:23 /Users/gmmyung/.local/share/nvim/lazy/vim-lumen/autoload/lumen/platforms/macOS/watcher

:echom jobstart(lumen#platforms#macos#watch_cmd()) outputs:

E475: Invalid value for argument cmd: ''/Users/gmmyung/.local/share/nvim/lazy/vim-lumen/autoload/lumen/platforms/macos/watcher'' is not executable
-1
Press ENTER or type command to continue

I will check if the fix works!

gmmyung commented 2 months ago

Works like a charm! Thank you for your swift response. I really appreciate it 👍