https://bugs.kde.org/show_bug.cgi?id=490926

            Bug ID: 490926
           Summary: MacOS: Language servers don't start, due to no PATH
                    definition in GUI
    Classification: Applications
           Product: kate
           Version: Git
          Platform: macOS (DMG)
                OS: Other
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: kwrite-bugs-n...@kde.org
          Reporter: lassi.vaatamoi...@gmail.com
  Target Milestone: ---

SUMMARY
When starting from the GUI in MacOS, Language servers cannot be started, since
Kate cannot find them in PATH

STEPS TO REPRODUCE
1.  Install bash-language-server via Homebrew
2.  Open Kate from MacOS panel or via Finder
3. Browse to a Bash script file to start language server

OBSERVED RESULT
 "Failed to find server binary: bash-language-server. Please check your PATH
for the binary."

EXPECTED RESULT
bash-anguage-server would be started

SOFTWARE/OS VERSIONS
Kate:  24.11.70 / Nightly build: kate-master-7636-macos-clang-x86_64.dmg
macOS: Ventura 13.6.7
Qt Version: 6.7.1
KDE Frameworks: 6.4.0

ADDITIONAL INFORMATION
/etc/paths: contains /usr/local/bin, so it is added to PATH in Bash shell.
When starting from bash shell: '/Applications/kate.app/Contents/MacOS/kate',
the Language Server also starts OK.

So this looks like a path setting issue and/or issue with starting other
processes in macOS.

WORKAROUNDS TRIED (but not leading to solution):

1. I tried setting the path into .plist file in Kate.app via LSEnvironment, but
that did not help, or I could not make it properly effective.

2. Also, I tried setting the application path in the LSP settings to the JSON
"path" attribute of bash-language-server, but still the same error message
appeared about not able to locate bash-language-server in PATH

3. When setting the full path '/usr/local/bin/bash-language-server' to the
"command" field in the User Server settings, I get a bit forward: "env: node:
No such file or directory". Node would be in /usr/local/bin/node , too. So now
it seems to progress up to the bash-language-server, but it cannot find node
from the PATH. (Same problem would probably happen with almost all other LSP
servers.)

So the PATH should be somehow set to Kate.app , but I have not yet found a way.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to