Skip to content
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

Fail to start up #106

Open
LaCaradeculito opened this issue Jan 22, 2025 · 3 comments
Open

Fail to start up #106

LaCaradeculito opened this issue Jan 22, 2025 · 3 comments

Comments

@LaCaradeculito
Copy link

LaCaradeculito commented Jan 22, 2025

This is yet another start up case, pretty much like #104. My checkhealth results are the same the user showed, but I don't understand what he did to get a better response of the plugin installation.

So...

  1. None of the "Papis..." commands or keymaps work, even set up as "enable_keymaps = true".
  2. The plugin doesn't prompt me to run :Papis reload data at start up.
  3. My checkhealth log looks like this:
papis: require("papis.health").check()

Papis storage ~
- The 'yq' executable was found in path.
- OK The go version of the 'yq' executable was found in path.
- ERROR Failed to run healthcheck for "papis" plugin. Exception:
  ...mno/.config/nvim/plugged/papis.nvim/lua/papis/health.lua:26: attempt to index field 'data' (a nil value)

I installed papis.nvim with vim-plug and LazyVim in two different configurations, and reinstalled it in both several times, too, getting the same problems indistincly. However, if vim-plug is supported, I actually prefer to fight on that one since I know this configuration very well.

My set up in Lazy is this:

return {
  "jghauser/papis.nvim",
  dependencies = {
    "kkharji/sqlite.lua",
    "MunifTanjim/nui.nvim",
    "pysan3/pathlib.nvim",
    "nvim-neotest/nvim-nio",
    "nvim-telescope/telescope.nvim",
    "hrsh7th/nvim-cmp",
  },
  config = function()
    require("papis").setup({
      -- Your configuration goes here
    })
  end,
}

And, in the other configuration, my plugins part of the init.vim is this:

call plug#begin('/home/alumno/.config/nvim/plugged/')

" Declare the list of plugins.
Plug 'David-Kunz/gen.nvim', { 'model': 'llama3.1' , 'display_mode' : 'split' }
Plug 'catppuccin/nvim', { 'as': 'catppuccin' }
Plug 'chrisbra/csv.vim'
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'
Plug 'junegunn/seoul256.vim'
Plug 'lukas-reineke/indent-blankline.nvim'
Plug 'mattn/emmet-vim'
Plug 'mbbill/undotree'
Plug 'mipmip/vim-scimark'
Plug 'mzlogin/vim-markdown-toc'
Plug 'tpope/vim-sensible'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'vimwiki/vimwiki'
Plug 'itchyny/calendar.vim'
Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && npx --yes yarn install' }
Plug 'jghauser/papis.nvim', { 'do': 'UpdateRemotePlugins' }
Plug 'kkharji/sqlite.lua'
Plug 'MunifTanjim/nui.nvim'
Plug 'pysan3/pathlib.nvim'
Plug 'nvim-neotest/nvim-nio'
Plug 'nvim-telescope/telescope.nvim'
Plug 'hrsh7th/nvim-cmp'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plug 'nvim-lua/plenary.nvim'

" List ends here. Plugins become visible to Vim after this call.
call plug#end()

Thanks very much in advance.

@jghauser
Copy link
Owner

Hey! Thanks for the issue report. I don't know if anyone has yet tried to install this plugin with vim-plug (at least, no-one has mentioned doing so here), but I don't think there's an in principle reason why that shouldn't work. Just to make sure, in your vim-plug setup, do you require the papis.nvim plugin somewhere? I mean this bit:

require('papis').setup({
  -- Your configuration goes here
})

The next step would be to try to enable logging and see if there's anything useful in the logs. On Linux, the logs are by default at ~/.local/share/nvim/papis.nvim.log. If the Papis reload data command isn't available, you can also try deleting the current database to try resetting things. It's at ~/.local/share/nvim/papis_db/papis-nvim.sqlite3.

@LaCaradeculito
Copy link
Author

Thanks very much for your quick reply and sorry for my delayed answer.

I'm leaving vim-plug papis.nvim installation until I understand plugin managers concepts a bit more. Sorry for messing up the issue report. Now I made a fresh LazyVim installation with papis.nvim (and dependencies) only, deleted former ~/.local/share/nvim, reset this folder and got the following results:

  1. Right after opening Neovim, I tried all Papis commands and they returned something like E492: Not an editor command: Papis reload config
  2. I made a checkhealth and it resulted in:
	==============================================================================
	papis: require("papis.health").check()

	Papis storage ~
	- The 'yq' executable was found in path.
	- OK The go version of the 'yq' executable was found in path.

	Sqlite database ~
	- Papis.nvim db location: /home/alumno/.local/share/nvim/papis_db/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.

	Completion ~
	- ERROR The treesitter 'yaml' parser was not found.

  1. Then, tried the following commands:
  • Papis debug info gave me Papis: Unknown command: debug.
  • Papis reload config gave nothing (that probably means it worked).
  • Papis reload data gave these errors:
	Error executing Lua callback: ...mno/.local/share/nvim/lazy/papis.nvim/lua/papis/data.lua:155: attempt to index a nil value stack traceback:
					...mno/.local/share/nvim/lazy/papis.nvim/lua/papis/data.lua:155: in function 'reset_db'
					....local/share/nvim/lazy/papis.nvim/lua/papis/commands.lua:20: in function 'impl'
					....local/share/nvim/lazy/papis.nvim/lua/papis/commands.lua:53: in function  <....local/share/nvim/lazy/papis.nvim/lua/papis/comman
	ds.lua:42>	

Papis is installed, of course. It has been used for years.

@jghauser
Copy link
Owner

Can you enable the debug module and check the logs?

I've also just pushed a change that should avoid the Papis reload data error, but I'm not sure it'll fix the underlying issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants