-
Notifications
You must be signed in to change notification settings - Fork 493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Neovide.app seems non-standard boot method? #1987
Comments
Hi, thanks for reporting! I can't say anything about the larger picture this issue tries to cover since I'm not on any macOS platform, but about passing |
@MultisampledNight ! Excellent, thank you! That helps a ton to get closer |
I recorded a video of what it does. Watch the animation when each app boots. Screen.Recording.2023-08-20.at.3.18.50.PM.mov |
@codeitlikemiley interesting, I read it. I have solved the indexing in a similar way. CMD+H works fine for me interestingly enough. I just remapped all the command keys manually like this:
The greater problem I have though is that Neovide.app when launched immediately terminates itself and launches ANOTHER process or something. Did you notice that? To see it, go to where Neovide.app is located, probably somewhere like: Now, go to terminal and type So in other words, launching Neovide.app as an app somehow is broken, and that's very common to deal with the .app version in OSX obviously, for example ... putting things in the dock I wish I knew what it was doing to try and find ways to work around it, but I don't know enough about OSX development. Basically I want Neovide to appear in the dock, but I can't create a 'launcher' via automator or whatever, because if I drag that to the dock, the launcher simply launches Neovide.app as a whole separate dock icon. |
Ah! So I knew about that option the whole time but I didn't think to pass that via
|
My Setup never terminate or re-launch, yours is a very weird behavior.... my only suggestion is try to re-install the app just download it directly on the neovide.dev https://github.com/neovide/neovide/releases/latest/download/Neovide.dmg.zip drag it to /Applications Also i never open Neovide.app by itself by clicking it , i use the alias ,since opening by clicking it would just open in root folder and empty file. The only way for you to know why your set up crash is to add the --log flagged ... Then figure out a way why that issue is happening, might be an issue on ENV var / PATH missing not loaded... try to launch using the cli neovide , no alias with --log.... it would dump some .log files and that might able to pin point what causes your set up to crash. |
I don't think its actually crashing, or even if anything is wrong. What happens if you drag the file from /applications to your dock, and click it from your dock. Do you notice the issue I mention? If you click from applications its obscured for some reason, which actually was a bit of an epiphany. It occured to me that for things to be on the dock Mac has to actually know what process they are so they can show if they're open or not, whereas things in the application folder it does not. I observed while doing this, things behave differently when they're in the dock. Im curious though if you drag to the dock and click it, it looks the same as the video I put above. Btw this is how I sorted out the home folder thing, similar but different. Maybe not the best, but I'm not a shell expert #!/bin/bash
# to avoid indexing 500,000 files ~ use the following logic:
# - if no arguments are provided and the current directory is ~, set ~/Desktop to working directory
# - if no arguments are provided and the current directory is not ~, open neovim normally
# - if a directory is provided as an argument, set that working directory
# - if a file is provided as an argument, open that file directly
#
# vim uses the cwd of the process to determine the working directory of vim. This is what
# happens when you pass no flags. To override this, we need to use -c to set :cd ourself
export NEOVIDE_MULTIGRID=true
export NEOVIDE_FRAME=buttonless
current_dir=$(pwd)
if [ -z "$1" ]; then
if [ "$current_dir" = "$HOME" ]; then
exec neovide -- -c 'cd ~/Desktop' > /dev/null 2>&1
else
exec neovide > /dev/null 2>&1
fi
else
if [ -d "$1" ]; then
exec neovide -- -c "cd $1" > /dev/null 2>&1
else
exec neovide "$@" > /dev/null 2>&1
fi
fi |
@MultisampledNight thanks, i'll have a look later to see if I can add it to the config, although perhaps not as I dont want to add mental overhead for ppl. I've mostly got everything with migrating my entire config over except just a few misc things... I may go away for awhile and come back with fresh brain to try to sort out the last 3% of straggling things to figure out... mostly boiling down to this issue, and restoring the window size properly from the config file, which I think is blocked by the render loop issue |
dont know why would you hard code ~/Desktop the usual behaviour should be if you open a file it would get that file directory as the cwd. if you open a directory that itself would be the cwd
|
I hardcode desktop because I often use it as a scratch pad for current project, I do lots of file opts. there is 100% chance that if im opening vim from my home folder (which is my default terminal) then i want to do sort of experimental work not in any project, so in this case i just always use my desktop. it just suits all the type of work i do I do like your version as well though, it basically just makes the CWD match the input arg, correct? So then from the outside all that needs to happen is passing in a path or file and it doesn't matter edit: Nevermind I see you rewrote my bash script, thanks! it does look a bit cleaner |
also stop using the neovide cli , use the Neovide.app , coz the Neovide.app have the macOS info.plist file , |
Describe the bug
First, sorry if this issue already exists. Despite searching for some time, the last few issues I've made have all been duplicates.
Here is similar stuff here, but no one seems to mention the 'double open' thing (see video in second comment of issue)
Something about the way Neovide.app works on OSX seems non-standard, although I don't know what it is.
First, all I'm trying to do is have a Neovide icon on my dock. 99% of the time I open neovide from terminal from a custom shell script, but there are cases where I want to drag some file into the dock icon.
For MacVim, I solved this by creating an automator script with the following:
Neovide comes with a cask, so the first thing I did was make an exact duplicate of Macvim automator:
There are 2 problems with this though:
--multigrid
and--frame buttonless
, but this is beside the pointThe next thing I tried was dragging
Neovide.app
from/Applications
onto my dock.This creates other issues:
Ultimately.... all of these things are not technically the problem i'm facing, they're more of roadblocks along the way of my ultimate goal, which is this:
Here is a binary
n
I made which lets me boot neovim from terminal, and works great:As an added bonus I would love it if it also passes:
-- -c 'cd ~/Desktop'
so that telescope doesnt try to index half a million files every time I open neovide without a path, but I would figure that out myself once I can at least get the above to work.To Reproduce
/Applications
to your dock, and click it. Notice the weird double boot behaviorExport
, now drag that to the dock and click it.Expected behavior
Of all the things I wrote above, there's a lot going on and some of the things I'm unsure of. What I am certain of though is an app dragged to the dock should not try to boot twice in quick succession. That I'm sure of.
The other thing I'm pretty sure of is that if an app Opens by clicking its icon, it shouldnt be doing fancy wizardry in the background where the app I just clicked is closed, and somehow spawns some secondary app which is separate from the app I clicked
Desktop (please complete the following information):
NVIM v0.9.1
Build type: Release
LuaJIT 2.1.0-beta3
The text was updated successfully, but these errors were encountered: