bash-lsp / bash-language-server

A language server for Bash
MIT License
2.16k stars 125 forks source link

Error: ShellCheck: json parse failed with error SyntaxError when opening bash files in Kate using bash-language-server LSP Client #1205

Open virtualistic opened 1 month ago

virtualistic commented 1 month ago

Code editor

No response

Platform

KDE Neon

Version

Name Version Rev Tracking Publisher Notes bash-language-server 4.7.0 69 latest/stable alexmurray✪ classic

What steps will reproduce the bug?

STEPS TO REPRODUCE

  1. Install snap of bash-language-server: sudo snap install bash-language-server
  2. Open Kate
  3. Open any bash file
  4. It should ask to activate the LSP Client, click: yes

How often does it reproduce? Is there a required condition?

No response

What is the expected behavior?

Kate opening bash files with language linting working and not producing an error after starting the bash-language-server plugin.

What do you see instead?

The Output window of Kate shows the following error:

[13:51:48  LSP Client Log] Started server bash@: /snap/bin/bash-language-server start
[13:51:49  LSP Server Log] bash@
[Error] 11:51:49.384 ERROR ⛔️ Error while linting: Error: ShellCheck: json parse failed with error SyntaxError: Unexpected end of JSON input
out:
err:

Additional information

After installing the snap of bash-language-server, opening any bash script in Kate will result in a strange error in the Output window of Kate I've seen other people run into the same here error here: https://forum.ubuntuusers.de/topic/kate-und-lsp/ SOFTWARE/OS VERSIONS Linux/KDE Plasma: (available in About System) KDE Plasma Version: 6.1.2 KDE Frameworks Version: 6.3.0 Qt Version: 6.7.0

ADDITIONAL INFORMATION Also installed KDE Neon on a VM just to make sure it wasn't just happening on my PC. I also installed the marksman Markdown language client to see if any errors would appear. There were no errors when opening .md files using the markdown client.

I filed a bug at the Neon forum which pointed me here https://bugs.kde.org/show_bug.cgi?id=489921