vim-plug icon indicating copy to clipboard operation
vim-plug copied to clipboard

"Error detected while processing", '=' expected near 'plug'

Open VenroyDEV opened this issue 2 years ago • 2 comments

Explain the problem here ...

"Error detected while processing /home/vnr/.config/nvim/init.lua: E5112: Error while creating lua chunk: /home/vnr/.config/nvim/init.lua:1: '=' expected near 'plug' Press ENTER or type command to continue "


call plug#begin('~/.local/share/nvim/site/autoload/plugged')

Plug 'manzeloth/live-server'


call plug#end()

require "core"

local custom_init_path = vim.api.nvim_get_runtime_file("lua/custom/init.lua", false)[1]

if custom_init_path then
  dofile(custom_init_path)
end

require("core.utils").load_mappings()

local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"

-- bootstrap lazy.nvim!
if not vim.loop.fs_stat(lazypath) then
  require("core.bootstrap").gen_chadrc_template()
  require("core.bootstrap").lazy(lazypath)
end

dofile(vim.g.base46_cache .. "defaults")
vim.opt.rtp:prepend(lazypath)
require "plugins"

:version                                                                                            
NVIM v0.9.0
Build type: Release
LuaJIT 2.1.0-beta3

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

  • Type:
    • [x] Bug
    • [ ] Enhancement
    • [ ] Feature Request
    • [ ] Question
  • OS:
    • [ ] All/Other
    • [x] Linux
    • [ ] macOS
    • [ ] Windows
  • Vim:
    • [ ] Terminal Vim
    • [ ] GVim
    • [x] Neovim

VenroyDEV avatar May 04 '23 18:05 VenroyDEV

I get the same problem and it seems like a syntax issue since lua doesn't have a builtin called call and thinks that it is a variable (i believe).

It seems like there just is no support for lua configuration files. Guess I'll have to use packer

Sebbito avatar Jun 21 '23 07:06 Sebbito

You're using an lua file for nvim per the install guide the file should be init.vim

robertr1229 avatar Jul 14 '23 17:07 robertr1229

https://github.com/junegunn/vim-plug?tab=readme-ov-file#example-lua-configuration-for-neovim

junegunn avatar Mar 03 '24 11:03 junegunn