Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

[BUGFIX] Fix "TypeError: 'DottedDict' object is not subscriptable" #2

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ def on_install_complete():
log_and_show_message('LSP-serenata: Server installed.')


def is_php_installed(plugin) -> bool:
php_path = plugin.config.settings['phpPath'] or 'php'
def is_php_installed(settings) -> bool:
php_path = settings['phpPath'] or 'php'

found = shutil.which(php_path) or os.path.isfile(php_path)

Expand Down Expand Up @@ -166,7 +166,11 @@ def config(self) -> ClientConfig:


def on_start(self, window) -> bool:
if not is_php_installed(self):
settings = sublime.load_settings("LSP-serenata.sublime-settings")
client_configuration = settings.get('client')
client_settings = client_configuration['settings']

if not is_php_installed(client_settings):
sublime.status_message(
'Please install PHP 7.1 or later for the PHP Language Server to work.'
)
Expand Down