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

Not compiling via Neovim #33

Closed
Yabasa opened this issue Jul 19, 2022 · 4 comments
Closed

Not compiling via Neovim #33

Yabasa opened this issue Jul 19, 2022 · 4 comments

Comments

@Yabasa
Copy link

Yabasa commented Jul 19, 2022

I'm new to using org mode in Neovim (and Neovim itself...) so I could be doing something wrong but I'm getting the following error when trying to install the org treesitter parser:

image

Neovim version: 0.7.2

I simplified my init.vim down to just the Plug install command for treesitter:

call plug#begin('~/.config/nvim/plugged')
Plug 'nvim-treesitter/nvim-treesitter', { 'do': ':TSUpdate' }
call plug#end()

Command in Neovim: :TSInstall org

This project is awesome, thanks for working on it!

@milisims
Copy link
Owner

Try adding this:

require('nvim-treesitter.parsers').get_parser_configs().org = {
  install_info = {
    url = 'https://github.com/milisims/tree-sitter-org',
    branch = 'main',
    files = { 'src/parser.c', 'src/scanner.cc' },
  },
  filetype = 'org',
}

Then use :TSInstall org. Let me know if that works!

I have been slacking on making a contribution to nvim-treesitter because it's strongly geared around programming languages for the definitions of highlight groups, etc. But I really should take care of it. Bumped up its priority.

@Yabasa
Copy link
Author

Yabasa commented Jul 19, 2022

Thanks for the quick response! Yeah I was kinda surprised this exists because I wouldn't have thought of using treesitter for org files but it's a great idea.

That didn't work unfortunately. I inspected that table with and without adding that config it looks pretty much the same at least in terms of the install_info.

Without additional config:
image

With additional config:
image

Maybe I should try to build manually using make to see if I can replicate the issue. If so then maybe it's my machine setup.

@milisims
Copy link
Owner

UINT8_MAX is defined in stdint.h which is included by tree-sitter/parser.h, so yeah probably something weird about the build setup. If you clone the repository without setting up node, you should be able to run gcc -o org.so -I./src src/parser.c src/scanner.cc -shared -Os -lstdc++ to compile it.

@Yabasa
Copy link
Author

Yabasa commented Jul 19, 2022

I get the exact same error when running that build command directly. So yeah, something with my machine. I don't have root on this machine (at work) so I'll probably just abandon trying use org on it for now. It's quite an old version of RHEL (7.2) so I should request an upgrade first and then try again.

Thanks for the help in narrowing it down quickly!

@milisims milisims closed this as not planned Won't fix, can't repro, duplicate, stale Jul 19, 2022
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

2 participants