Giter Club home page Giter Club logo

Comments (10)

jhvst avatar jhvst commented on June 18, 2024 1

Thank you, this error is seemingly fixed now! I still have a problem saying my .yaml files are faulty, but this seems unrelated to whatever was happening with ps.

Thanks again, I really appreciate it!

from papis.nvim.

jghauser avatar jghauser commented on June 18, 2024 1

Excellent, great to hear! Let me know if u find any other issues :)

from papis.nvim.

jghauser avatar jghauser commented on June 18, 2024

hey, thanks for the report! ps -q needs to be run with some pid. can u grab (with top or something similar) some existing pid and try if ps -q your_pid also gives an error? i'm guessing the error has something to do with the mac (+ nix) setup, but i don't have a mac to test (i do run nixos though).

also, can you enable debugging (there are instructions in the readme, let me know if anything is unclear), and give the last few lines right when papis.nvim fails? although, i can see i didn't add any logging to that specific function, so it might not be too useful.

from papis.nvim.

jhvst avatar jhvst commented on June 18, 2024
juuso@darwin ~/G/nix-config (main)> ps
  PID TTY           TIME CMD
95209 ttys000    0:00.03 -fish
95215 ttys000    0:07.12 /nix/store/p5xh6az0cybf3k4a6h8f1m9hi6mj8n8v-alacritty-0.10.1/bin/alacritty
95216 ttys001    0:00.09 -fish
97109 ttys001    0:00.01 tmux
97237 ttys002    0:00.01 fish -c /nix/store/sdnm9p437fhjz9375x6f9lbb8gbig84y-reattach-to-user-namespace-2.9/bin/reattach-to-user-namespace -l /Users/juuso/.nix
97238 ttys002    0:00.06 -fish
97776 ttys002    0:00.11 /Users/juuso/.nix-profile/bin/vim --cmd lua vim.g.node_host_prog='/nix/store/rh05clpcwwxb5sh6r1sjz24k75vwbj1m-neovim-0.9.1/bin/nvim-no
98303 ttys003    0:00.02 fish -c /nix/store/sdnm9p437fhjz9375x6f9lbb8gbig84y-reattach-to-user-namespace-2.9/bin/reattach-to-user-namespace -l /Users/juuso/.nix
98304 ttys003    0:00.04 -fish
juuso@darwin ~/G/nix-config (main)> ps -q 95209
ps: illegal option -- q
usage: ps [-AaCcEefhjlMmrSTvwXx] [-O fmt | -o fmt] [-G gid[,gid...]]
          [-g grp[,grp...]] [-u [uid,uid...]]
          [-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]]
       ps [-L]
juuso@darwin ~/G/nix-config (main) [1]>
papis: require("papis.health").check()

Sqlite database ~
- Papis.nvim db location: /Users/juuso/.papis/papis-nvim.sqlite3.
- OK The 'sqlite3' executable was found in path.
- OK The database exists.
- WARNING The database is empty.

File watcher ~
- ERROR No neovim instance is running file watchers.

from papis.nvim.

jhvst avatar jhvst commented on June 18, 2024

The debugging of the plugin does not display anything useful, because the ps -q error runs before it. I checked the very verbose logs of neovim, and it does not display anything that seems relevant here. What seems to be the problem is that on macOS, the ps command does not implement the -q option, so some alternative is needed there. The -q option does not exist on either the Apple provided system binary, or the one fetched from nixpkgs via nix-shell -p ps giving this hash (on unstable): /nix/store/pzwjlikyq8wj792yy7hikpq6a1dnr4pq-ps-adv_cmds-119/bin/ps.

from papis.nvim.

jhvst avatar jhvst commented on June 18, 2024

And for what it is worth, my nix-config is public, but I don't see anything here that would conflict with ps:

from papis.nvim.

jghauser avatar jghauser commented on June 18, 2024

Can you tell me what's the output of ps -p some_pid? It seems like that might be an alternative to -q that works on both linux and mac.

from papis.nvim.

jhvst avatar jhvst commented on June 18, 2024
juuso@darwin ~> ps
  PID TTY           TIME CMD
 2922 ttys000    0:00.03 -fish
 2928 ttys000    0:00.16 /nix/store/p5xh6az0cybf3k4a6h8f1m9hi6mj8n8v-alacri
 2929 ttys001    0:00.03 -fish
juuso@darwin ~> ps -p 2922
  PID TTY           TIME CMD
 2922 ttys000    0:00.03 -fish
juuso@darwin ~>

from papis.nvim.

jghauser avatar jghauser commented on June 18, 2024

nice, that looks useable! i just pushed a change, can you try it on your end and see if it work?

from papis.nvim.

jhvst avatar jhvst commented on June 18, 2024

Ah, the error was that the yq command on nixpkgs is the python version, which you say is not supported. I changed this to the go one and now all works great! Thanks again, excited to use the plugin for writing papers in vim :)

from papis.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.