Code Monkey home page Code Monkey logo

termux-language-server's Introduction

termux-language-server

readthedocs pre-commit.ci status github/workflow codecov DeepSource

github/downloads github/downloads/latest github/issues github/issues-closed github/issues-pr github/issues-pr-closed github/discussions github/milestones github/forks github/stars github/watchers github/contributors github/commit-activity github/last-commit github/release-date

github/license github/languages github/languages/top github/directory-file-count github/code-size github/repo-size github/v

pypi/status pypi/v pypi/downloads pypi/format pypi/implementation pypi/pyversions

Language server for some specific bash scripts:

This language server only provides extra features which bash-language-server doesn't support:

[package_name]
source = "github"
github = "author_name/repo_name"
use_max_tag = true

Other features:

Screenshots

Diagnostic

diagnostic

Document Link

document link

Hover

keyword

package

Completion

completion

arch

license

depends

How Does It Work

See here.

Read readthedocs to know more.

termux-language-server's People

Contributors

freed-wu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

termux-language-server's Issues

Errors happen

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 <[email protected]>\n# Contributor: Matheus <[email protected]>\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)

[PKGBUILD] Parsing of Bash arrays erroneous

This line arch=("x86_64") results in the following error:

'"' is not one of ['any', 'pentium4', 'i486', 'i686', 'x86_64', 'x86_64_v3', 'arm', 'armv6h', 'armv7h', 'armv8', 'aarch64']

This happens for all Bash arrays. The quotes are recognised as own elements.

license=("MIT") errors with '"' is not one of ['AGPL3', 'Apache', ....

This bug was probably introduced with a fix for #4.

Termux -style

Go to home dir - cd $HOME # Clone this repository (use gh repo clone adi1090x/termux-style if you want to use the GitHub CLI)- git clone https://github.com/adi1090x/termux-style # Change to termux-style dir - cd termux-style # To install it, run - ./install # And follow the steps, it'll be installed on your system.

Multiple "SKIP" in hash arrays

If there needs to be multiple times "SKIP" in the hash array, an error message like ['SKIP', 'SKIP', 'SKIP', 'SKIP', 'SKIP', 'SKIP', 'SKIP', 'SKIP', 'SKIP', 'SKIP', 'SKIP', 'SKIP', 'SKIP', 'SKIP', 'SKIP', 'SKIP', 'SKIP', 'SKIP', 'SKIP', 'SKIP', '3802c7aae4c26cf23a61c48fedabe1d4bb516bbc07e42573cdb8cdfd19a556cc0b65941eae03ce b1c9cbf3eff2d40742e01eea12f3b420ae0d277c3582368b34'] has non-unique elements occurs. This should probably not be the case for "SKIP" but for all other hashes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.