sublimelsp / LSP-elixir

Elixir support for Sublime LSP plugin
https://lsp.sublimetext.io/
MIT License
41 stars 7 forks source link

Installing before LSP causes an error #5

Closed ihabunek closed 4 months ago

ihabunek commented 4 years ago

Installing lsp-elixir before lsp results in:

Traceback (most recent call last):
  File "/opt/sublime_text/Lib/python33/sublime_plugin.py", line 274, in reload_plugin
    m = importlib.import_module(modulename)
  File "./python3.3/importlib/__init__.py", line 90, in import_module
  File "<frozen importlib._bootstrap>", line 1584, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/opt/sublime_text/Lib/python33/sublime_plugin.py", line 1425, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/home/ihabunek/.config/sublime-text/Installed Packages/LSP-elixir.sublime-package/plugin.py", line 6, in <module>
ImportError: No module named 'LSP'

Check if it's possible to set LSP as a dependency.

rwols commented 4 years ago

I don't think there's a way around this. Otherwise SublimeLinter would have already solved the problem. The issue is that Package Control doesn't actually understand what dependencies are between ST packages. Although it does understand dependencies between a sublime package and Python packages (via dependencies.json).

ihabunek commented 4 years ago

Too bad. I could catch the import error and log something along the lines of "please install LSP" instead.

rwols commented 4 years ago

That's true, would certainly be an improvement! :)