Issues with Neovim Plugins in AppVM

I migrated my Neovim-Lua-configuration with packer as a plugin-manager to a Fedora-38 AppVM into ~/.config/nvim/ (on my archlinux machine it works perfect).

Any time I close and reopen Neovim, the updated plugins are lost and I have to :source and :PackSync again.

How to keep the updated plugins permanent? Am I in the wrong directory?

iirc, packer stores the modules somewhere in ~/.local/share and then they’ll be some other pieces from neovim in ~/.cache/nvim. That sounds rather odd to me, since your home directory shouldn’t go away unless you’re using a disposable VM. Can you track and see where the files are going in ~/.local/share and see what’s happening there?

No, I don’t use a disposable VM. And the configuration-file itself do not disappear. I just have to :source anytime again and update packer, when I reopen the AppVM.

The files are going inte /home/user/.local/share/nvim/site/pack/packer/start/packer.nvim/

There I find Dockerfile, LICENSE Makefile README.md doc lua selene.toml stylua.toml tests vim.toml

In ~/.cache there is no nvim.

Might it be propably a problem with migrating from ArchLinux to fedora-38?

When I reopen nvim, following Error occurs:

Error detected while processing /home/user/lconfig/nvim/init.lua:
E5113: Error while calling lua chunk: /home/user/.config/nvim/lua/packer.lua:14: loop or previous error loading modle ‘packer’

The I source and Resync Packer again and then the Error disappears. But when I restart the App the Error occurs again.

That sounds like a neovim configuration issue and not a Qubes-specific problem. Strange that the same config would work on Arch. I switched to lazy, so it’s been awhile since I’ve used packer. What’s your packer.lua look like?

Oh, sorry, so I am in the wrong forum!

But it is already a big help to know, that it is not a qubesos issue…

If I am still allowed I post the packer.lua:

local ensure_packer = function()
local fn = vim.fn
local install_path = fn.stdpath(‘data’)…‘/site/pack/packer/start/packer.nvim’
if fn.empty(fn.glob(install_path)) > 0 then
fn.system({‘git’, ‘clone’, ‘–depth’, ‘1’, ‘GitHub - wbthomason/packer.nvim: A use-package inspired plugin manager for Neovim. Uses native packages, supports Luarocks dependencies, written in Lua, allows for expressive config’, install_path})
vim.cmd [[packadd packer.nvim]]
return true
end
return false
end

local packer_bootstrap = ensure_packer()

return require(‘packer’).startup(function(use)
– Packer can manage itself
use ‘wbthomason/packer.nvim’

use {
‘nvim-telescope/telescope.nvim’, tag = ‘0.1.2’,
– or , branch = ‘0.1.x’,
requires = { {‘nvim-lua/plenary.nvim’} }
}

use({
‘rose-pine/neovim’,
as = ‘rose-pine’,
config = function()
vim.cmd(‘colorscheme rose-pine’)
end
})

use {
‘nvim-lualine/lualine.nvim’,
requires = { ‘nvim-tree/nvim-web-devicons’, opt = true }
}

use {
“windwp/nvim-autopairs”,
wants = “nvim-treesitter”,
module = { “nvim-autopairs.completion.cmp”, “nvim-autopairs” },
config = function()
require(“config.autopairs”).setup()
end,
}

use({
“L3MON4D3/LuaSnip”,
– follow latest release.
tag = “v2.*”, – Replace by the latest released major (first number of latest release)
– install jsregexp (optional!:).
run = “make install_jsregexp”
})

use (‘mg979/vim-visual-multi’)
use (‘folke/zen-mode.nvim’)
use (‘folke/twilight.nvim’)

use (‘nvim-treesitter/nvim-treesitter’, {run = ‘:TSUpdate’})
use (‘nvim-treesitter/playground’)
use (‘theprimeagen/harpoon’)
use (‘mbbill/undotree’)

use {
“nvim-neorg/neorg”,
config = function()
require(‘neorg’).setup {
load = {
[“core.defaults”] = {},
[“core.concealer”] = {},
[“core.autocommands”] = {},
[“core.qol.toc”] = {
config = {
close_after_use = true
},
},
[“core.integrations.treesitter”] = {},
[“core.completion”] = {
config = {
engine = “nvim-cmp”
},
},
[“core.export”] = {},
[“core.dirman”] = {
config = {
workspaces = {
latex = “~/Notizen/latex”,
notizen = “~/Notizen”,
jyotish = “~/Notizen/jyotish”,
linux = “~/Notizen/linux”,
neovim = “~/Notizen/neovim”,
},
default_workspace = “notizen”,
},
},
},
}
end,
run = “:Neorg sync-parsers”,
requires = “nvim-lua/plenary.nvim”,
}

use {
‘VonHeikemen/lsp-zero.nvim’,
requires = {
– LSP Support
{‘neovim/nvim-lspconfig’}, – Required
{‘williamboman/mason.nvim’},
{‘williamboman/mason-lspconfig.nvim’},

  -- Autocompletion
  {'hrsh7th/nvim-cmp'},
  {'hrsh7th/cmp-buffer'},
  {'hrsh7th/cmp-cmdline'},
  {'hrsh7th/cmp-path'},
  {'saadparwaiz1/cmp_luasnip'},
  {'hrsh7th/cmp-nvim-lsp'},
  {'hrsh7th/cmp-nvim-lua'},

  -- Snippets
  {'L3MON4D3/LuaSnip'},     -- Required
--  {'rafamadriz/friendly-snippets'}

}
}

use {
‘nvim-tree/nvim-tree.lua’,
requires = {
‘nvim-tree/nvim-web-devicons’ – optional
}
,}
if packer_bootstrap then
require(‘packer’).sync()
end
end)

The code looks fine. I’m guessing it’s due to your file being called packer.lua. Can you change the name to something else and see if that solves it?

No, it is still not working.

But thank you anyway. I am already happy to know, that it is not a qubes issue. So because it is off-topic, I will close this tread and will go on with trying.

Very embarassing: I did the git clone of my config files with root permission. That was the reason why it was not working… So I repeated it as a user and now it works perfect…

Learning from mistakes…

1 Like