GithubHelp home page GithubHelp logo

lewis6991 / pckr.nvim Goto Github PK

View Code? Open in Web Editor NEW
246.0 4.0 13.0 1.22 MB

Spiritual successor of https://github.com/wbthomason/packer.nvim

License: MIT License

Lua 99.74% Makefile 0.26%
neovim-plugin lua neovim

pckr.nvim's Introduction

pckr.nvim

Spiritual successor of https://github.com/wbthomason/packer.nvim

Main differences to packer.nvim:

  • Heavily refactored
  • Lockfile support
  • No compilation

Table of Contents

  1. Features
  2. Requirements
  3. Quickstart
  4. Example
  5. Commands
  6. Usage
    1. The setup and add functions
    2. Custom Initialization
    3. Specifying Plugins
    4. Performing plugin management operations
  7. Debugging

Features

  • Declarative plugin specification
  • Support for dependencies
  • Extensible
  • Post-install/update hooks
  • Support for git tags, branches, revisions
  • Support for local plugins
  • Lockfile support

Requirements

  • You need to be running Neovim v0.9 or newer
  • If you are on Windows 10, you need developer mode enabled in order to use local plugins (creating symbolic links requires admin privileges on Windows - credit to @TimUntersberger for this note)

Quickstart

If you want to automatically install and set up pckr.nvim on any machine you clone your configuration to, add the following snippet somewhere in your config before your first usage of pckr:

local function bootstrap_pckr()
  local pckr_path = vim.fn.stdpath("data") .. "/pckr/pckr.nvim"

  if not (vim.uv or vim.loop).fs_stat(pckr_path) then
    vim.fn.system({
      'git',
      'clone',
      "--filter=blob:none",
      'https://github.com/lewis6991/pckr.nvim',
      pckr_path
    })
  end

  vim.opt.rtp:prepend(pckr_path)
end

bootstrap_pckr()

require('pckr').add{
  -- My plugins here
  -- 'foo1/bar1.nvim';
  -- 'foo2/bar2.nvim';
}

Example

-- This file can be loaded by calling `lua require('plugins')` from your init.vim

local cmd = require('pckr.loader.cmd')
local keys = require('pckr.loader.keys')

