wbthomason / packer.nvim

A use-package inspired plugin manager for Neovim. Uses native packages, supports Luarocks dependencies, written in Lua, allows for expressive config
MIT License
7.72k stars 263 forks source link

Packer does not seem to be recognized after tree sitter install #1173

Closed bartek closed 1 year ago

bartek commented 1 year ago
❯ nvim --version
NVIM v0.8.1
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by brew@HMBRW-A-001-M1-004.local

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.8.1/share/nvim"

Run :checkhealth for more info

Steps to reproduce

  1. I installed packer.nvim following instructions. This was a "clean" packer install (I am migrating from vim-plugged)
  2. Via packer, I installed telescope, a colorscheme and that was functioning nicely
  3. I then installed treesitter and added configuration (in after/). I allowed packer to install TS
  4. Packer stopped working and I could not install any more plugins.

I then went on to re-install packer (git clone after deleting directory). No longer am I able to call any :Packer... command (they are not available). I do not see any errors on startup.

I removed all tree sitter (and other plugin) configuration. Slimming down to init.lua with this ensure:

-- Ensure packer is installed. See lua/bartek/packer.lua for dependencies
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', 'https://github.com/wbthomason/packer.nvim', install_path})
    vim.cmd [[packadd packer.nvim]]
    return true
  end
  return false
end

local packer_bootstrap = ensure_packer()

And a lua/bartek/packer.lua with the following contents:

vim.cmd [[packadd packer.nvim]]

return require('packer').startup(function(use)
  -- Packer can manage itself
  use 'wbthomason/packer.nvim'

  -- Automatically setup configuration after cloning packer.nvim
  if packer_bootstrap then
    require('packer').sync()
  end
end)

I've tried restarting terminal, OS, and forcing installs etc, but no luck.

packer log file There is nothing in ~/.cache/nvim/packer.nvim.log
packer compiled file Post the contents of `packer_compiled.vim` here