Cloudstek / LSP-serenata

PHP support for Sublime's LSP plugin using Serenata
MIT License
2 stars 1 forks source link

TypeError: 'DottedDict' object is not subscriptable #1

Open Jellyfrog opened 3 years ago

Jellyfrog commented 3 years ago

Hello,

This doesn't seem compatible with ST4;

LSP-serenata: Server is installed at /home/jellyfrog/.config/sublime-text/Cache/LSP-serenata/serenata.phar.
Unable to start lsp-serenata
Traceback (most recent call last):
  File "/home/jellyfrog/.config/sublime-text/Installed Packages/LSP.sublime-package/plugin/core/windows.py", line 321, in start_async
    cannot_start_reason = plugin_class.can_start(self._window, initiating_view, workspace_folders, config)
  File "/home/jellyfrog/.config/sublime-text/Installed Packages/LSP.sublime-package/boot.py", line 122, in can_start
    if not cls.handler.on_start(window):  # type: ignore
  File "/home/jellyfrog/.config/sublime-text/Installed Packages/LSP-serenata.sublime-package/plugin.py", line 169, in on_start
    if not is_php_installed(self):
  File "/home/jellyfrog/.config/sublime-text/Installed Packages/LSP-serenata.sublime-package/plugin.py", line 81, in is_php_installed
    php_path = plugin.config.settings['phpPath'] or 'php'
TypeError: 'DottedDict' object is not subscriptable

version: 4098 linux x64 channel: dev

DerrikMilligan commented 3 years ago

When I initially installed it it was working for me but I now get this error. I've been using ST4 as well.

jingyuexing commented 3 years ago

sublime 4100

Unable to start subprocess for lsp-serenata
Traceback (most recent call last):
  File "I:\Programming\sublime_text_4100\Data\Installed Packages\LSP.sublime-package\plugin/core/windows.py", line 321, in start_async
    cannot_start_reason = plugin_class.can_start(self._window, initiating_view, workspace_folders, config)
  File "I:\Programming\sublime_text_4100\Data\Installed Packages\LSP.sublime-package\boot.py", line 122, in can_start
    if not cls.handler.on_start(window):  # type: ignore
  File "I:\Programming\sublime_text_4100\Data\Installed Packages\LSP-serenata.sublime-package\plugin.py", line 169, in on_start
    if not is_php_installed(self):
  File "I:\Programming\sublime_text_4100\Data\Installed Packages\LSP-serenata.sublime-package\plugin.py", line 81, in is_php_installed
    php_path = plugin.config.settings['phpPath'] or 'php'
TypeError: 'DottedDict' object is not subscriptable
theLine commented 3 years ago

@mdeboer sorry to ping you directly, but the error still occurs whit Build 4107.

I tried specifying the phpPath in my user settings, but then I'm getting this error

Failed to register plugin "lsp-serenata"
Traceback (most recent call last):
  File "~/Library/Application Support/Sublime Text/Installed Packages/LSP.sublime-package/plugin/core/sessions.py", line 643, in _register_plugin_impl
    settings, base_file = plugin.configuration()
  File "~/Library/Application Support/Sublime Text/Installed Packages/LSP.sublime-package/boot.py", line 104, in configuration
    cfg = cls.handler.config  # type: ignore
  File "~/Library/Application Support/Sublime Text/Installed Packages/LSP-serenata.sublime-package/plugin.py", line 143, in config
    'memory_limit={}'.format(client_settings['memoryLimit'] or '1024M'),
KeyError: 'memoryLimit'

There's something wrong while reading the configuration.

I think, that this issue could be fixed quite easy, but unfortunately I don't have any experience in Python nor ST plugin development.

I already tried using LSP-intelephense, but this Server is written in node and will consume a huge amount of CPU/RAM until it runs out of memory when using in large PHP projects (TYPO3 CMS).

It would be great, if you could fix this issue. Thanks in advance! I really want to give this plugin and Serenata a try.

mdeboer commented 3 years ago

This plugin was written for ST3 and is not compatible with ST4. When I have time I'll see if I can fix it :)