-
Notifications
You must be signed in to change notification settings - Fork 464
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
nvim-treesitter[latex]: Error during compilation #1314
Comments
Have u installed the |
Thank you for your reply. $ which tree-sitter
~/.nix-profile/bin/tree-sitter |
I switched to a brand new system, Ubuntu 24.04 TLS, and did a fresh installation. This time, I didn't interrupt nvim during its first startup, and it finally succeeded. I suspect that interrupting nvim during its first startup previously may have caused some intermediate state issues? |
You can continue the installation process by |
I have used this method before, but it didn't work, the issue persists. |
in branch 0.10 should include nvimdots/nixos/neovim/default.nix Line 173 in 07a165b
it weird to see the error shows the parser is still missing. |
How do you run neovim on nix ( Try the following if you can use |
Yes, I use home-manager install the pkg tree-sitter & neovim. I'll have a try |
just install |
his using our |
During the morning, when I was installing the computer for my friend, I also encountered this issue.
It is the solution I came up with at that time lol |
r u also using |
Sorry, I didn't realize using nix |
|
I've encountered a similar error regardless of whether tree-sitter is installed manually:
I'm still not sure about the specific cause, and it doesn't always reproduce. If there are no other reports for a while, I think it can be closed. |
What does this mean? |
I've encountered this issue a few times, but sometimes I am unable to reproduce it, which does indeed conflict with the reproducibility aspect of Nix, but I'm not sure what the cause is. |
@kevin1sMe No, these are separate issues. This issue (#1314 (comment)) happens bc there's a problem downloading the parser's source code1 (i.e., the C compiler couldn't locate Footnotes
|
Why wouldn't it recover during the next execution? Or why doesn't it redownload? Other parsers download normally; this one frequently has issues.
|
If u meant to install that automatically, the best way is to add it to the
afaik git clone --depth 1 https://github.com/latex-lsp/tree-sitter-latex.git \
&& cd tree-sitter-latex \
&& tree-sitter generate \
&& make CFLAGS='-v' Upon successful compilation, u should see something like this: /usr/bin/clang -v -Isrc -std=c11 -fPIC -c -o src/scanner.o src/scanner.c
ar rcs libtree-sitter-latex.a src/scanner.o
/usr/bin/clang -dynamiclib -Wl,-install_name,/usr/local/lib/libtree-sitter-latex.0.dylib,-rpath,@executable_path/../Frameworks src/scanner.o -o libtree-sitter-latex.dylib
sed -e 's|@URL@|https://github.com/latex-lsp/tree-sitter-latex|' \
-e 's|@VERSION@|0.3.0|' \
-e 's|@LIBDIR@|/usr/local/lib|' \
-e 's|@INCLUDEDIR@|/usr/local/include|' \
-e 's|@REQUIRES@||' \
-e 's|@ADDITIONAL_LIBS@||' \
-e 's|=/usr/local|=${prefix}|' \
-e 's|@PREFIX@|/usr/local|' bindings/c/tree-sitter-latex.pc.in > tree-sitter-latex.pc Exactly one static and one dynamic library will be generated in the current working directory, named |
In my environment, the above command will result in an error as reported. |
Oops, sorry it looks like I accidentally removed one command. Here's the correct version: git clone --depth 1 https://github.com/latex-lsp/tree-sitter-latex.git \
&& cd tree-sitter-latex \
&& tree-sitter generate \
&& make CFLAGS='-v' |
Yes, internally nvim-treesitter calls the actual Treesitter API ( |
This shouldn't be a problem on our end since |
treesitter-cli simply copies the necessary headers and configurations to the build directory, nothing more. |
I confirmed that it was indeed copied under tree-sitter-latex/src. |
@kevin1sMe |
Same here, it really looks like an issue with the author's build system. |
Do you mean this setting? {pkgs, ...}:
{
programs.neovim.nvimdots = {
enable = true;
setBuildEnv = true; # Only needed for NixOS
withBuildTools = true; # Only needed for NixOS
};
} |
Thank you. I just wanted to check. |
Version confirmation
Following prerequisites
Not a user config issue
Neovim version
NVIM v0.10.0
Operating system/version
Linux VM-32-9-opencloudos 6.6.30-4.oc9.x86_64
Terminal name/version
iTerm2
$TERM environment variable
xterm-256color
Branch info
0.10 (Nightly)
Fetch Preferences
SSH (use_ssh = true)
How to reproduce the issue
Expected behavior
No Error
Actual behavior
bottom line:
Additional information
No response
The text was updated successfully, but these errors were encountered: