Installation fails with the basic lazy.nvim install script
ChausseBenjamin opened this issue · comments
Describe the bug
I get an error when launching nvim with the lazy.nvim snippet from the readme.md.
Here is what I get:
Failed to run `config` for orgmode .../current/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid structure at position 2992 for language lua
# stacktrace:
- ~/scoop/apps/neovim/current/share/nvim/runtime/lua/vim/treesitter/query.lua:259 _in_ **get**
- ~/scoop/apps/neovim/current/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:110 _in_ **new**
- ~/scoop/apps/neovim/current/share/nvim/runtime/lua/vim/treesitter.lua:61 _in_ **_create_parser**
- ~/scoop/apps/neovim/current/share/nvim/runtime/lua/vim/treesitter.lua:131 _in_ **get_parser**
- ~/scoop/apps/neovim/current/share/nvim/runtime/lua/vim/treesitter.lua:459 _in_ **start**
- plugins.lua:54 _in_ **config**
Steps to reproduce
Install orgmode with lazy.nvim
.
Expected behavior
Flawless installation
Emacs functionality
No response
Minimal init.lua
-- Bootstrap installation of lazy.nvim on a new system:
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
-- Installed plugins:
require("lazy").setup({
-- Org Mode {{{
{
'nvim-orgmode/orgmode',
dependencies = {
{ 'nvim-treesitter/nvim-treesitter', lazy = true },
},
event = 'VeryLazy',
config = function()
-- Load treesitter grammar for org
require('orgmode').setup_ts_grammar()
-- Setup treesitter
require('nvim-treesitter.configs').setup({
highlight = {
enable = true,
additional_vim_regex_highlighting = { 'org' },
},
ensure_installed = { 'org' },
})
-- Setup orgmode
require('orgmode').setup({
org_agenda_files = '~/orgfiles/**/*',
org_default_notes_file = '~/orgfiles/refile.org',
})
end,
}, -- }}}
})
Screenshots and recordings
No response
OS / Distro
Windows 11
Neovim version/commit
0.9.1
Additional context
No response
Do you have any issues with other package managers?
Can you post the full configuration with lazy? Maybe I need to add more context to the installation part. It assumes that you do something like this:
require('lazy').setup({
{
'nvim-orgmode/orgmode',
dependencies = {
{ 'nvim-treesitter/nvim-treesitter', lazy = true },
},
event = 'VeryLazy',
config = function()
-- Load treesitter grammar for org
require('orgmode').setup_ts_grammar()
-- Setup treesitter
require('nvim-treesitter.configs').setup({
highlight = {
enable = true,
additional_vim_regex_highlighting = { 'org' },
},
ensure_installed = { 'org' },
})
-- Setup orgmode
require('orgmode').setup({
org_agenda_files = '~/orgfiles/**/*',
org_default_notes_file = '~/orgfiles/refile.org',
})
end,
}
})
I just noticed this setting:
highlight = {
enable = false, -- <<< This is now set to false
additional_vim_regex_highlighting = { 'org' },
},
When configured that way, all errors go away and orgmode starts working. I'm gonna take a closer look at my treesitter configuration to see if it's the culprit.
I just noticed this setting:
highlight = { enable = false, -- <<< This is now set to false additional_vim_regex_highlighting = { 'org' }, },When configured that way, all errors go away and orgmode starts working. I'm gonna take a closer look at my treesitter configuration to see if it's the culprit.
Hi did you figured it out? I have same problems that if I try to install nvim-orgmode in LazyVim. And try to open the agenda view nothin happens.
Minimal init is now updated to use lazy.nvim
since packer is no longer maintained.
You can see it here https://github.com/nvim-orgmode/orgmode/blob/master/scripts/minimal_init.lua.
To use it, just download it and do nvim -u minimal_init.lua
nvim -u minimal_init.lua
I donwloaded and run the command. But nothing happens, no plugins were installed??
@juridiener which system are you running? It should install everything in the background. Once it's done, try doing \oa
to open the agenda.
@juridiener which system are you running? It should install everything in the background. Once it's done, try doing
\oa
to open the agenda.
macOs Ventura 13.5.2