Closed roland-5 closed 1 year ago
I'm experiencing the same issue; started occuring after updating neorg today.
My previous working version was a79bf59
I was getting the same error after update. I ran :TSUninstall norg
, then :TSInstall norg
then :Neorg sync-parsers
and the errors are gone.
I was getting the same error after update. I ran
:TSUninstall norg
, then:TSInstall norg
then:Neorg sync-parsers
and the errors are gone.
Damn, thanks, that worked for me.
Edit. But now it's without highlighting colors.
the "invalid node type error" occurs when the queries and the parser aren't synced.
You should PackerSync
or Lazy sync
and TSUpdate norg
@vhyrro perhaps create a pinned issue where you say this
I tried many options, but it's still without colors and if norg parser (?) update it show "invalid node type error".
do you perhaps have custom queries?
My packer.lua
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()
return require("packer").startup(function(use)
-- Packer can manage itself as an optional plugin
use("wbthomason/packer.nvim")
-- Gruvbox theme use { 'ellisonleao/gruvbox.nvim', branch = 'nvim-set-hl' }
use("ellisonleao/gruvbox.nvim")
-- Create Color Code in neovim
use("uga-rosa/ccc.nvim")
-- better syntax highlighting
use({ "nvim-treesitter/nvim-treesitter", run = ":TSUpdate" })
-- builtin lsp config
use("neovim/nvim-lspconfig")
-- A fast and easy to configure statusline plugin for neovim.
use("nvim-lualine/lualine.nvim")
-- lua `fork` of vim-web-devicons for neovim
use("kyazdani42/nvim-web-devicons")
-- A completion plugin for neovim coded in Lua.
use("hrsh7th/cmp-nvim-lsp")
use("hrsh7th/cmp-buffer")
use("hrsh7th/cmp-path")
use("hrsh7th/cmp-cmdline")
use("hrsh7th/nvim-cmp")
-- Snippets plugin
use("L3MON4D3/LuaSnip")
use("saadparwaiz1/cmp_luasnip")
-- An implementation of the Popup API from vim in Neovim. Hope to upstream when complete
use("nvim-lua/popup.nvim")
-- plenary: full; complete; entire; absolute; unqualified. All the lua functions I don't want to write twice.
use("nvim-lua/plenary.nvim")
-- vim plugin for ansible
use("pearofducks/ansible-vim")
-- magit for neovim
-- use 'TimUntersberger/neogit'
-- A neovim tabline plugin
use("romgrk/barbar.nvim")
-- Utility functions for getting diagnostic status and progress messages from LSP servers, for use in the Neovim statusline
use("nvim-lua/lsp-status.nvim")
-- lazygit
use("kdheepak/lazygit.nvim")
-- telescope
use("nvim-telescope/telescope.nvim")
-- File Browser extension for telescope.nvim
use("nvim-telescope/telescope-file-browser.nvim")
-- Dev setup for init.lua and plugin development with full signature help, docs and completion for the nvim lua API.
use("folke/lua-dev.nvim")
-- Highlight, list and search todo comments in your projects
use("folke/todo-comments.nvim")
-- A NeoVim plugin for highlighting visual selections like in a normal document editor!
use("Pocco81/HighStr.nvim")
--Rust tools
use("simrat39/rust-tools.nvim")
-- lsp signature hint when you type
use("ray-x/lsp_signature.nvim")
-- Modernity meets insane extensibility. The future of organizing your life in Neovim.
-- use 'nvim-neorg/neorg'
use({
"nvim-neorg/neorg",
run = ":Neorg sync-parsers", -- This is the important bit!
ft = "norg",
after = "nvim-treesitter",
config = function()
require("neorg").setup({
load = {
["core.defaults"] = {},
["core.norg.dirman"] = {
config = {
workspaces = {
dokumenty = "/home/roland/Dokumenty/neorg",
},
},
},
["core.norg.completion"] = {
config = {
engine = "nvim-cmp",
},
},
["core.norg.concealer"] = {
config = {
width = "content",
},
},
},
})
vim.api.nvim_set_hl(0, "@neorg.tags.ranged_verbatim.code_block", { bg = "#504945" })
end,
})
-- A neovim plugin that helps you keep track of your keymaps.
use("lazytanuki/nvim-mapper")
-- Debug Adapter Protocol client implementation for Neovim (>= 0.5)
use("mfussenegger/nvim-dap")
-- comment.nvim
use("numToStr/Comment.nvim")
-- Git signs written in pure lua
use("lewis6991/gitsigns.nvim")
-- A Neovim plugin for adding/changing/deleting surrounding delimiter pairs. Written with heart in Lua.
use({
"kylechui/nvim-surround",
config = function()
require("nvim-surround").setup({
-- Configuration here, or leave empty to use defaults
})
end,
})
-- A Lua rewrite of vim-lastplace
use("ethanholz/nvim-lastplace")
-- Improved fzf.vim written in lua
use("ibhagwan/fzf-lua")
-- Automatically set up your configuration after cloning packer.nvim
-- Put this at the end after all plugins
if packer_bootstrap then
require("packer").sync()
end
end)
this has nothing to do with packer
custom queries would be some files inside after/queries/norg/
or queries/norg/
in your config folder
Then no.
Related to errors: what happens if you remove:
vim.api.nvim_set_hl(0, "@neorg.tags.ranged_verbatim.code_block", { bg = "#504945" })
Related to highlights: https://github.com/nvim-neorg/neorg/issues/690#issuecomment-1364326077
Related to errors: what happens if you remove:
vim.api.nvim_set_hl(0, "@neorg.tags.ranged_verbatim.code_block", { bg = "#504945" })
Related to highlights: #690 (comment)
Deleting this line you mention and ft = "norg",
and after = "nvim-treesitter",
finally helped me. After this there are no errors and colors back again.
Happy that I helped ! Can we close this issue ?
Prerequisites
0.0.12
tag or the latest compiled Neovim versionNeovim Version
v0.9.0-dev-550+g3ea1524cf8a
Neorg setup
Actual behavior
If I try open any neorg files it show error. I accidentally deleted my
~/.local/share/nvim
folder and after I triedPackerSync
I have this problem, if I try open .norg files and only there.Expected behavior
To be working.
Steps to reproduce
My
init.lua
Potentially conflicting plugins
No response
Other information
No response
Help
None
Implementation help
No response