Closed hasansujon786 closed 2 years ago
Are you using other treesitter parsers or this is the only one? nvim-treesitter has a section about windows support here https://github.com/nvim-treesitter/nvim-treesitter/wiki/Windows-support, and Troubleshooting section mentiones similar issue. Can you try following that instruction and see if it helps?
@hasansujon786 did you manage to set it up?
Closing due to inactivity.
@kristijanhusak i am having the same issue in neovim and treesitter on windows. Will check the troubleshooting link and update you here.
nope, didn't work
ok, i was able to fix it by using this treesitter.lua file instead of the one i had.
return {
"nvim-treesitter/nvim-treesitter",
dependencies = { "windwp/nvim-ts-autotag", "JoosepAlviste/nvim-ts-context-commentstring" },
init = function() table.insert(astronvim.file_plugins, "nvim-treesitter") end,
cmd = {
"TSBufDisable",
"TSBufEnable",
"TSBufToggle",
"TSDisable",
"TSEnable",
"TSToggle",
"TSInstall",
"TSInstallInfo",
"TSInstallSync",
"TSModuleInfo",
"TSUninstall",
"TSUpdate",
"TSUpdateSync",
},
build = ":TSUpdate",
opts = {
highlight = { enable = true },
incremental_selection = { enable = true },
autotag = { enable = true },
context_commentstring = { enable = true, enable_autocmd = false },
},
config = require "plugins.configs.nvim-treesitter",
}
Describe the bug
On windows with master branch(new treesitter support) while I open or save a org file it shows "Error executing vim.schedule lua callback: Failed to load parser: uv_dlopen: The specified procedure could not be found. And every org features doesn't work anymore.
But on my other Linux pc it works fine.
Steps to reproduce
Expected behavior
TreeSitter should parse the file correctly.
Emacs functionality
No response
Minimal init.lua
vim.cmd [[set runtimepath=$VIMRUNTIME]] vim.cmd [[set packpath=/tmp/nvim/site]]
local package_root = '/tmp/nvim/site/pack' local install_path = package_root .. '/packer/start/packer.nvim'
local function load_plugins() require('packer').startup { { 'wbthomason/packer.nvim', {'nvim-treesitter/nvim-treesitter', run = ':TSUpdate'}, {'kristijanhusak/orgmode.nvim', branch = 'tree-sitter' }, }, config = { package_root = package_root, compile_path = install_path .. '/plugin/packer_compiled.lua', }, } end
_G.load_config = function() require('nvim-treesitter.configs').setup({})
local parser_config = require('nvim-treesitter.parsers').get_parser_configs()
parser_config.org = { install_info = { url = 'https://github.com/milisims/tree-sitter-org', revision = 'main', files = {'src/parser.c', 'src/scanner.cc'}, }, filetype = 'org', } vim.cmd[[packadd nvim-treesitter]] vim.cmd[[TSUpdate]]
require('orgmode').setup() end
if vim.fn.isdirectory(install_path) == 0 then vim.fn.system { 'git', 'clone', 'https://github.com/wbthomason/packer.nvim', install_path } load_plugins() require('packer').sync() vim.cmd [[autocmd User PackerComplete ++once lua load_config()]] else load_plugins() require('packer').sync() _G.load_config() end
Screenshots and recordings
OS / Distro
Windows 10
Neovim version/commit
NVIM v0.5.1
Additional context
No response