require('pckr').add{
  -- Simple plugins can be specified as strings
  '9mm/vim-closer';

  -- Lazy loading:
  -- Load on a specific command
  {'tpope/vim-dispatch',
    cond = {
      cmd('Dispatch'),
    }
  };

  -- Load on specific keymap
  {'tpope/vim-commentary', cond = keys('n', 'gc') },

  -- Load on specific commands
  -- Also run code after load (see the "config" key)
  { 'w0rp/ale',
    cond = cmd('ALEEnable'),
    config = function()
      vim.cmd[[ALEEnable]]
    end
  };

  -- Local plugins can be included
  '~/projects/personal/hover.nvim';

  -- Plugins can have post-install/update hooks
  {'iamcco/markdown-preview.nvim', run = 'cd app && yarn install', cond = cmd('MarkdownPreview')};

  -- Post-install/update hook with neovim command
  { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' };

  -- Post-install/update hook with call of vimscript function with argument
  { 'glacambre/firenvim', run = function()
    vim.fn['firenvim#install'](0)
  end };

  -- Use specific branch, dependency and run lua file after load
  { 'glepnir/galaxyline.nvim',
    branch = 'main',
    requires = {'kyazdani42/nvim-web-devicons'},
    config = function()
      require'statusline'
    end
  };

  -- Run config *before* the plugin is loaded
  {'whatyouhide/vim-lengthmatters', config_pre = function()
    vim.g.lengthmatters_highlight_one_column = 1
    vim.g.lengthmatters_excluded = {'pckr'}
  end},
}

Commands

pckr provides the following commands.

" Remove any disabled or unused plugins
:Pckr clean

" Install missing plugins
:Pckr install [plugin]+

" Update installed plugins
:Pckr update [plugin]+

" Upgrade pckr.nvim
:Pckr upgrade

" Clean, install, update and upgrade
:Pckr sync [plugin]+

" View status of plugins
:Pckr status

" Create a lockfile of plugins with their current commits
:Pckr lock

" Restore plugins using saved lockfile
:Pckr restore

Usage

The following is a more in-depth explanation of pckr's features and use.

The setup and add functions

pckr providespckr.add(spec), which is used in the above examples where spec is a table specifying a single or multiple plugins.

Custom Initialization

pckr.setup() can be used to provide custom configuration (note that this is optional). The default configuration values (and structure of the configuration table) are:

require('pckr').setup{
  package_root        = util.join_paths(vim.fn.stdpath('data'), 'site', 'pack'),
  max_jobs            = nil, -- Limit the number of simultaneous jobs. nil means no limit
  autoremove          = false, -- Remove unused plugins
  autoinstall         = true, -- Auto install plugins
  git = {
    cmd = 'git', -- The base command for git operations
    clone_timeout = 60, -- Timeout, in seconds, for git clones
    default_url_format = 'https://github.com/%s' -- Lua format string used for "aaa/bbb" style plugins
  },
  log = { level = 'warn' }, -- The default print log level. One of: "trace", "debug", "info", "warn", "error", "fatal".
  opt_dir = ...,
  start_dir = ...,
  lockfile = {
    path = util.join_paths(vim.fn.stdpath('config', 'pckr', 'lockfile.lua'))
  }
}

Specifying plugins

pckr is based around declarative specification of plugins.

  1. Absolute paths to a local plugin
  2. Full URLs (treated as plugins managed with git)
  3. username/repo paths (treated as Github git plugins)

Plugin specs can take two forms:

  1. A list of plugin specifications (strings or tables)
  2. A table specifying a single plugin. It must have a plugin location string as its first element, and may additionally have a number of optional keyword elements, shown below:
{
  'myusername/example',    -- The plugin location string

  -- The following keys are all optional

  -- Specifies a git branch to use
  branch: string?,

  -- Specifies a git tag to use. Supports '*' for "latest tag"
  tag: string?,

  -- Specifies a git commit to use
  commit: string?,

  -- Skip updating this plugin in updates/syncs. Still cleans.
  lock: boolean?,

  -- Post-update/install hook. See "update/install hooks".
  run: string|function,

  -- Specifies plugin dependencies. See "dependencies".
  requires: string|string[],

  -- Specifies code to run after this plugin is loaded. If string then require it.
  -- E.g:
  --   config = function() require('mod') end
  -- is equivalent to:
  --   config = 'mod'
  config: string|function,

  -- Specifies code to run before this plugin is loaded. If string then require it.
  config_pre: string|function,

  cond: function|function[],    -- Specifies custom loader
}

Update/install hooks

You may specify operations to be run after successful installs/updates of a plugin with the run key. This key may either be a Lua function, which will be called with the plugin table for this plugin (containing the information passed to the spec as well as output from the installation/update commands, the installation path of the plugin, etc.), a string, or a table of functions and strings.

If an element of run is a string, then either:

  1. If the first character of run is ":", it is treated as a Neovim command and executed.
  2. Otherwise, run is treated as a shell command and run in the installation directory of the plugin via $SHELL -c '<run>'.

Dependencies

Plugins may specify dependencies via the requires key. This key can be a string or a list (table).

If requires is a string, it is treated as specifying a single plugin. If a plugin with the name given in requires is already known in the managed set, nothing happens. Otherwise, the string is treated as a plugin location string and the corresponding plugin is added to the managed set.

If requires is a list, it is treated as a list of plugin specifications following the format given above.

Plugins specified in requires are removed when no active plugins require them.

🚧 TODO: explain that plugins can only be specified as a table once.

Custom loader

A custom loader for a plugin may be specified via cond. This is a function which has a function as its first argument. When this function argument is called, the plugin is loaded.

For example, the following plugin is lazy-loaded on the key mapping ga:

pckr.add{
  {"my/plugin", cond = function(load_plugin)
    vim.keymap.set('n', 'ga', function()
      vim.keymap.del('n', 'ga')
      load_plugin()
      vim.api.nvim_input('ga')
    end)
  end}
}

  -- equivalent to --

local keys = require('pckr.loader.keys')
pckr.add{
  {"my/plugin", cond = keys('n', 'ga') },
}

Automatically find local plugins

This snippet can be used to automatically detect local plugins in a particular directory.

local local_plugin_dir = vim.env.HOME..'/projects/'

local function resolve(x)
  if type(x) == 'string' and x:sub(1, 1) ~= '/' then
    local name = vim.split(x, '/')[2]
    local loc_install = vim.fs.join_paths(local_plugin_dir, name)
    if name ~= '' and vim.fn.isdirectory(loc_install) == 1 then
      return loc_install
    end
  end
end

local function try_get_local(spec)
  if type(spec) == 'string' then
    return resolve(spec) or spec
  end

  if not spec or type(spec[1]) ~= 'string' then
    return spec
  end

  return resolve(spec[1]) or spec[1]
end

local function walk_spec(spec, field, fn)
  if type(spec[field]) == 'table' then
    for j in ipairs(spec[field]) do
      walk_spec(spec[field], j, fn)
    end
    walk_spec(spec[field], 'requires', fn)
  end
  spec[field] = fn(spec[field])
end

local init {
  'nvim-treesitter/nvim-treesitter'
  -- plugins spec
}

walk_spec({init}, 1, try_get_local)

require('pckr').add(init)

Debugging

pckr.nvim logs to stdpath(cache)/pckr.nvim.log. Looking at this file is usually a good start if something isn't working as expected.

pckr.nvim's People

Contributors

acksld avatar adigitoleo avatar akinsho avatar amlmn avatar andreadev-it avatar axieax avatar deathlyfrantic avatar doctoromer avatar dsully avatar dundargoc avatar edeneast avatar elianiva avatar epheien avatar gbrlsnchs avatar github-actions[bot] avatar iron-e avatar jdelkins avatar kevinhwang91 avatar lewis6991 avatar n3wborn avatar nanotee avatar numtostr avatar runiq avatar shadmansaleh avatar timuntersberger avatar tjdevries avatar wbthomason avatar weilbith avatar younger-1 avatar zhou-yicheng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pckr.nvim's Issues

Filetype condition support

I'm trying to switch over to Pckr from Packer and from what I can tell, it looks like filetype conditions are not currently supported. Is that right? In the example in the readme, it's mentioned but not shown:

 -- Load on a combination of conditions: specific filetypes or commands
  -- Also run code after load (see the "config" key)
  { 'w0rp/ale',
    cond = cmd('ALEEnable'),
    config = function()
      vim.cmd[[ALEEnable]]
    end
  };

i.e.

specific filetypes or commands

I'm guessing this is leftover from the Packer fork. Is filetype support planned? Or does it exist and I'm just not seeing it? I don't see any code in /lua/pckr/loader that looks related but I'm not familiar with this codebase.

Thanks!

Error when loading some plugins

  • nvim --version: v0.10.0-dev-a1bec02
  • git --version: 2.42.0
  • Operating system/version: Linux 6.4.12-arch1-1
  • Terminal name/version: alacritty 0.12.2

Minimal config

local function bootstrap_pckr()
  local pckr_path = vim.fn.stdpath("data") .. "/pckr/pckr.nvim"
  if not vim.loop.fs_stat(pckr_path) then
    vim.fn.system({
      'git',
      'clone',
      "--filter=blob:none",
      'https://github.com/lewis6991/pckr.nvim',
      pckr_path
    })
  end
  vim.opt.rtp:prepend(pckr_path)
end
bootstrap_pckr()
require('pckr').add{'bluz71/vim-nightfly-colors'}

cmd function on example doesn't work

  • nvim --version: NVIM v0.9.1
  • git --version: git version 2.41.0
  • Operating system/version: NixOS 23.0
  • Terminal name/version: zsh 5.9 (x86_64-pc-linux-gnu)

Steps to reproduce

Write this cmd based on Example.

    {
        'lambdalisue/suda.vim',
        cond = {
            cmd {'SudaWrite', 'SudaRead'}
        }
    };

Actual behaviour

Return this error.

E5113: Error while calling lua chunk: ...omink/.config/nvim/lua/pckr.nvim/lua/pckr/loader/cmd.lua:6: Expected lua strin
g
stack traceback:
        [C]: in function 'nvim_create_user_command'
        ...omink/.config/nvim/lua/pckr.nvim/lua/pckr/loader/cmd.lua:6: in function 'cond'
        ...e/moomink/.config/nvim/lua/pckr.nvim/lua/pckr/loader.lua:219: in function 'load_plugins'
        ...e/moomink/.config/nvim/lua/pckr.nvim/lua/pckr/loader.lua:230: in function 'setup'
        /home/moomink/.config/nvim/lua/pckr.nvim/lua/pckr.lua:60: in function 'add'
        /home/moomink/.config/nvim/lua/plugins.lua:26: in main chunk
        [C]: in function 'require'
        /home/moomink/.config/nvim/init.lua:1: in main chunk


Expected behaviour

The following writing style worked fine.
I am not familiar with lua, but this is probably correct.

   {
        'lambdalisue/suda.vim',
        cond = {
            cmd ('SudaWrite'),
            cmd ('SudaRead')
        }
    };

pckr files

Plugin specification file(s)

init.lua

require("plugins")
require("options")
require("keymap")
require("lsp")
require("patch/nixos")

plugins.lua

local fn = vim.fn


-- Initilaize Installl
local ensure_packer = function()
    local install_path = fn.stdpath('config') .. '/lua/pckr.nvim'
    if fn.empty(fn.glob(install_path)) > 0 then
        fn.system({ 'git', 'clone', 
        '--depth', '1', 
        '--filter=blob:none','https://github.com/lewis6991/pckr.nvim', install_path })
        vim.opt.runtimepath:append(install_path)
    end
    vim.opt.runtimepath:append(install_path)
end

local packer_bootstrap = ensure_packer()


local cmd = require('pckr.loader.cmd')
local keys = require('pckr.loader.keys')

require('pckr').setup{
    log = { level = "info" }
}

require('pckr').add{

    'bronson/vim-trailing-whitespace';

    {
        'Yggdroot/indentLine',
        config = function()
            vim.cmd[[
                let g:indentLine_color_term = 0xFF
                "let g:indentLine_bgcolor_term = 0xEE
                let g:indentLine_first_char = '░'
                let g:indentLine_showFirstIndentLevel = 1
                let g:indentLine_char_list = ['❙','¦','|']
                let g:indentLine_leadingSpaceChar = '░'
                let g:indentLine_leadingSpaceEnabled = 0
            ]]
        end
    };

    'ConradIrwin/vim-bracketed-paste';


    {
        'simeji/winresizer',
        cond = keys('n','<C-r>')
    };

    'ap/vim-css-color';

    {
        'scrooloose/nerdtree',
        requires = "vim-devicons",
        config = function()
	        vim.keymap.set("","<C-n>",":NERDTreeToggle<CR>")
	    end
    };


    -- Utility
    {
        'lambdalisue/suda.vim',
        cond = {
            cmd ('SudaWrite'),
            cmd ('SudaRead')
        }
    };
    'jiangmiao/auto-pairs';
    'tpope/vim-surround';
    'tomtom/tcomment_vim';


    -- Theme
    {
        '4513ECHO/vim-colors-hatsunemiku',
        -- TODO add hatsune symblic link
        config = function()
            if vim.fn.has("gui_running") ~= 1 and vim.fn.has('termguicolors') == 1 then
                vim.opt.termguicolors = true
            end
        end
    };
    'whatyouhide/vim-gotham';
    'arcticicestudio/nord-vim';
    'tomasiser/vim-code-dark';

    -- 'vimwiki/vimwiki';

    {
        'vim-airline/vim-airline',
        requires = {"vim-airline-themes", "vim-devicons", "nerdfont.vim"},
        config = function()
            vim.cmd[[
                let g:airline_powerline_fonts = 1
                let g:airline#extensions#tabline#enabled = 1
                let g:airline#extensions#tabline#formatter = 'unique_tail_improved'
            ]]
        end
    };
    {
	    'vim-airline/vim-airline-themes',
	    config = function()
	        vim.cmd([[
	            let g:airline_theme='codedark'
	        ]])
        end
    };
    {
        'ryanoasis/vim-devicons',
        config = function()
            vim.cmd([[
            ]])
        end
    };
    'lambdalisue/nerdfont.vim';


    -- Language Server Protocol
    {
        "williamboman/mason.nvim",
        "williamboman/mason-lspconfig.nvim",
        "neovim/nvim-lspconfig",
        'lukas-reineke/lsp-format.nvim',
        'hrsh7th/nvim-cmp',
        'hrsh7th/cmp-nvim-lsp',
        'hrsh7th/cmp-buffer',
        'hrsh7th/cmp-path',
        'hrsh7th/cmp-cmdline',
        'mhartington/formatter.nvim'
    };

}

A way to call :Pckr install synchronously

Describe the feature

I tried a lot of ways of creating a 'sync' install, like lazy one, for example:

require 'pckr'.sync_install() -- Will block until all plugins were installed

require 'some.installed.plugin'.setup {}

Fresh install seems to be broken. Full `$XDG_DATA_HOME/nvim` wipe gets pckr to install nothing.

  • nvim --version:
    NVIM v0.10.0-dev-1282+g5f4f83ba3
    Build type: Release
    LuaJIT 2.1.1695653777
    
  • git --version: 2.42.0
  • Operating system/version: Manjaro Linux KDE
  • Terminal name/version: st-0.9

Steps to reproduce

  1. Convert all packages I used to manage with Packer, sticking exclusively to the syntax provided in the README.md.
  2. Wipe $XDG_DATA_HOME/nvim ($HOME/.local/share/nvim) to get fresh install.
  3. Start nvim. Get my own warnings as expected.
  4. :Pckr install

Actual behaviour

[pckr.nvim[INFO 21:39:07] actions.lua:327: All configured plugins are installed.
Yet none of my packages are cloned, let alone installed and loaded.

Expected behaviour

My packages to be installed...

pckr files

Plugin specification file(s)

abstract_setup.zip

This includes my init.lua, lua/pckr.lua and lua/pckr_ref.lua. You can check it using unzip -l <file>. The latter file is for my pending files to convert.

System wide install

Describe the feature

Hello,

packer.nvim supported working from a system wide install. This is enabled the system operator to configure Neovim on hosts with some minimal amount of Neovim packages installed alongside it, including Packer. The aim to reduce clutter in user's ${HOME} directories, and keep packages, and their state in sync with system installed Neovim.

Attempting to do the same with pckr.nvim results in the package not loading, the help is available, but Neovim cannot find the pckr module itself.

Is this possible? Am I installing pckr into the wrong location?
I install pckr.nvim to /usr/local/share/nvim/site/pack/pckr/start/pckr.nvim.

lazy load dependencies of condition loading plugin

Describe the feature

    {
      'nvim-tree/nvim-tree.lua',
      requires = {'nvim-tree/nvim-web-devicons'},
      cond = {cmd('NvimTreeOpen'), cmd('NvimTreeToggle')},
      config = function() require('config/nvim-tree') end,
    };

For example, in the above configuration, nvim-tree is conditionally loaded, but its dependency becomes unconditionally loaded.

It is best to load the dependencies of nvim-tree before loading it, rather than loading these dependencies at nvim startup.

helptags generation fails with, E154: Duplicate tag "pckr-commands-sync" in file doc/packer.txt

  • nvim --version:
    NVIM v0.9.2
    Build type: Release
    LuaJIT 2.1.0-beta3

    system vimrc file: "$VIM/sysinit.vim"
    fall-back for $VIM: "/usr/local/share/nvim"

  • git --version:
    git version 2.42.0

  • Operating system/version:
    uname -rs
    FreeBSD 15.0-CURRENT

  • Terminal name/version:
    alacritty 0.12.2

Steps to reproduce

$ cd  ${checkout}
$ nvim -u NONE -i NONE -e --headless -c "helptags doc" -c "quit"

Actual behaviour

helptags doc generates tags with the following error:
E154: Duplicate tag "pckr-commands-sync" in file doc/packer.txt

Expected behaviour

Generate helptags without error.

pckr files

Plugin specification file(s)

N/A. Part of automating package/port process on FreeBSD.

Patch to fix typo in doc/packer.txt:

--- doc/packer.txt.orig 2023-10-11 09:43:39 UTC
+++ doc/packer.txt
@@ -128,7 +128,7 @@ updates.
 Supports the `--preview` flag as an optional first argument to preview
 updates.

-`Pckr lock`                                            *pckr-commands-sync*
+`Pckr lock`                                            *pckr-commands-lock*
 TODO

 `Pckr restore` 

Many thanks in your general direction.

`Assertion failed` in `async.lua:108`

  • nvim --version:
NVIM v0.11.0-dev-3643+g0cdeb06db-Homebrew
Build type: Release
LuaJIT 2.1.1720049189
  • git --version:
git version 2.45.2
  • Operating system/version:
macOS Sonoma 14.5
  • Terminal name/version:
wezterm 20240715-080945-c9116830

Steps to reproduce

  1. Save content of Plugin specification file(s) to some.lua
  2. nvim -nu some.lua
  3. :Pckr sync

Actual behaviour

Could't find setting/plugin combo that causes it, seems to be happening even on pretty simple plugin list. Bisecting lead to:
e200b7724ecb0e9c07a32e505592f990266fc819 is the first bad commit.

Error executing Lua callback: ...oune/.local/share/nvim/pckr/pckr.nvim/lua/pckr/async.lua:29: The coroutine failed with this message: ...oune/.local/share/nvim/pckr/pckr.nvim/lua/pckr/async.lua:108: assertion failed!

stack traceback:
        [C]: in function 'assert'
        ...oune/.local/share/nvim/pckr/pckr.nvim/lua/pckr/async.lua:108: in function 'do_clean'
        ...ne/.local/share/nvim/pckr/pckr.nvim/lua/pckr/actions.lua:332: in function 'sync'
        ...ne/.local/share/nvim/pckr/pckr.nvim/lua/pckr/actions.lua:396: in function <...ne/.local/share/nvim/pckr/pckr.nvim/lua/pckr/actions.lua:395>
stack traceback:
        [C]: in function 'error'
        ...oune/.local/share/nvim/pckr/pckr.nvim/lua/pckr/async.lua:29: in function 'step'
        ...oune/.local/share/nvim/pckr/pckr.nvim/lua/pckr/async.lua:52: in function 'run'
        ...oune/.local/share/nvim/pckr/pckr.nvim/lua/pckr/async.lua:110: in function 'cmd_func'
        .../gegoune/.local/share/nvim/pckr/pckr.nvim/lua/pckr/cli.lua:89: in function <.../gegoune/.local/share/nvim/pckr/pckr.nvim/lua/pckr/cli.lua:74>

Expected behaviour

No error, do the sync.

pckr files

Plugin specification file(s)
local function bootstrap_pckr()
  local pckr_path = vim.fn.stdpath('data') .. '/pckr/pckr.nvim'

  if not vim.uv.fs_stat(pckr_path) then
    vim.fn.system({
      'git',
      'clone',
      '--filter=blob:none',
      'https://github.com/lewis6991/pckr.nvim',
      pckr_path,
    })
  end

  vim.opt.rtp:prepend(pckr_path)
end

bootstrap_pckr()

require('pckr').setup({})

require('pckr').add({ 'tpope/vim-repeat' })

plugin/* not loaded when `nvim {file}`

  • nvim --version: 0.10
  • git --version: 2.24.3
  • Operating system/version: macOS Catalina 10.15.7 19H2026 x86_64
  • Terminal name/version: alacritty

Steps to reproduce

  • $ mkdir plugin1/plugin -p
  • $ echo 'echomsg "helloworld"' > plugin1/plugin/x.vim
  • $ mv plugin1 pckr/opt/ # move to where pckr opt dir (local plugin seems not work)
  • add plugin spec:
    {
      'xxx/plugin1',
      cond = event('FileType'),
    };
  • $ touch a.go
  • $ nvim a.go
  • :mes

Actual behaviour

no message

Expected behaviour

one messsage:
helloworld

pckr files

Plugin specification file(s)
    {
      'xxx/plugin1',
      cond = event('FileType'),
    };

Latest nvim-treesitter update throws git error

The latest nvim-treesitter update (HEAD) which is pulling this commit completes successfully but throws:

 ✗ nvim-treesitter: failed to update
   fatal: ambiguous argument 'a80fe081b4c5890980561e0de2458f64aaffbfc7...nil': unknown revision or path not in the working tree.
   Use '--' to separate paths from revisions, like this:
   'git <command> [<revision>...] -- [<file>...]'
  1. Add nvim-treesitter using this pckr manifest:
require("pckr").add {
    { "nvim-treesitter/nvim-treesitter", cond = function(load_plugin)
        if is_executable('tree-sitter') then load_plugin() end
    end, run = ":TSUpdate" },
}
  1. Run :Pckr update while the mentioned commit is the HEAD of nvim-treesitter.

I think I've also had issues with a similar configuration for fzf before:

require("pckr").add {
    { "junegunn/fzf", run = ":call fzf#install()", cond = function(load_plugin)
        if system == "Windows_NT" or is_executable("apt") then load_plugin() end
    end },
}

which has thrown errors from fzf#update() on Linux systems where this plugin should not be loaded. Does the run function evaluate after cond is checked?

Allow cleanup when reloading the configuration

Background

tldr: When configuring neovim, it is essential to me that I can reload my configuration without having to exit and restart neovim

I've been a long time vim user, and the ability to re-source the vimrc file seems to be common for old vimscript hackers (it's one of the first tips of Learn Vimscript the Hard Way, setup keyboard shortcuts to quickly edit, and source the vimrc file.

Right now, I'm building a new neovim config from scratch. Previously, I used packer, which did support this, so I decided to go with pckr for now.

(I looked at lazy.nvim, and it specifically does not support this, which is mind boggling to me. I might be able to get it to work with user events, but, arg.)

What I specifically like about pckr over other managers I've used

One thing I really like about pckr is the ability to progressively add plugins; which allows me to moduralise the configuration; while still keeping the plugin specification and the plugin initialization colocated in code.

The Problem: Invalid plugin names are remembered - forcing a restart

tldr; When I have added a bad plugin name, I'm forced to quitting neovim. Re-sourcing the config results in an error after I fixed it.

My specific problem I run into is when I have made a mistake, and added an invalid plugin name. pckr remembers this, and wants to try to install it on every reload. I need to restart neovim to clear the state (as far as I can tell)

E.g. I wanted to add catppuccin color scheme, so I added this

require("pckr").add({
  "catppuccin"
})

And sourced my config, and get an error, because the plugin spec was wrong. I fixed the config,

require("pckr").add({
  "catppuccin/nvim"
})

When I re-source my config, packer still remembers that the bad "catppuccin" plugin is not installed, and tries to do that; resulting in an error. I'm left with no alternative but to quit neovim.

As far as I can tell, this information is stored in a local in plugins.lua, and there are no functions exposed to remove added plugin specifications.

Possible solution 1: Add a remove function

This is a more imperative approach, I would prefer a declarative approach; i.e. you specify which plugins you need, and unused are cleaned up automatically.

Also, the remove call is something I'd never want to commit. In the previous case, I might have added a remove call, resourced, and then remove the line again.

But it would probably be the easier solution to the problem.

Possible solution 2: Add a begin / commit cycle

This is inspired by VimPlug that I did use for many years - but I would not suggest an identical approach.

VimPlug, as far as I remember, builds up a list of plugins to install inside the begin/end cycle, but doesn't install them until after calling end. I would still suggest that plugins are installed after calling add, so you can configure them immediately afterwards, explicitly (as opposed to setting a config function).

local pckr = require("pckr")
pckr.begin()
require("load_and_initialize_plugin_1") 
require("load_and_initialize_plugin_1")
-- Small experiment, just place this in the main init.lua for now, I may move it later
pckd.add("plugin_3")
require("plugin_3").setup({ ... })
pckr.end() -- Remove previously installed unused plugins here

So cleanup of extra installed plugins could happen in the final end call

Lazy loading with dependent plugins isn't working

Set up:

nvim --version
NVIM v0.9.4
Build type: Release
LuaJIT 2.1.1692716794

While trying to use such plugins.lua, it fails to lazy load a plugin based on NERDTreeTabsToggle command. Note, the actual code of the pckr.nvim is cloned and etc. it works in simpler configuration without using any conds:

local pckr_path = vim.fn.stdpath("data") .. "/pckr/pckr.nvim"
vim.opt.rtp:prepend(pckr_path)

local cmd = require('pckr.loader.cmd')
local keys = require('pckr.loader.keys')

-- Plugins
require('pckr').add({
  -- File tree
  { 'scrooloose/nerdtree',
    cond = {
      cmd('NERDTreeTabsToggle')
    }
  },
  { 'jistr/vim-nerdtree-tabs',
    cond = {
      cmd('NERDTreeTabsToggle')
    }
  }
})

Note that vim-nerdtree-tabs is built as an extension of nerdtree. I.e. it's using it. So I tried to put a command from the former as a lazy loading trigger for both. But in result it gives me this error when I try to use :NERDTreeTabsToggle

Error executing Lua callback: vim/_editor.lua:0: nvim_exec2(): Vim:E492: Not an editor command:  NERDTreeTabsToggle 
stack traceback:
        [C]: in function 'nvim_exec2'
        vim/_editor.lua: in function 'cmd'
        ....local/share/nvim/pckr/pckr.nvim/lua/pckr/loader/cmd.lua:9: in function <....local/share/nvim/pckr/pckr.nvim/lua/pckr/loader/cmd.lua:6>

First Install Error Spam "git.lua:131: Unexpected output"

Alex from nvim-tree here. Many thanks for putting together this fantastic plugin manager - it's the minimalistic one we've all been looking for.

: ; nvim --version
NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1720049189
Run "nvim -V1 -v" for more info
: ; git --version
git version 2.45.2
: ; uname -a
Linux emperor 6.9.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 05 Jul 2024 22:11:24 +0000 x86_64 GNU/Linux
: ; alacritty --version
alacritty 0.13.2 (bb8ea18e)

Steps to reproduce

init.lua.gz

rm -rf /tmp/nvim-pckr-test
nvim -nu /path/to/init.lua

Actual behaviour

printed at startup

[pckr.nvim[ERROR 13:23:27] git.lua:136: ...m-pckr-test/pckr/pckr.nvim/lua/pckr/plugin_types/git.lua:131: Unexpected output:
[pckr.nvim[ERROR 13:23:27] git.lua:136: ...m-pckr-test/pckr/pckr.nvim/lua/pckr/plugin_types/git.lua:131: Unexpected output:
Press ENTER or type command to continue
[pckr.nvim[ERROR 13:23:29] git.lua:136: ...m-pckr-test/pckr/pckr.nvim/lua/pckr/plugin_types/git.lua:131: Unexpected output:
Press ENTER or type command to continue
...
...
...

See :Pckr log
plog.gz

Plugins apparently load OK but it's hard to be sure. A sync after restarting seems OK.

Expected behaviour

No errors.

Seemingly random require order sometimes causes errors

  • nvim --version: v0.10.0
  • git --version: 2.45.2
  • Operating system/version: Archlinux
  • Terminal name/version: st terminal (own patch)

Steps to reproduce

Start neovim by requiring my plugins.lua file in the init.lua.

Actual behaviour

Sometimes I get this error that pops up, after which none of my LSP-related features work. I can fix this by restarting neovim 1 or more times until it starts up without having the error pop up.

[pckr.nvim[ERROR 09:17:02] loader.lua:10: Error running config for nvim-lspconfig:
^I/home/jjr/.config/nvim/lua/config/lspconfig.lua:26: module 'cmp_nvim_lsp' not found:
^Ino field package.preload['cmp_nvim_lsp']
^Ino file './cmp_nvim_lsp.lua'
^Ino file '/usr/share/luajit-2.1/cmp_nvim_lsp.lua'
^Ino file '/usr/local/share/lua/5.1/cmp_nvim_lsp.lua'
^Ino file '/usr/local/share/lua/5.1/cmp_nvim_lsp/init.lua'
^Ino file '/usr/share/lua/5.1/cmp_nvim_lsp.lua'
^Ino file '/usr/share/lua/5.1/cmp_nvim_lsp/init.lua'
^Ino file './cmp_nvim_lsp.so'
^Ino file '/usr/local/lib/lua/5.1/cmp_nvim_lsp.so'
^Ino file '/usr/lib/lua/5.1/cmp_nvim_lsp.so'
^Ino file '/usr/local/lib/lua/5.1/loadall.so'

My theory for this is that Pckr does not import the plugins in any specific order. However, some of my plugins do use each either's module in their config, causing the module 'cmp_nvim_lsp' not found error if the plugin that requires it was loaded before the cmp_nvim_lsp.

I only started seeing this behavior after I migrated from Packer to Pckr recently.

Expected behaviour

For this error to not occur, and the plugin configs to load correctly.

pckr files

Plugin specification file(s)
local function bootstrap_pckr()
  local pckr_path = vim.fn.stdpath("data") .. "/pckr/pckr.nvim"

  if not vim.uv.fs_stat(pckr_path) then
    vim.fn.system({
      'git',
      'clone',
      "--filter=blob:none",
      'https://github.com/lewis6991/pckr.nvim',
      pckr_path
    })
  end

  vim.opt.rtp:prepend(pckr_path)
end

bootstrap_pckr()

require('pckr').add{
    {
        "tpope/vim-fugitive",
        config = function()
            require('config.fugitive')
        end
    },
    {
        "ctrlpvim/ctrlp.vim",
        config_pre = function()
            require('config.ctrlp')
        end
    },
    "tpope/vim-commentary",
    {
        "preservim/nerdtree",
        config = function()
            require('config.nerdtree')
        end
    },
    "jiangmiao/auto-pairs",
    "editorconfig/editorconfig-vim",
    {
        "marko-cerovac/material.nvim",
        config = function()
            vim.cmd("colorscheme material")
            -- color material
            nmap("<leader>c", [[<Cmd>lua require('material.functions').toggle_style()<CR>]])
        end
    },
    {
        'hrsh7th/nvim-cmp',
        config = function()
            require('config.cmp')
        end
    },
    'hrsh7th/cmp-nvim-lsp',
    'hrsh7th/cmp-buffer',
    'hrsh7th/cmp-path',
    'hrsh7th/cmp-cmdline',
    {
        "neovim/nvim-lspconfig",
        config = function()
            require('config.lspconfig')
        end
    },
    {
        "nvim-treesitter/nvim-treesitter",
        run = ":TSUpdate",
        config = function()
            require("config.treesitter")
        end
    },

    -- Toggleable terminals
    {
       "akinsho/toggleterm.nvim",
        config = function()
            require('config.toggleterm')
        end
    },
    {
        "ms-jpq/coq_nvim",
        config = "config.coq"
    },
    "L3MON4D3/LuaSnip",
    "saadparwaiz1/cmp_luasnip"
}

`clean` and `sync` commands do not work on Windows

  • nvim --version:
NVIM v0.10.1
Build type: Release
LuaJIT 2.1.1713484068
  • git --version: git version 2.46.0.windows.1
  • Operating system/version: Windows 11 Home 23H2
  • Terminal name/version: alacritty 0.13.2 (bb8ea18)

Steps to reproduce

  • nvim -u NORC
  • :Pckr clean OR :Pckr sync

Actual behaviour

Pckr clean log:

Error executing Lua callback: ...m-data\site\pack\pckr\start\pckr.nvim/lua/pckr/async.lua:29: The coroutine failed with this message: ...m-data\site\pack\pckr\start\pckr.nvim/lua/pckr/async.lua:108: assertion failed!
stack traceback:
	[C]: in function 'assert'
	...m-data\site\pack\pckr\start\pckr.nvim/lua/pckr/async.lua:108: in function 'do_clean'
	...data\site\pack\pckr\start\pckr.nvim/lua/pckr/actions.lua:416: in function <...data\site\pack\pckr\start\pckr.nvim/lua/pckr/actions.lua:415>
stack traceback:
	[C]: in function 'error'
	...m-data\site\pack\pckr\start\pckr.nvim/lua/pckr/async.lua:29: in function 'step'
	...m-data\site\pack\pckr\start\pckr.nvim/lua/pckr/async.lua:52: in function 'run'
	...m-data\site\pack\pckr\start\pckr.nvim/lua/pckr/async.lua:110: in function 'cmd_func'
	...vim-data\site\pack\pckr\start\pckr.nvim/lua/pckr/cli.lua:89: in function <...vim-data\site\pack\pckr\start\pckr.nvim/lua/pckr/cli.lua:74>

Pckr sync log:

Error executing Lua callback: ...m-data\site\pack\pckr\start\pckr.nvim/lua/pckr/async.lua:29: The coroutine failed with this message: ...m-data\site\pack\pckr\start\pckr.nvim/lua/pckr/async.lua:108: assertion failed!
stack traceback:
	[C]: in function 'assert'
	...m-data\site\pack\pckr\start\pckr.nvim/lua/pckr/async.lua:108: in function 'do_clean'
	...data\site\pack\pckr\start\pckr.nvim/lua/pckr/actions.lua:332: in function 'sync'
	...data\site\pack\pckr\start\pckr.nvim/lua/pckr/actions.lua:396: in function <...data\site\pack\pckr\start\pckr.nvim/lua/pckr/actions.lua:395>
stack traceback:
	[C]: in function 'error'
	...m-data\site\pack\pckr\start\pckr.nvim/lua/pckr/async.lua:29: in function 'step'
	...m-data\site\pack\pckr\start\pckr.nvim/lua/pckr/async.lua:52: in function 'run'
	...m-data\site\pack\pckr\start\pckr.nvim/lua/pckr/async.lua:110: in function 'cmd_func'
	...vim-data\site\pack\pckr\start\pckr.nvim/lua/pckr/cli.lua:89: in function <...vim-data\site\pack\pckr\start\pckr.nvim/lua/pckr/cli.lua:74>

Expected behaviour

Commands clean and sync work as expected.

Aside: It could be nice to have :Pckr upgrade print the version number/git hash in the window title, or add it somewhere in the helpfiles. Before creating this issue I tried finding a version number for Pckr to add to the report but had no luck. I could find where the git repo is cloned in my Windows userdata somewhere but that extra friction is not optimal.

pckr/loader.lua :58: attempt to call field 'joinpath' (a nil value)

  • nvim --version:
NVIM v0.9.1
Build type: Release
LuaJIT 2.1.1692616192
  • git --version:

git version 2.42.0

  • Operating system/version:

Linux lmbook 5.15.130-1-MANJARO #1 SMP PREEMPT Sat Sep 2 20:56:09 UTC 2023 x86_64 GNU/Linux

  • Terminal name/version:

kitty 0.29.2 created by Kovid Goyal

Steps to reproduce

Create simpliest init.lua file (see bellow) to give pckr a test but get an error at nvim launch

Actual behaviour

When nvim is launch, got following error:

Error executing vim.schedule lua callback: /home/<user>/.local/share/nvim/pckr/pckr.nvim/lua/pckr.lua:57: Error executing lua: ...ser>/.local/share/nvim/pckr/pckr.nvim/lua/pckr/loader.lua
:58: attempt to call field 'joinpath' (a nil value)
stack traceback:
        ...ser>/.local/share/nvim/pckr/pckr.nvim/lua/pckr/loader.lua:58: in function 'source_runtime'
        ...ser>/.local/share/nvim/pckr/pckr.nvim/lua/pckr/loader.lua:199: in function 'do_loadplugins'
        ...ser>/.local/share/nvim/pckr/pckr.nvim/lua/pckr/loader.lua:233: in function <...ser>/.local/share/nvim/pckr/pckr.nvim/lua/pckr/loader.lua:227>
        [C]: in function 'nvim_win_call'
        /home/<user>/.local/share/nvim/pckr/pckr.nvim/lua/pckr.lua:57: in function 'callback'
        ...ser>/.local/share/nvim/pckr/pckr.nvim/lua/pckr/async.lua:23: in function <...ser>/.local/share/nvim/pckr/pckr.nvim/lua/pckr/async.lua:7>
stack traceback:
        [C]: in function 'nvim_win_call'
        /home/<user>/.local/share/nvim/pckr/pckr.nvim/lua/pckr.lua:57: in function 'callback'
        ...ser>/.local/share/nvim/pckr/pckr.nvim/lua/pckr/async.lua:23: in function <...ser>/.local/share/nvim/pckr/pckr.nvim/lua/pckr/async.lua:7>
Press ENTER or type command to continue

terminal_screenshot

Expected behaviour

Expect the declared plugin to be cloned from git and loaded in nvim.

pckr files

/home/username/.config/nvim/init.lua:

local function bootstrap_pckr()
    local pckr_path = vim.fn.stdpath("data") .. "/pckr/pckr.nvim"
  
    if not vim.loop.fs_stat(pckr_path) then
      vim.fn.system({
        'git',
        'clone',
        "--filter=blob:none",
        'https://github.com/lewis6991/pckr.nvim',
        pckr_path
      })
    end
  
    vim.opt.rtp:prepend(pckr_path)
  end
  
  bootstrap_pckr()

  require('pckr').add{
  -- Simple plugins can be specified as strings
  '9mm/vim-closer';
  }

Error: attempt to yield across C -call boundary

  • nvim --version: NVIM v0.9.5 LuaJIT 2.1.1692716794
  • git --version: 2.43.2
  • Operating system/version: Fedora 39
  • Terminal name/version: Alacritty

Steps to reproduce

Use pckr.nvim Quickstart example with one Plugin.

Actual behaviour

Error when calling require('pckr').add{} in init.lua

Error detected while processing /home/julian/.config/nvim/init.lua:
E5113: Error while calling lua chunk: ...an/.local/share/nvim/pckr/pckr.nvim/lua/pckr/actions.lua:337: attempt to yield across C
-call boundary
stack traceback:
        [C]: in function 'main'
        ...an/.local/share/nvim/pckr/pckr.nvim/lua/pckr/actions.lua:337: in function 'sync'
        ...an/.local/share/nvim/pckr/pckr.nvim/lua/pckr/actions.lua:373: in function 'install'
        /home/julian/.local/share/nvim/pckr/pckr.nvim/lua/pckr.lua:55: in function 'add'
        /home/julian/.config/nvim/init.lua:19: in main chunk

Expected behaviour

Should work.

Don't works: "Error executing luv callback"

  • nvim --version: NVIM v0.9.1 Build type: Release LuaJIT 2.1.0-beta3
  • git --version: 2.41.0
  • Operating system/version: Archlinux
  • Terminal name/version: Konsole

Steps to reproduce

copy the lines of the configure in the nvim init.lua

Actual behaviour

Error executing luv callback:                                                                                                                                              
...afocl/.local/share/nvim/pckr/pckr.nvim/lua/pckr/jobs.lua:26: attempt to call field 'system' (a nil value)
stack traceback:
        ...afocl/.local/share/nvim/pckr/pckr.nvim/lua/pckr/jobs.lua:26: in function 'fn_or_ret'
        ...focl/.local/share/nvim/pckr/pckr.nvim/lua/pckr/async.lua:30: in function <...focl/.local/share/nvim/pckr/pckr.nvim/lua/pckr/async.lua:7>
Press ENTER or type command to continue

Expected behaviour

install and works

packer files

packer log file

~/.cache/nvim/packer.nvim.log is not exist

packer compiled file

contents of packer_compiled.vim is not exist

Filetype plugins are loaded after default filetype plugins provided by Neovim

  • nvim --version:
    NVIM v0.10.0
    Build type: Release
    LuaJIT 2.1.1713484068
  • git --version:
    git version 2.34.1
  • Operating system/version:
    Pop!_OS 22.04 LTS (based on Ubuntu 22.04). Kernel version 6.9.3
  • Terminal name/version:
    kitty 0.32.0

Steps to reproduce

Create minimal config minimal.lua with the following contents:

local function bootstrap_pckr()
  local pckr_path = vim.fn.stdpath("data") .. "/pckr/pckr.nvim"

  if not vim.uv.fs_stat(pckr_path) then
    vim.fn.system({
      'git',
      'clone',
      "--filter=blob:none",
      'https://github.com/lewis6991/pckr.nvim',
      pckr_path
    })
  end

  vim.opt.rtp:prepend(pckr_path)
end

bootstrap_pckr()

require('pckr').add({
      'lervag/vimtex'
})

Then open a tex file with neovim using the created çonfig:

nvim -u minimal.lua foo.tex

Actual behaviour

The popular Vimtex plugin does not work with Pckr.nvim. The plugin gets loaded by Pckr (as can be seen from Pckr status). However, the Vimtex plugin is not initialized correctly.
This is due to the fact that default ftplugin files for latex are loaded before the ftplugin files provided by Vimtex, and thus
b:did_ftplugin is already set to 1 when the custom ftplugin files provided by Vimtex are reached. This prevents Vimtex from initializing correctly. The incorrect order of loading can be easily verified by looking via :scriptnames .

  1: /usr/share/nvim/runtime/ftplugin.vim
  2: /usr/share/nvim/runtime/indent.vim
  3: ~/minimal.lua
  4: /usr/share/nvim/runtime/filetype.lua
  5: ~/.local/share/nvim/site/pack/pckr/opt/vimtex/ftdetect/cls.vim
  6: ~/.local/share/nvim/site/pack/pckr/opt/vimtex/ftdetect/tex.vim
  7: ~/.local/share/nvim/site/pack/pckr/opt/vimtex/ftdetect/tikz.vim
  8: /usr/share/nvim/runtime/syntax/syntax.vim
  9: /usr/share/nvim/runtime/syntax/synload.vim
 10: ~/.local/share/nvim/pckr/pckr.nvim/plugin/pckr.lua
 27: ~/.local/share/nvim/site/pack/pckr/opt/vimtex/plugin/vimtex.vim
 29: /usr/share/nvim/runtime/ftplugin/tex.vim
 30: /usr/share/nvim/runtime/ftplugin/plaintex.vim
 31: /usr/share/nvim/runtime/ftplugin/initex.vim
 32: ~/.local/share/nvim/site/pack/pckr/opt/vimtex/ftplugin/tex.vim
 33: ~/.local/share/nvim/site/pack/pckr/opt/vimtex/after/ftplugin/tex.vim
 34: ~/.local/share/nvim/site/pack/pckr/opt/vimtex/autoload/vimtex/util.vim
 35: /usr/share/nvim/runtime/indent/tex.vim
 36: ~/.local/share/nvim/site/pack/pckr/opt/vimtex/indent/tex.vim
 37: /usr/share/nvim/runtime/syntax/tex.vim
 38: ~/.local/share/nvim/site/pack/pckr/opt/vimtex/syntax/tex.vim                                                                                                                                                                                                                                           

(Some non-relevant lines are redacted). As one can see, the default files in /usr/share/nvim/runtime/ftplugin are loaded before the Vimtex provided filetype plugin files are loaded, which causes the described issue. See lervag/vimtex#1413 for more details.

Note that while I have encountered this issue only with Vimtex, I would expect this issue to occur with all filetype plugins
that override the default filetype plugin behaviour.

Expected behaviour

The ftplugin files provided by a filetype plugin (such as vimtex) are loaded before the (possible) default ftplugin files provided by (neo)vim. I can see at least two ways of solving this issue:

  1. Place filetype plugins in pack/*/start, as recommended in :help packages. This could be achieved via additional opt key in the plugin specification (similar to packer.nvim).
  2. Modify the runtime-path in such way that the plugins are loaded before the default filetype plugin.

While debugging this issue, I noticed that this issue can be circumvented by modifying the rtp in the config_pre block:

local function bootstrap_pckr()
  local pckr_path = vim.fn.stdpath("data") .. "/pckr/pckr.nvim"

  if not vim.uv.fs_stat(pckr_path) then
    vim.fn.system({
      'git',
      'clone',
      "--filter=blob:none",
      'https://github.com/lewis6991/pckr.nvim',
      pckr_path
    })
  end

  vim.opt.rtp:prepend(pckr_path)
end

bootstrap_pckr()

require('pckr').add({
      'lervag/vimtex',
      config_pre = function()
            vim.opt.rtp:prepend(vim.fn.stdpath('data') .. '/site/pack/pckr/opt/vimtex')
      end
})

However, I feel that the `proper` solution to this issue would be to install filetype plugins in pack/*/start/.

Wildcard * does not work for latest tag

  • nvim --version: NVIM v0.9.5, LuaJIT 2.1.1703358377
  • git --version: 2.43.0
  • Operating system/version: Linux Mint 22
  • Terminal name/version: Kitty (xterm-kitty)

Steps to reproduce

Add a '*' for any plugin's tag and then update with :Pckr update

    { 
        'freddiehaddad/feline.nvim',
        tag = '*',
        config = function() require('feline').setup() end
    }

Actual behaviour

Error executing luv callback:                                                                                                                 
.../.local/share/nvim/pckr/pckr.nvim/lua/pckr/async.lua:29: The coroutine failed with this message: vim/shared.lua:95: s: expected string, got nil
stack traceback:                                                                                                                              
        [C]: in function 'error'                                                                                                              
        vim/shared.lua:764: in function 'validate'                                                                                            
        vim/shared.lua:95: in function 'gsplit'                                                                                               
        vim/shared.lua:178: in function 'split'                                                                                               
        .../share/nvim/pckr/pckr.nvim/lua/pckr/plugin_types/git.lua:282: in function 'resolve_tag'                                            
        .../share/nvim/pckr/pckr.nvim/lua/pckr/plugin_types/git.lua:323: in function 'checkout'                                               
        .../share/nvim/pckr/pckr.nvim/lua/pckr/plugin_types/git.lua:514: in function 'update'                                                 
        .../share/nvim/pckr/pckr.nvim/lua/pckr/plugin_types/git.lua:558: in function 'updater'                                                
        .../.local/share/nvim/pckr/pckr.nvim/lua/pckr/actions.lua:229: in function <.../.local/share/nvim/pckr/pckr.nvim/lua/pckr/actions.lua:219>                                                                                                                                      
stack traceback:                                                                                                                              
        [C]: in function 'error'                                                                                                              
        .../.local/share/nvim/pckr/pckr.nvim/lua/pckr/async.lua:29: in function 'cb'                                                      
        .../.local/share/nvim/pckr/pckr.nvim/lua/pckr/async.lua:68: in function 'callback'                                                
        .../.local/share/nvim/pckr/pckr.nvim/lua/pckr/jobs.lua:25: in function 'on_exit'                                                 
        ...cal/share/nvim/pckr/pckr.nvim/lua/pckr/system/compat.lua:260: in function <...cal/share/nvim/pckr/pckr.nvim/lua/pckr/system/compat.lua:230>

Expected behaviour

Should update and install the latest tag of the plugin

pckr files

None (could provide a minimal repoducible example)

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.