termux-language-server
termux-language-server copied to clipboard
not working on Manjaro
When trying to run termux-language-server or termux-language-server --convert PKGBUILD the app does not work and in both cases present the following error:
Traceback (most recent call last):
File "/usr/sbin/termux-language-server", line 8, in <module>
sys.exit(main())
^^^^^^
File "/usr/lib/python3.12/site-packages/termux_language_server/__main__.py", line 87, in main
from .finders import DIAGNOSTICS_FINDER_CLASSES, FORMAT_FINDER_CLASSES
File "/usr/lib/python3.12/site-packages/termux_language_server/finders.py", line 28, in <module>
from .utils import get_query, get_schema
File "/usr/lib/python3.12/site-packages/termux_language_server/utils.py", line 18, in <module>
parser.set_language(language)
^^^^^^^^^^^^^^^^^^^
AttributeError: 'tree_sitter.Parser' object has no attribute 'set_language'
I'm on Manjaro using version 0.0.25
What is your python-tree-sitter version? Looks like https://github.com/Freed-Wu/autotools-language-server/issues/11
Humm... the arch package list 2 python-tree-sitter dependencies:
python-tree-sitter-bash: 0.21.0python-lsp-tree-sitter: 0.0.16
python-tree-sitter which is a dependency of the first one is on version 0.23.0.
That's bound to happen with AUR packages on Manjaro.
AUR package builds are written to work with up to date dependencies from the Arch repos.
Manjaro arbitrarily holding back packages by 2 weeks for "stability" tends to break AUR builds expecting up to date versions of dependencies.
Manjaro does not officially support the AUR for this exact reason. Though they do still recklessly recommend it regardless.
The bug here is Manjaro.
Thanks for that. I'll try to move to main Arch as soon as possible.
Hi, I think the reason this happens is that python-tree-sitter removed the set_language method in its newest release: https://github.com/tree-sitter/py-tree-sitter/releases/tag/v0.23.0 Downgrading to 0.22.3 fixes the issue, it's just that termux-language-server is not yet compatible with 0.23.0.
Side note: this has nothing to do with Manjaro as python-tree-sitter is an AUR package and not an Arch repo dependency. I'm using Arch and the same problem appears.
Hi, I think the reason this happens is that python-tree-sitter removed the
set_languagemethod in its newest release: https://github.com/tree-sitter/py-tree-sitter/releases/tag/v0.23.0 Downgrading to 0.22.3 fixes the issue, it's just that termux-language-server is not yet compatible with 0.23.0.Side note: this has nothing to do with Manjaro as python-tree-sitter is an AUR package and not an Arch repo dependency. I'm using Arch and the same problem appears.
They seemed to have released a fix for that just about 2 hours ago, and it's available on AUR already: https://github.com/termux/termux-language-server/releases/tag/0.0.26. I'll report here if that doesn't work.
Thanks @syyyr