Comments (10)
As long as your working directory is in a git repository, yes you should :D handling outside a git repo is suboptimal at best.
Any errors in the message history?
from neogit.
The working directory (as returned by :pwd
) is indeed a git repo.
No errors that I can see in :messages
...
from neogit.
Alright. We don't really have good diagnostics yet, but there's a few things you can do to help me find the issue:
- what operating system are you using?
- depending on how your Plugin manager operates, if it cloned the repository, can you give me the checked out commit Hash? You can also just update so we're on the same page (we merged a bigger chunk just before you opened the issue)
- if you're on a non-windows machine, follow the steps in the readme to run the testsuite.
Otherwise you can also clone the repo, navigate totests/.repo
, copy.git.orig
to.git
and open nvim and neogit there (basically doing the tests manually) - in the neogit status buffer, press
$
to see if you can at least open the command history
from neogit.
OK some progress. Running the tests didn't work; The output was:
nvim --headless --noplugin -c "lua require(\"plenary.test_harness\").test_directory_command('tests/ {minimal_init = \"tests/minimal-init.nvim\"}')"
Starting...Scheduling: tests//poc_spec.lua
Scheduling: tests//hunks_spec.lua
Scheduling: tests//status_buf_spec.lua
make: *** [test] Error 1
I tried disabling all the tests except the POC but then I got a require error about plenary.busted (I have plenary installed, not sure what the error is). I moved on to run the manual steps and it did work!
I narrowed it down to either a Neovim version or my GUI (VimR - I'm on macOS):
On the terminal, where it works, the Neovim version is v0.5.0-dev+nightly
. Homebrew mentions HEAD-dc3ca16_1
...
Inside VimR, where it doesn't work, the version is v0.5.0-dev+dev-nvimserver-universal-8-gd258bb2ba
The usual suspects here is usually environment issues. I will browse the source code and see if I can spot anything.
from neogit.
I tried to figure out a way to diagnose this but my lua skills are pretty much non-existent. Any pointers appreciated, the async stuff is throwing me off :) If I can get a way to print the result of a function I could perhaps help a bit more:
local status = require('neogit.lib.git.status')
-- this prints function: 0x01078c4230
print(status.get())
-- this prints nothing
print(status.get()())
from neogit.
the async stuff is throwing me off :)
Don't worry, I only half-understand it myself, co routines yielding functions is pretty involved :D
The async stuff is based on this amazing tutorial, which can probably explain it way better than me: https://github.com/ms-jpq/neovim-async-tutorial
But the gist is that the "async" methods are partially applied, so the second invocation takes only the continuation callback. So you have a couple of options:
status.get()(function (result) ... end) -- manually binding a callback to the continuation
local a = require('neogit.async')
a.run(status.get) -- helper function that pretty much does the above with an empty function, no way to get the result though
a.dispatch(function ()
local result = a.wait(status.get())
...
end) -- "canonical" way, dispatch wraps it's argument with the execution engine and invokes it.
I have another hunch though:
When you start neovim from the terminal it works, but also you're in the correct working directory already.
When you start VimR though, you have to manually :cd
into the correct directory before, right? If so, that might be related to the problem
from neogit.
@orestis Can you check if a plugin update fixes the problem for you?
from neogit.
I got a require error about plenary.busted
btw, this could mean that your plenary plugin is outdated, they switched to their own busted port pretty recently
from neogit.
Yay, after an update I'm seeing things in the Neogit buffer :) Thanks for the help.
from neogit.
@orestis Glad I could help, thank you for your time :)
from neogit.
Related Issues (20)
- regression in `:Neogit cwd=<cwd>` HOT 5
- Override palette in config HOT 1
- Status - Mapping of `o` is broken now HOT 1
- `use_default_keymaps = false` does not do anything HOT 1
- Setting a hotkey to `false` errors out at startup
- Neogit fails to start when an untracked file name is just a number
- Some neogit buffers break `statuscolumn` HOT 1
- Can't handle `typechange`
- Chevron rendering issues? HOT 1
- exception when initing a new repo (windows + wsl) HOT 1
- Unnamed buffers left in buffer list after closing Neogit
- Fails to parse diffs with submodule changes HOT 1
- "Go to file" is not working HOT 12
- Quitting a Neogit tab should focus previously focused tab HOT 2
- Cannot close last window HOT 1
- Cursor jumps to the top of the screen when saving a file when Neogit is open HOT 1
- Suggestion: Submit commit if .git/COMMIT_EDITMSG is saved and closed HOT 2
- Neogit not workign after update - neogit has not been setup HOT 2
- Errors around stash pop
- Properly Colored Unicode Graphs
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 neogit.