Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings documentation #110

Closed
patillacode opened this issue Jun 1, 2023 · 15 comments
Closed

Settings documentation #110

patillacode opened this issue Jun 1, 2023 · 15 comments
Labels
documentation Improvements or additions to documentation question Asking usage questions

Comments

@patillacode
Copy link

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)

@jfcherng
Copy link
Collaborator

jfcherng commented Jun 1, 2023

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

@jfcherng jfcherng added question Asking usage questions documentation Improvements or additions to documentation labels Jun 1, 2023
@patillacode
Copy link
Author

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?

@patillacode
Copy link
Author

Forgot to put the images:

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

@jfcherng
Copy link
Collaborator

jfcherng commented Jun 1, 2023

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.

@patillacode
Copy link
Author

Screenshot 2023-06-01 at 13 05 17

it looks like it is up and running...

@patillacode
Copy link
Author

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 😅

@jfcherng
Copy link
Collaborator

jfcherng commented Jun 1, 2023

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.

@jfcherng
Copy link
Collaborator

jfcherng commented Jun 1, 2023

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?

@jfcherng
Copy link
Collaborator

jfcherng commented Jun 1, 2023

What if you trigger auto completion manually?

@rwols
Copy link

rwols commented Jun 1, 2023

It seems to be stuck initializating.

@patillacode
Copy link
Author

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 🤔

@jfcherng
Copy link
Collaborator

jfcherng commented Jun 1, 2023

Does the error persist even if after restarting ST?

@patillacode
Copy link
Author

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!

@patillacode
Copy link
Author

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?

@jfcherng
Copy link
Collaborator

jfcherng commented Jun 1, 2023

Closed as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Asking usage questions
Projects
None yet
Development

No branches or pull requests

3 participants