termux / termux-language-server

🛠️ A language server for some specific bash scripts
https://termux-language-server.readthedocs.io/
GNU General Public License v3.0
74 stars 7 forks source link

Errors happen #11

Closed Spixmaster closed 6 months ago

Spixmaster commented 6 months ago

An error occurs everytime so that the programme does not work at all. I assume the same error repreats. This should be a single instance of it appearing:

Ignoring notification for unknown method "workspace/didChangeConfiguration"
Failed to handle user defined notification "textDocument/didOpen": (DidOpenTextDocumentParams(text_document=TextDocumentItem(uri='file:///home/matheus/aur/cli11/PKGBUILD', language_id='PKGBUILD', version=1, text='#!/usr/bin/env bash\n# shellcheck disable=SC2034\n# shellcheck disable=SC2154\n# The PKGBUILD for Inja.\n# Maintainer: Matheus <matheusgwdl@protonmail.com>\n# Contributor: Matheus <matheusgwdl@protonmail.com>\n\ndeclare -r _tag="17eb440d6792960c1a56d2b8832b9edd23eadab3"\n\npkgname="inja"\npkgver="3.4.0"\npkgrel="1"\npkgdesc="A template engine for modern C++."\narch=("any")\nurl="https://github.com/Spixmaster/${pkgname}"\nlicense=("MIT")\ndepends=("nlohmann-json")\nmakedepends=("cmake" "doxygen")\ncheckdepends=("doctest")\nsource=("${pkgname}::git+${url}.git#tag=${_tag}")\nsha512sums=("SKIP")\n\nbuild()\n{\n    for status in "OFF" "ON"; do\n        cmake -B "${srcdir}"/"${pkgname}"/build/ -D BUILD_BENCHMARK=OFF -D BUILD_TESTING="${status}" -D CMAKE_BUILD_TYPE=None -D CMAKE_INSTALL_PREFIX=/usr/ -D COVERALLS=OFF -D INJA_BUILD_TESTS="${status}" -D INJA_EXPORT=ON -D INJA_INSTALL=ON -D INJA_INSTALL_SINGLE_HEADER=ON -D INJA_USE_EMBEDDED_JSON=OFF -S "${srcdir}"/"${pkgname}"/ -Wno-dev\n        cmake --build "${srcdir}"/"${pkgname}"/build/\n    done\n}\n\ncheck()\n{\n    cd "${srcdir}"/"${pkgname}"/build/ || exit 1\n    ./inja_test\n    ./single_inja_test\n}\n\npackage()\n{\n    # Assure that the directories exist.\n    mkdir -p "${pkgdir}"/usr/share/doc/"${pkgname}"/\n    mkdir -p "${pkgdir}"/usr/share/licenses/"${pkgname}"/\n\n    # Install the software.\n    DESTDIR="${pkgdir}"/ cmake --install "${srcdir}"/"${pkgname}"/build/\n\n    # Install the documentation.\n    install -Dm644 "${srcdir}"/"${pkgname}"/README.md "${pkgdir}"/usr/share/doc/"${pkgname}"/\n\n    cd "${srcdir}"/"${pkgname}"/doc/ || exit 1\n    doxygen Doxyfile\n    cp -r "${srcdir}"/"${pkgname}"/doc/* "${pkgdir}"/usr/share/doc/"${pkgname}"/\n\n    find "${pkgdir}"/usr/share/doc/"${pkgname}"/ -type d -exec chmod 755 {} +\n    find "${pkgdir}"/usr/share/doc/"${pkgname}"/ -type f -exec chmod 644 {} +\n\n    # Install the license.\n    install -Dm644 "${srcdir}"/"${pkgname}"/LICENSE "${pkgdir}"/usr/share/licenses/"${pkgname}"/\n}\n')),)
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/pygls/protocol/lsp_meta.py", line 21, in decorator
    self._execute_notification(user_func, *args, **kwargs)
  File "/usr/lib/python3.11/site-packages/pygls/protocol/json_rpc.py", line 153, in _execute_notification
    handler(*params)
  File "/usr/lib/python3.11/site-packages/termux_language_server/server.py", line 81, in did_change
    diagnostics = get_diagnostics(
                  ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/lsp_tree_sitter/diagnose.py", line 64, in get_diagnostics
    uri, tree, finders + [cls(filetype) for cls in finder_classes]
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/lsp_tree_sitter/diagnose.py", line 64, in <listcomp>
    uri, tree, finders + [cls(filetype) for cls in finder_classes]
                          ^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/termux_language_server/finders.py", line 42, in __init__
    self.validator = self.schema2validator(get_schema(filetype))
                                           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/termux_language_server/utils.py", line 59, in get_schema
    SCHEMAS[filetype] = json.load(f)
                        ^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/__init__.py", line 293, in load
    return loads(fp.read(),
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
               ^^^^^^^^^^^^^^^^^^^^^^
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 725 column 5 (char 26919)