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

nvim crash #182

Closed
3 of 4 tasks
C8LUKA opened this issue Mar 17, 2025 · 15 comments
Closed
3 of 4 tasks

nvim crash #182

C8LUKA opened this issue Mar 17, 2025 · 15 comments
Assignees

Comments

@C8LUKA
Copy link
Contributor

C8LUKA commented Mar 17, 2025

  • Describe the bug
    after install
    typing: nvim .
    it crash without any description
    typing: nvim test.txt

Error detected while processing /home/username/.dotfiles/nvim/init.vim:
line 23:
Installation not possible: ...vim/lazy/nvim-treesitter/lua/nvim-treesitter/install.lua:87: Parser not available for language "org"
See https://github.com/nvim-treesitter/nvim-treesitter/#adding-parsers on how to add a new parser!

  • nvim --version
    NVIM v0.10.5-dev-22+g0c995c0efb
    Build type: Release
    LuaJIT 2.1.1713484068

  • Operating System
    debian12 bookworn

  • checkhealth screenshot
    :
    see nvim_checkhealth.txt

nvim_checkhealth.txt

@C8LUKA
Copy link
Contributor Author

C8LUKA commented Mar 17, 2025

@Martins3 try to make tree-sitter-org in nvim-treeistter lua like:
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.c' },
},
filetype = 'org',
}

but it's so files org.so confict to orgmode plug so file

@Martins3
Copy link
Owner

If remove this line, does the problem still exist?

@C8LUKA
Copy link
Contributor Author

C8LUKA commented Mar 17, 2025

If remove this line, does the problem still exist?

My-Linux-Config/nvim/lua/usr/nvim-treesitter.lua

Line 10 in dcae8eb
"org",

remove "org" has the same issue for typing: nvim .
it's just fine for typing like: nvim test.txt
if change to "norg", nvim . still crash

@Martins3
Copy link
Owner

What about checkout to branch 2025.2 , it's my daily update branch

@C8LUKA
Copy link
Contributor Author

C8LUKA commented Mar 17, 2025

What about checkout to branch 2025.2 , it's my daily update branch

nvim . crash the same 还是一样的
checkhealth nvim-treeistter 还是有点问题

Image

@C8LUKA
Copy link
Contributor Author

C8LUKA commented Mar 17, 2025

@Martins3
Do we have any way to debug for it, crash too fast that I can't find anything

@Martins3
Copy link
Owner

如果是一打开就 crash ,尝试删掉缓存的 session

rm -r ~/.local/share/nvim/sessions

@C8LUKA
Copy link
Contributor Author

C8LUKA commented Mar 17, 2025

rm -r ~/.local/share/nvim/sessions

不是打开就crash,而是nvim . 会crash ,nvim some file or nvim 就没有问题,看着像是目录树的问题

@Martins3
Copy link
Owner

我理解了, 我可以复现这个问题,我研究一下

@Martins3
Copy link
Owner

rm -r ~/.local/share/nvim/sessions

不是打开就crash,而是nvim . 会crash ,nvim some file or nvim 就没有问题,看着像是目录树的问题

不过在目标目录中直接打开 nvim 可以满足你的需求吗?为什么要执行 nvim .

@C8LUKA
Copy link
Contributor Author

C8LUKA commented Mar 18, 2025 via email

@C8LUKA
Copy link
Contributor Author

C8LUKA commented Mar 20, 2025

@Martins3 Did you found any way to fix this?

@Martins3
Copy link
Owner

周末看看

@Martins3
Copy link
Owner

Martins3 commented Mar 22, 2025

autocmd BufEnter * ++nested if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif
找到了原因,把这个注释掉就可以了。

这个是之前为了关闭最后的一个 buffer 的时候,可以自动关闭掉 nvim ,其实意义不大。

如果解决了你的问题,麻烦提一个 pr 把这个配置去掉 🙏

@C8LUKA
Copy link
Contributor Author

C8LUKA commented Mar 22, 2025

My-Linux-Config/nvim/init.vim

Line 48 in dcae8eb

autocmd BufEnter * ++nested if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif
找到了原因,把这个注释掉就可以了。
这个是之前为了关闭最后的一个 buffer 的时候,可以自动关闭掉 nvim ,其实意义不大。

如果解决了你的问题,麻烦提一个 pr 把这个配置去掉 🙏

好使!

@C8LUKA C8LUKA closed this as completed Mar 22, 2025
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