Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no parser for 'norg' language #786

Closed
ghost opened this issue Apr 1, 2023 · 2 comments
Closed

no parser for 'norg' language #786

ghost opened this issue Apr 1, 2023 · 2 comments

Comments

@ghost
Copy link

ghost commented Apr 1, 2023

I got this error whenever I tried to make a new norg file. How can I fix this? I tried to consult multiples past issues but none of them solve this.

Error detected while processing BufEnter Autocommands for "*.norg":
E5108: Error executing lua ...0.8.3/share/nvim/runtime/lua/vim/treesitter/language.lua:32: no parser for 'norg' language, see :help treesitter-parsers
stack traceback:
[C]: in function 'error'
...0.8.3/share/nvim/runtime/lua/vim/treesitter/language.lua:32: in function 'require_language'
...r/neovim/0.8.3/share/nvim/runtime/lua/vim/treesitter.lua:38: in function '_create_parser'
...r/neovim/0.8.3/share/nvim/runtime/lua/vim/treesitter.lua:96: in function 'get_parser'
...ua/neorg/modules/core/integrations/treesitter/module.lua:493: in function 'get_document_root'
...y/neorg/lua/neorg/modules/core/norg/concealer/module.lua:90: in function 'trigger_icons'
...y/neorg/lua/neorg/modules/core/norg/concealer/module.lua:1465: in function 'on_event'
...rs/dat/.local/share/nvim/lazy/neorg/lua/neorg/events.lua:153: in function 'broadcast_event'
...azy/neorg/lua/neorg/modules/core/autocommands/module.lua:48: in function '_neorg_module_autocommand_triggered'
[string ":lua"]:1: in main chunk
Downloading tree-sitter-norg...
Creating temporary directory
Extracting tree-sitter-norg...
Compiling...
src/scanner.cc:176:6: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]
enum class TagType : char
^
src/scanner.cc:194:10: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
for (auto& elem : vec)
^
src/scanner.cc:194:21: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for (auto& elem : vec)
^
src/scanner.cc:213:16: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]
m_Previous = 0, // previous char
^
src/scanner.cc:214:15: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]
m_Current = 0; // current char
^
src/scanner.cc:216:26: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]
TagType m_TagContext = TagType::NONE;
^
src/scanner.cc:217:23: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]
size_t m_TagLevel = 0;
^
src/scanner.cc:219:27: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]
bool m_InLinkLocation = false;
^
src/scanner.cc:223:27: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]
TokenType m_LastToken = NONE;
^
src/scanner.cc:226:26: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]
const array<int32_t, 12> m_DetachedModifiers = {
^
src/scanner.cc:243:74: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]
const unordered_map<int32_t, TokenType> m_DetachedModifierExtensions = {
^
src/scanner.cc:256:65: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]
const unordered_map<int32_t, TokenType> m_AttachedModifiers = {
^
src/scanner.cc:811:6: error: expected expression
[[nodiscard]]
^
src/scanner.cc:812:5: error: expected member name or ';' after declaration specifiers
bool check_detached(const vector& results, const int32_t expected)
^
src/scanner.cc:216:28: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
TagType m_TagContext = TagType::NONE;
^
src/scanner.cc:243:76: error: non-aggregate type 'const unordered_map<int32_t, TokenType>' (aka 'const unordered_map<int, TokenType>') cannot be initialized with an initializer
list
const unordered_map<int32_t, TokenType> m_DetachedModifierExtensions = {
^
src/scanner.cc:256:67: error: non-aggregate type 'const unordered_map<int32_t, TokenType>' (aka 'const unordered_map<int, TokenType>') cannot be initialized with an initializer
list
const unordered_map<int32_t, TokenType> m_AttachedModifiers = {
^
src/scanner.cc:272:13: error: use of undeclared identifier 'reset_active_modifiers'
reset_active_modifiers();
^
src/scanner.cc:279:20: error: use of undeclared identifier 'parse_text'
return parse_text();
^
src/scanner.cc:281:18: error: use of undeclared identifier 'is_newline'
else if (is_newline(lexer->lookahead))
^
src/scanner.cc:289:17: error: use of undeclared identifier 'reset_active_modifiers'
reset_active_modifiers();
^
src/scanner.cc:293:33: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
if (m_TagContext != TagType::NONE && ((char)m_TagContext % 2) == 0)
^
src/scanner.cc:299:17: error: use of undeclared identifier 'is_newline'
if (is_newline(lexer->lookahead))
^
src/scanner.cc:303:17: error: use of undeclared identifier 'reset_active_modifiers'
reset_active_modifiers();
^
src/scanner.cc:313:20: error: use of undeclared identifier 'is_blank'
while (is_blank(lexer->lookahead))
^
src/scanner.cc:329:28: error: use of undeclared identifier 'is_blank'
while (is_blank(lexer->lookahead))
^
src/scanner.cc:333:44: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
&& m_TagContext == TagType::IN_VERBATIM_TAG)
^
src/scanner.cc:336:40: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
m_TagContext = TagType::NONE;
^
src/scanner.cc:345:75: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
if (m_LastToken == RANGED_VERBATIM_TAG || m_TagContext == TagType::IN_VERBATIM_TAG)
^
src/scanner.cc:353:32: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
m_TagContext = TagType::ON_VERBATIM_TAG;
^
src/scanner.cc:357:33: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
if (m_TagContext == TagType::IN_VERBATIM_TAG)
^
src/scanner.cc:358:24: error: use of undeclared identifier 'parse_text'
return parse_text();
^
src/scanner.cc:361:60: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
if (lexer->lookahead == '=' && m_TagContext != TagType::IN_VERBATIM_TAG)
^
src/scanner.cc:374:32: error: use of undeclared identifier 'is_newline'
&& !is_newline(lexer->lookahead))
^
src/scanner.cc:397:29: error: use of undeclared identifier 'is_newline'
if (is_newline(lexer->lookahead))
^
src/scanner.cc:432:32: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
m_TagContext = TagType::ON_TAG;
^
src/scanner.cc:437:65: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
else if (lexer->lookahead == '|' && m_TagContext != TagType::IN_VERBATIM_TAG)
^
src/scanner.cc:449:28: error: use of undeclared identifier 'is_blank'
while (is_blank(lexer->lookahead))
^
src/scanner.cc:473:32: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
m_TagContext = TagType::ON_TAG;
^
src/scanner.cc:478:65: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
else if (lexer->lookahead == '#' && m_TagContext != TagType::IN_VERBATIM_TAG)
^
src/scanner.cc:484:25: error: use of undeclared identifier 'is_newline'
if (is_newline(lexer->lookahead))
^
src/scanner.cc:496:65: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
else if (lexer->lookahead == '+' && m_TagContext != TagType::IN_VERBATIM_TAG)
^
src/scanner.cc:506:65: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
else if (lexer->lookahead == '.' && m_TagContext != TagType::IN_VERBATIM_TAG)
^
src/scanner.cc:525:32: error: expected expression
if (check_detached({HEADING1, HEADING2, HEADING3,
^
src/scanner.cc:530:32: error: expected expression
if (check_detached({QUOTE1, QUOTE2, QUOTE3, QUOTE4, QUOTE5, QUOTE6}, '>'))
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
27 warnings and 20 errors generated.
Error during compilation
Failed to execute the following command:
{
cmd = "cc",
err = "Error during compilation",
info = "Compiling...",
opts = {
args = { "-o", "parser.so", "-I./src", "src/parser.c", "src/scanner.cc", "-shared", "-Os", "-lstdc++", "-fPIC" },
cwd = "/Users/dat/.local/share/nvim/tree-sitter-norg"
}
}
Downloading tree-sitter-norg_meta...
Creating temporary directory
Extracting tree-sitter-norg_meta...
Compiling...
Treesitter parser for norg_meta has been installed
Press ENTER or type command to continue

@ghost
Copy link
Author

ghost commented Apr 1, 2023

I wil make a new issue in the right format

@ghost ghost closed this as completed Apr 1, 2023
@Alys
Copy link

Alys commented Nov 4, 2023

I found this from a duckduckgo search and it didn't give me a link to the new issue referred to above, so for the benefit of anyone else getting here like that:

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant