diff --git a/plugin.py b/plugin.py index 334e793..0735881 100644 --- a/plugin.py +++ b/plugin.py @@ -13,10 +13,11 @@ def plugin_loaded(): - print('LSP-vue: Server {} installed.'.format('is' if os.path.isfile(server_path) else 'is not' )) + is_server_installed = os.path.isfile(server_path) + print('LSP-vue: Server {} installed.'.format('is' if is_server_installed else 'is not' )) - # install the node_modules if not installed - if not os.path.isdir(os.path.join(package_path, 'node_modules')): + # install if not installed + if not is_server_installed: # this will be called only when the plugin gets: # - installed for the first time, # - or when updated on package control