sublimelsp / LSP-julia

Julia support for Sublime's LSP plugin using LanguageServer.jl
MIT License
23 stars 2 forks source link

The file Packages/User/LSP-julia.sublime-settings may not exist #4

Closed rwols closed 4 years ago

rwols commented 4 years ago
Failed to register plugin
Traceback (most recent call last):
  File "/home/raoul/.config/sublime-text-3/Packages/LSP/plugin/core/sessions.py", line 466, in register_plugin
    client_configs.add_external_config(name, *plugin.configuration())
  File "/home/raoul/.config/sublime-text-3/Packages/LSP/plugin/core/main.py", line 63, in configuration
    cfg = cls.handler.config  # type: ignore
  File "/home/raoul/.config/sublime-text-3/Packages/LSP-julia/plugin.py", line 118, in config
    settings = load_settings(SETTINGS_FILE)
  File "/home/raoul/.config/sublime-text-3/Packages/LSP-julia/utils.py", line 32, in load_settings
    user_settings_json = sublime.load_resource("Packages/User/{}".format(base_name))
  File "/opt/sublime_text/Lib/python33/sublime.py", line 333, in load_resource
    raise IOError('resource "%s" not found' % name)
OSError: resource "Packages/User/LSP-julia.sublime-settings" not found
jwortmann commented 4 years ago

I know where the problem is, just still figuring out the best way to solve it. As a workaround, it should work when ST is restarted, because that user settings file should be created automatically at the first start.

By the way, I moved some of the config reading logic into the utils.py file, because I thought the logic to merge nested settings dicts might be usefull for other LSP-* packages too, but I guess that's obsolete with the dotted settings structure on ST 4, so maybe I can simplify it a bit then.