vim-plug
vim-plug copied to clipboard
"Error detected while processing", '=' expected near 'plug'
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
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
You're using an lua file for nvim per the install guide the file should be init.vim
https://github.com/junegunn/vim-plug?tab=readme-ov-file#example-lua-configuration-for-neovim