Comments (19)
Duplicate. Please search previous (also closed) issues.
(And please don't use Lazy for minimal repro!)
from nvim-treesitter.
Sorry I didn't find anything related to my issues.Could you please provide more info?
If you mean windows support#troubleshooting, I have already installed llvm and added it to my path variable.
Also I have added
require 'nvim-treesitter.install'.compilers = { "clang" }
to my config.
from nvim-treesitter.
First, create a minimal repro config without Lazy. (You can just clone and add nvim-treesitter to rtp directly; no need to bootstrap a plugin manager just for that.)
from nvim-treesitter.
Ok I just updated the reproduced steps.
from nvim-treesitter.
And you're running this with nvim --clean -u test.lua
? (And you should install the plugin in a fresh, temporary, directory, just to make sure.)
from nvim-treesitter.
Hi, I'm using NVIM_APPNAME=hello nvim
to config this temporary config.
from nvim-treesitter.
That's not the same thing.
from nvim-treesitter.
Ok I just tried nvim --clean -u test.lua
with the same error msg.
from nvim-treesitter.
Ok. And now let's check, from scratch (meaning, wipe the directory before doing the following steps):
- Are there any
:messages
after startup? - If you look in the cloned
nvim-treesitter
folder, are there any parsers inparser
? - If not, what does
:TSInstall lua
say? - Clone
treesitter-grammars/tree-sitter-lua
somewhere and manually compile the parser; the flags are here:nvim-treesitter/lua/nvim-treesitter/shell_command_selectors.lua
Lines 89 to 95 in 7c9c5be
from nvim-treesitter.
1.If I enter a empty buffer,no error, If a lua buffer,messages
show:
Error detected while processing BufReadPost Autocommands for "*":
Error executing lua callback: C:\Program Files\Neovim\share\nvim\runtime\filetype.lua:35: Error executing lua: C:\Program Files\Neovim\share\nvim\runtime\filetype.lua:36: BufReadPost Autocommands for "*"..FileType Autocommands for "*"..function <SNR>1_LoadFTPlugin[20]..script C:\Program Files\Neovim\share\nvim\runtime\ftplugin\lua.lua: Vim(runtime):E5113: Error while calling lua chunk: ...eovim\share\nvim\runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'lua': uv_dlopen: no error stack traceback: [C]: in function '_ts_add_language' ...eovim\share\nvim\runtime/lua/vim/treesitter/language.lua:112: in function 'add' ...m\share\nvim\runtime/lua/vim/treesitter/languagetree.lua:111: in function 'new' ...m Files\Neovim\share\nvim\runtime/lua/vim/treesitter.lua:41: in function '_create_parser' ...m Files\Neovim\share\nvim\runtime/lua/vim/treesitter.lua:108: in function 'get_parser' ...m Files\Neovim\share\nvim\runtime/lua/vim/treesitter.lua:416: in function 'start' C:\Program Files\Neovim\share\nvim\runtime\ftplugin\lua.lua:2: in main chunk [C]: in function 'nvim_cmd' C:\Program Files\Neovim\share\nvim\runtime\filetype.lua:36: in function <C:\Program Files\Neovim\share\nvim\runtime\filetype.lua:35> [C]: in function 'nvim_buf_call' C:\Program Files\Neovim\share\nvim\runtime\filetype.lua:35: in function <C:\Program Files\Neovim\share\nvim\runtime\filetype.lua:10> stack traceback: [C]: in function 'nvim_cmd' C:\Program Files\Neovim\share\nvim\runtime\filetype.lua:36: in function <C:\Program Files\Neovim\share\nvim\runtime\filetype.lua:35> [C]: in function 'nvim_buf_call' C:\Program Files\Neovim\share\nvim\runtime\filetype.lua:35: in function <C:\Program Files\Neovim\share\nvim\runtime\filetype.lua:10> stack traceback: [C]: in function 'nvim_buf_call' C:\Program Files\Neovim\share\nvim\runtime\filetype.lua:35: in function <C:\Program Files\Neovim\share\nvim\runtime\filetype.lua:10>
❯ ls
# name type size modified
0 .gitignore file 16 B an hour ago
1 c.so file 701.4 KB 44 minutes ago
2 cpp.so file 3.9 MB 44 minutes ago
3 lua.so file 127.0 KB 44 minutes ago
4.compile successfully with cl.exe /Fe: parser.so /Isrc src/parser.c src/scanner.c -Os /utf-8 /LD
if I understand correctly:
C:\Users\kn1e1\dev\tree-sitter-lua>cl.exe /Fe: parser.so /Isrc src/parser.c src/scanner.c -Os /utf-8 /LD
Microsoft (R) C/C++ Optimizing Compiler Version 19.39.33523 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
parser.c
scanner.c
Generating Code...
Microsoft (R) Incremental Linker Version 14.39.33523.0
Copyright (C) Microsoft Corporation. All rights reserved.
/out:parser.so
/dll
/implib:parser.lib
parser.obj
scanner.obj
Creating library parser.lib and object parser.exp
from nvim-treesitter.
How did you install Neovim? What does :checkhealth vim.treesitter
show?
from nvim-treesitter.
Nevermind, I see the issue. You are configuring the plugin wrong. It should be
require'nvim-treesitter.configs'.setup()
from nvim-treesitter.
Hi,after using require'nvim-treesitter.configs'.setup()
,the parsers get installed automatically while the problem still exists.
Here is config now:
local path = vim.fn.stdpath("data") .. "/plug/nvim-treesitter"
if not vim.uv.fs_stat(path) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/nvim-treesitter/nvim-treesitter.git",
path,
})
end
vim.opt.rtp:prepend(path)
require 'nvim-treesitter.install'.compilers = { "clang" }
require("nvim-treesitter.configs").setup({
ensure_installed = { "c", "lua", "cpp" },
auto_install = true
})
I installed neovim by winget install neovim.neovim
,the :checkhealth vim.treesitter
:
- Nvim runtime ABI version: 14
- ERROR Parser "c" failed to load (path: C:\Users\kn1e1\AppData\Local\nvim-data\plug\nvim-treesitter\parser\c.so): ...eovim\share\nvim\runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'c': uv_dlopen: no error
- ERROR Parser "cpp" failed to load (path: C:\Users\kn1e1\AppData\Local\nvim-data\plug\nvim-treesitter\parser\cpp.so): ...eovim\share\nvim\runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'cpp': uv_dlopen: no error
- ERROR Parser "lua" failed to load (path: C:\Users\kn1e1\AppData\Local\nvim-data\plug\nvim-treesitter\parser\lua.so): ...eovim\share\nvim\runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'lua': uv_dlopen: no error
- OK Parser: bash ABI: 14, path: C:\Program Files\Neovim\lib\nvim\parser\bash.dll
- ERROR Parser "c" failed to load (path: C:\Program Files\Neovim\lib\nvim\parser\c.dll): ...eovim\share\nvim\runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'c': uv_dlopen: no error
- ERROR Parser "lua" failed to load (path: C:\Program Files\Neovim\lib\nvim\parser\lua.dll): ...eovim\share\nvim\runtime/lua/vim/treesitter/language.lua:112: Failed to load parser for language 'lua': uv_dlopen: no error
- OK Parser: markdown ABI: 14, path: C:\Program Files\Neovim\lib\nvim\parser\markdown.dll
- OK Parser: markdown_inline ABI: 14, path: C:\Program Files\Neovim\lib\nvim\parser\markdown_inline.dll
- OK Parser: python ABI: 14, path: C:\Program Files\Neovim\lib\nvim\parser\python.dll
- OK Parser: query ABI: 14, path: C:\Program Files\Neovim\lib\nvim\parser\query.dll
- OK Parser: vim ABI: 14, path: C:\Program Files\Neovim\lib\nvim\parser\vim.dll
- OK Parser: vimdoc ABI: 14, path: C:\Program Files\Neovim\lib\nvim\parser\vimdoc.dll
from nvim-treesitter.
Please test the release from the Neovim release page.
from nvim-treesitter.
I tried nvim-win64.zip
,same error
❯ where.exe nvim
C:\Users\kn1e1\Downloads\nvim-win64\nvim-win64\bin\nvim.exe
C:\Program Files\Neovim\bin\nvim.exe
from nvim-treesitter.
Then I'm out of ideas. Play with different compilers.
from nvim-treesitter.
I think there are some issues with clang here.
Using require 'nvim-treesitter.install'.compilers = { "cl" }
sovles my problem.
But here is another one:
norg
does not compile correctly:
❯ cl.exe /Fe: parser.so /Isrc src/parser.c src/scanner.cc -Os /utf-8 /LD
Microsoft (R) C/C++ Optimizing Compiler Version 19.39.33523 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
parser.c
src\tree_sitter/parser.h(8): fatal error C1083: Cannot open include file: 'stdbool.h': No such file or directory
Generating Code...
Compiling...
scanner.cc
src/scanner.cc(1): fatal error C1083: Cannot open include file: 'algorithm': No such file or directory
Generating Code...
from nvim-treesitter.
Yes, norg
does not work. Just don't install it.
from nvim-treesitter.
I am also having this issue. Also on windows, neovim 0.10 and trying to use clang
from nvim-treesitter.
Related Issues (20)
- Python: Current line dedented while typing slice (`:`) HOT 1
- TS Parser PHP errors with Invalid node type "anonymous_function_creation_expression" HOT 5
- Error in php files HOT 1
- Indentation module breaks auto indent in JS files HOT 2
- Cant Install Latex HOT 1
- Brewfile support HOT 1
- bug: [python] [indent] conditional return prematurely de-indents
- Vimdoc: concealed characters not hidden, replaced by box-drawing characters HOT 13
- multiple dollar signs in a line in a markdown file makes tree-sitter crash HOT 2
- Impossible pattern "~" @markup.heading.4 HOT 2
- Incorrect indenting using `ts=8:sw=3:noet` with old C codebase
- nvim-treesitter[cpp]: Failed to execute the following command: HOT 3
- Error in decoration provider treesitter/highlighter.line HOT 4
- TSEnable highlight html HOT 1
- I tried My very dear friend, i tried the solution in #3092 because I spent 2 hours on this problem. And it solved issue for ts. But not for html for some weird reason. HOT 1
- Highlighting Issue After Undo or Large Text Addition in Markdown Files HOT 1
- Error parsing kotlin files HOT 1
- Rust documentation comments (`///` and `//!`) get incorrectly highlighted HOT 1
- nvim-treesitter failed to update HOT 1
- Underlines should be removed or at least the option to remove them should exist HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvim-treesitter.