TerminalFi/LSP-copilot

Settings documentation

patillacode opened this issue · 15 comments

First of all, thanks for this, Sublime is kind of the forgotten editor these days. I was very glad to find this repo!

My issue:

I have unsuccessfully tried to find some documentation for the settings.

I can see the default settings but I don't know what each one means and if I need to change it in my local or not.

For example, I know there is a phantom value allowed for the completion_style but just because I stumbled upon it by reading a closed issue.

What about the rest of options?
Is there any documentation I could read?

Cheers!

(Sorry if it exists and I missed it)

Is there any documentation I could read?

There is no traditional document here indeed...

In the hard way, yes,

"completion_style": {
"default": "popup",
"markdownDescription": "Completion style. `popup` is the default, `phantom` is experimental(there are [well-known issues](https://github.com/TheSecEng/LSP-copilot/issues)).",
"type": "string",
"enum": [
"popup",
"phantom"
]
}

In an easy way, install LSP-json, which uses sublime-package.json for suggestion automatically.

image

In the hard way, yes,
oh, wow! this is something! thanks!

Regarding your last image, I have LSP-json installed although I don't get what you get... do you have any clue as to why?
My LSP-json settings are empty, meaning I am using the default ones, are you?

Forgot to put the images:

Screenshot 2023-06-01 at 12 49 12
Screenshot 2023-06-01 at 12 56 52

In the hard way, yes,
oh, wow! this is something! thanks!

Regarding your last image, I have LSP-json installed although I don't get what you get... do you have any clue as to why? My LSP-json settings are empty, meaning I am using the default ones, are you?

First check LSP-json is activated, see the bottom-left corner just like you can see LSP-copilot there. Not sure whether a restart is needed for ST but most likely not.

Screenshot 2023-06-01 at 13 05 17

it looks like it is up and running...

I don't know what it is, if it works for you it should for me too.
My Sublime installation is pretty minimal, LSP and only a couple more packages are installed, so I am pretty sure there are no conflicts, maybe I need to set some settings in LSP-json or in the generic ST settings?

Also I notices in your image you get copilot in the settings file but I don't 😅

maybe I need to set some settings in LSP-json or in the generic ST settings?

No. It should just work.

Also I notices in your image you get copilot in the settings file but I don't 😅

"hook_to_auto_complete_command": false,

And I prefer to manually trigger auto completion sometimes.

Screenshot 2023-06-01 at 13 05 17

it looks like it is up and running...

There should be both LSP-copilot & LSP-json.

Is there any error message in ST console or LSP log panel?

What if you trigger auto completion manually?

rwols commented

It seems to be stuck initializating.

Cannot trigger it manually, it doesn't appear as an option when in the settings file!

Good call about the console:

LSP log is empty

ST console isn't:

Unable to open /Users/dvitto/Library/Application Support/Sublime Text/Packages/LSP-copilot/LSP-copilot.sublime-settings
Error handling None
Traceback (most recent call last):
  File "/Users/dvitto/Library/Application Support/Sublime Text/Installed Packages/LSP.sublime-package/plugin/core/sessions.py", line 2077, in on_payload
    handler(result)
  File "/Users/dvitto/Library/Application Support/Sublime Text/Installed Packages/LSP.sublime-package/plugin/core/sessions.py", line 1427, in _handle_initialize_success
    self._plugin = self._plugin_class(weakref.ref(self))
  File "/Users/dvitto/Library/Application Support/Sublime Text/Installed Packages/LSP-json.sublime-package/plugin.py", line 46, in __init__
  File "/Users/dvitto/Library/Application Support/Sublime Text/Packages/lsp_utils/st3/lsp_utils/generic_client_handler.py", line 187, in __init__
    super().__init__(*args, **kwargs)
  File "/Users/dvitto/Library/Application Support/Sublime Text/Packages/lsp_utils/st3/lsp_utils/_client_handler/abstract_plugin.py", line 157, in __init__
    self.on_ready(api)
  File "/Users/dvitto/Library/Application Support/Sublime Text/Installed Packages/LSP-json.sublime-package/plugin.py", line 61, in on_ready
  File "/Users/dvitto/Library/Application Support/Sublime Text/Installed Packages/LSP-json.sublime-package/schema_store.py", line 53, in load_schemas_async
AttributeError: 'NoneType' object has no attribute 'load_settings'

Maybe you are more versed on this, I am not sure I understand the issue 🤔

Does the error persist even if after restarting ST?

Legend, restarting worked....

Screenshot 2023-06-01 at 13 57 34

I am happy it works but it bugs me hard at the same time!

We ended up talking about something totally different from the original matter, thanks for following me to the side-track!

I think we can close this?

Closed as resolved.