init.lua icon indicating copy to clipboard operation
init.lua copied to clipboard

Errors when trying to install treesitter

Open GabrielBrandao1618 opened this issue 2 years ago • 3 comments

How to reproduce

I just followed the video, everything was working fine until I tried to install treesitter

My packer.lua is the following:

vim.cmd [[packadd packer.nvim]]

return require('packer').startup(function(use)
  use 'wbthomason/packer.nvim'

  use {
          'nvim-telescope/telescope.nvim', tag = '0.1.0',
          requires = { {'nvim-lua/plenary.nvim'} }
  }
  use({
          'rose-pine/neovim',
          as = 'rose-pine',
          config = function()
                  vim.cmd('colorscheme rose-pine')
          end
  })
  use('nvim-treesitter/nvim-treesitter', {run = ':TSUpdate'})
end)

Then I run PackerSync and treesitter is installed as expected. When I open neovim again, it just give me a lot of errors image image

(By the way, 'gabri' is my user)

nvim --version output:

NVIM v0.9.0-dev-522+g174335923
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/gcc-10 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/runner/work/neovim/neovim/build/cmake.config -I/home/runner/work/neovim/neovim/src -I/home/runner/work/neovim/neovim/.deps/usr/include -I/usr/include -I/home/runner/work/neovim/neovim/build/src/nvim/auto -I/home/runner/work/neovim/neovim/build/include
Compiled by runner@fv-az443-679

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

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

Run :checkhealth for more info

My treesitter.lua:

require'nvim-treesitter.configs'.setup {
  ensure_installed = {"typescript"},

  sync_install = false,
  auto_install = true,

  highlight = {
    enable = true,
    additional_vim_regex_highlighting = false,
  },
}

Am I missing something? Should I use another version of neovim?

GabrielBrandao1618 avatar Dec 18 '22 21:12 GabrielBrandao1618

I had a similar issue and the problem, for me, turned out to be "vim.cmd". Try commenting that line as see if that helps. I am not exactly sure about the reason, tried to search around getting nowhere.

Before: Screenshot 2022-12-19 at 7 47 12 PM

After: Screenshot 2022-12-19 at 7 47 23 PM

harmeepatel avatar Dec 20 '22 00:12 harmeepatel

I had a similar issue and the problem, for me, turned out to be "vim.cmd". Try commenting that line as see if that helps. I am not exactly sure about the reason, tried to search around getting nowhere.

Before: Screenshot 2022-12-19 at 7 47 12 PM

After: Screenshot 2022-12-19 at 7 47 23 PM

I just tried this and nothing changed🙁

Looks like this is an neovim instalation issue, I am trying to build and then install it again.

GabrielBrandao1618 avatar Dec 20 '22 12:12 GabrielBrandao1618

Looks like this is an neovim instalation issue, I am trying to build and then install it again.

I builded and installed neovim following the documentation, but I receive the same exact errors😬

GabrielBrandao1618 avatar Dec 20 '22 13:12 GabrielBrandao1618

Looks like this is an neovim instalation issue, I am trying to build and then install it again.

I builded and installed neovim following the documentation, but I receive the same exact errorsgrimacing

Before install try to remove all configurations of neovim and vim.

Check if :h rtp is all ok!

daltondiaz avatar Dec 21 '22 00:12 daltondiaz

Looks like this is an neovim instalation issue, I am trying to build and then install it again.

I builded and installed neovim following the documentation, but I receive the same exact errorsgrimacing

Before install try to remove all configurations of neovim and vim.

Check if :h rtp is all ok!

That worked! I deleted $HOME/.config/nvim but this was not enough. I had to delete the neovim runtime folder and I realised that after I install neovim, the folder does not come back, so I searched for it and found in another location, so I just updated $VIMRUNTIME to this new location

GabrielBrandao1618 avatar Dec 21 '22 03:12 GabrielBrandao1618