miversen33 / netman.nvim

Neovim (Lua powered) Network Resource Manager
MIT License
330 stars 1 forks source link

Doesn't load since today's update #202

Closed FalcoGer closed 6 months ago

FalcoGer commented 6 months ago

I updated netman today using plug. Since then I am getting this error when trying to start neovim:

Error detected while processing /home/user/.config/nvim/init.vim[665]../home/user/.vim/config/netman.lua:
E5113: Error while calling lua chunk: /home/user/.vim/plugged/netman.nvim/lua/netman/init.lua:6: loop or previous error loading module 'netman.tools.utils'
stack traceback:
        [C]: in function 'require'
        /home/user/.vim/plugged/netman.nvim/lua/netman/init.lua:6: in main chunk
        [C]: in function 'require'
        /home/user/.vim/config/netman.lua:3: in main chunk

the file in /home/user/.vim/config/netman.lua is simply this

-- https://github.com/miversen33/netman.nvim

local netman = require ('netman')

Minimum example config file

set nocompatible

if filereadable("/etc/vim/vimrc.local")
  source /etc/vim/vimrc.local
endif

let mapleader=','
let timeoutlen=1500
filetype off
call plug#begin(expand('~/.vim/plugged'))
" neotree and requirements
Plug 'nvim-neo-tree/neo-tree.nvim', { 'branch': 'v3.x' } | let g:user_loaded_neotree = 1
Plug 'MunifTanjim/nui.nvim'
Plug 'nvim-lua/plenary.nvim'

Plug 'miversen33/netman.nvim' | let g:user_loaded_netman = 1
call plug#end()
filetype plugin indent on

if has("syntax")
  syntax on
endif

" clipboard support
" register "+ (clipboard) and
" "* primary
set guioptions+=a

" Uncomment the following to have Vim jump to the last position when
" reopening a file
if has("autocmd")
  autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif

" These make vim VI incompatible
set showcmd         " Show (partial) command in status line.
set showmatch       " Show matching brackets.
set ignorecase      " Do case insensitive matching
set smartcase       " Do smart case matching
set incsearch       " Incremental search, shows partial matches
set autowrite       " Automatically save before commands like :next and :make
set hidden          " Hide buffers when they are abandoned
set mouse=a         " Enable mouse usage (all modes)

" =============================================================================
" Plugin configurations

lua << EOF

-- Neo-Tree
local nt = require('neo-tree')
vim.cmd("cnoreabbrev nt Neotree")

local sources = {
    "filesystem",
    "buffers",
    "git_status",
}

local sources_display = {
    {
        source = "filesystem",
        display_name = " 󰉓 Files ",
    },
    {
        source = "buffers",
        display_name = " 󰈚 Buffers ",
    },
    {
        source = "git_status",
        display_name = " 󰊢 Git ",
    },
}

if vim.g['user_loaded_netman'] then
    table.insert(sources, "netman.ui.neo-tree")
    table.insert(sources_display,
    {
        source = "remote",
        display_name = " 󰲁 NetMan "
    })
end

nt.setup({
    sources = sources,
    source_selector = {
        sources = sources_display
    }
})

-- NetMan
local netman = require ('netman')

EOF

Versions:

neovim:

NVIM v0.10.0-dev-478273a42
Build type: RelWithDebInfo
LuaJIT 2.1.1700008891
Run "nvim -V1 -v" for more info

neotree: 3.14 (f3941c57ec85d7bdb44fa53fd858fd80f159018f)

netman: c8cb2874f36b7b5a89d71e57055eff40c8519b69

miversen33 commented 6 months ago

Looks like something odd happened in the merge.

The full error being tossed here is

2024-02-19T10:49:20 lazy.nvim  ERROR Failed to run `config` for netman.nvim

vim/loader.lua:0: /home/miversen/git/netman.nvim/lua/netman/tools/shell.lua:587: undefined label 'do_return'

# stacktrace:
  - vim/loader.lua:0
  - lua/netman/tools/utils/init.lua:166 _in_ **is_process_alive**
  - lua/netman/tools/utils/init.lua:96 _in_ **clear_orphans**
  - lua/netman/tools/utils/init.lua:136 _in_ **setup**
  - lua/netman/tools/utils/init.lua:257
  - lua/netman/init.lua:6
  - ~/git/miversen-dotfiles/editors/nvim/init.lua:321 _in_ **setup_plugins**
  - ~/git/miversen-dotfiles/editors/nvim/init.lua:334

What is weird is if you switch to v1.15 (which should be identical except for a deprecation date added), it works just fine. Working through this now

miversen33 commented 6 months ago

@FalcoGer I think this is fixed in the branch 202-doesnt-load-since-todays-update. Can you pull that branch and verify your issue goes away?

miversen33 commented 6 months ago

Given that this broke the main branch, I am going to merge the listed branch into main without waiting for confirmation that it did resolve your issue. It should and it wont make things worse so I am going to get it merged in. If your issue still exists after you update main, let me know and we can dive into this more

FalcoGer commented 6 months ago

it's fixed. thank you