-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
Getting weird errors on autocommands for *.norg #74
Comments
Did you update the code snippet in tree sitter config ? |
@danymat I did. This is my config local parser_configs = require('nvim-treesitter.parsers').get_parser_configs()
parser_configs.norg = {
install_info = {
url = 'https://github.com/vhyrro/tree-sitter-norg',
files = {'src/parser.c', 'src/scanner.cc'},
branch = 'main'
}
}
require('nvim-treesitter.configs').setup({
ensure_installed = {'javascript', 'ruby', 'lua', 'bash', 'go', 'json', 'typescript', 'elixir', 'norg'}, |
I'm getting a similarly large set of errors after updating the code snippet whenever I run :TSUpdate. |
@toan2406 what plugin manager do you use ? |
From what I can see that seems to be an old compiler issue. Do you guys have gcc/clang installed and if so, which version? |
( |
That's rather peculiar, it seems to be a mac-only issue from what I can see too. Hm. |
Okay i solved the issue (I'm on Mac 11.4). What causes the issue is that I didn't have the latest gcc installed.
Note: in installation header, I have this:
So that means tree sitter will compile with
I can now alias to some directory in my path like
You can now restart Neovim and run |
That worked for me! 🙌 |
Wow, that's a rather crazy setup process for something as simple as installing a parser lol! Glad it works though, thanks @danymat. |
Work perfectly! Thanks 🙏 |
The symlink worked for me, thanks @danymat! Now that that is working I'm seeing the following message when I open a
Screenshot: So far I'm not sure this is actually causing issues. |
@johnallen3d I think it's best for visibility to create an other issue, as I think this is a unrelated issue. As I think I provided the steps to fix this issue, we should close this one. |
Got it, will open a separate issue. |
To all people who still had issues: I think all of those should be fixed now. I downgraded the codebase to C++11 and removed the "modern" [[nodiscard]] attribute with parameters. Let me know if it fixes stuff for y'all and sorry for all the issues, things like that happen with a full parser rewrite 😅 |
I reverted the symlink @danymat suggested and tried doing |
I'm seeing the same, also on MacOS 11.5 with Clang 12.0.5 aliased as Testing https://github.com/vhyrro/tree-sitter-norg outside of nvim, I can run Expand to view 'yarn test' errors
The first error looks like the compiler is failing to recognize a braced initializer list, not clear to me why. Edit: small correction, Clang 12 defaults to c++14, but c++17 is fully supported. |
Wow, this is really weird. I might get in touch with the nvim-treesitter guys and ask them if they know of anything that could be done to fix this stuff. |
After including the scanner in the list of files, I am getting the following errors in
I'm running Ubuntu 20.04 LTS and I have just executed Interestingly, the error does not manifest itself on the |
@Gelio the reason is because the new parser does not work with the main branch yet. I think what we should do is push the unstable branch to main. The issue is that I haven't written any real docs for the new stuff we're making yet and so I dunno whether that'll confuse people |
@vhyrro I see, thanks for explaining. In that case, maybe there should be an Just a thought for the future |
@Gelio what we ended up doing is we merged the unstable branch into |
I have the same issue, hope this will be fixed soon |
I have still the same issue on OSX 10.15 and clang 12.0.0, even with the unstable branch. :TSInstall norg gives lots of errors. The first one is: |
As this is the most upvoted answer: #74 (comment) I tried simplifying it a little bit. You can do |
I followed instructions in #74 (comment)
Also I linked |
Hmm, i think that looks fine. @danymat since you're the one that fixed the issue is there anything else ray can do? Man we really need that makefile support in the nvim-treesitter repo |
Hello, can you print the output of |
Yes, here is what is printed out:
later on, I found that it was alias setup not working. I was intend to use alias instead of symbol link for |
Norg's treesitter config was not compiling on TSUpdate Kudos to nvim-neorg/neorg#74 (comment)
this worked for me: |
"export CC=gcc-11" on mac worked for me. |
For anyone running into this but receiving an error ending with something like,
check out this thread. |
Thanks @brendonsoto facing the same issue |
@danymat thanks worked! I did: Then in
Then I ran:
And all good! |
I just got this error during a fresh install on MacOS. I think the README instruction is misleading, what needed is gcc11, not C++14 at all. |
Are you experiencing errors after updating the plugin to the latest version, and are getting an error along the lines of:
Fear no more! Simply take a look at the readme present in the
unstable
branch and scroll down to the treesitter installation section. We've slightly changed the code snippet as the new parser we're using also includes a scanner. After you've taken that code and replaced it in your own config run:TSUpdate
and voila!The text was updated successfully, but these errors were encountered: