TerminalFi / LSP-copilot

GitHub Copilot support for Sublime Text LSP plugin provided through Copilot.vim.
623 stars 25 forks source link

LSP-copilot options not available in command palette #152

Closed beckyjackson closed 1 month ago

beckyjackson commented 1 month ago

Following the setup instructions, I have installed LSP and LSP-copilot from Package Control, then restarted Sublime. When I open the command palette, I do not see any LSP options. Typing LSP, I can only see the Preferences:

Screen Shot 2024-05-14 at 10 07 21 AM

I am on Sublime build 4169 (latest).

jfcherng commented 1 month ago

Do LSP-"pyright" work for you?

beckyjackson commented 1 month ago

I just installed it to see if something would pop up in command palette, I haven't actually set it up at all. Just trying to get LSP-copilot to show up.

jfcherng commented 1 month ago

I would like to say "run LSP: Troubleshoot server" for LSP-copilot but it seems not even LSP is working from your screenshot.

jfcherng commented 1 month ago

Please provide error messages which are shown in ST's console.

beckyjackson commented 1 month ago

No error messages are showing in the console.

jfcherng commented 1 month ago

And neither there is LSP: Troubleshoot server?

beckyjackson commented 1 month ago

No, typing "troubleshoot" does not return any results from the command palette.

jfcherng commented 1 month ago

Mind providing the whole ST console message after just starting up?

beckyjackson commented 1 month ago

Ah, apologies, there is an error message if I force Sublime to open the console at startup, it just wasn't showing if I opened the console later:

reloading plugin LSP-copilot.boot
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python38/sublime_plugin.py", line 325, in reload_plugin
    m = importlib.import_module(modulename)
  File "./python3.8/importlib/__init__.py", line 127, in import_module
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 868, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/rjackson/Library/Application Support/Sublime Text 3/Installed Packages/LSP-copilot.sublime-package/boot.py", line 15, in <module>
  File "/Users/rjackson/Library/Application Support/Sublime Text 3/Installed Packages/LSP-copilot.sublime-package/plugin/__init__.py", line 3, in <module>
  File "/Users/rjackson/Library/Application Support/Sublime Text 3/Installed Packages/LSP-copilot.sublime-package/plugin/commands.py", line 9, in <module>
  File "/Users/rjackson/Library/Application Support/Sublime Text 3/Installed Packages/LSP.sublime-package/plugin/__init__.py", line 12, in <module>
  File "/Users/rjackson/Library/Application Support/Sublime Text 3/Installed Packages/LSP.sublime-package/plugin/core/sessions.py", line 2, in <module>
  File "/Users/rjackson/Library/Application Support/Sublime Text 3/Installed Packages/LSP.sublime-package/plugin/core/diagnostics_manager.py", line 2, in <module>
  File "/Users/rjackson/Library/Application Support/Sublime Text 3/Installed Packages/LSP.sublime-package/plugin/core/settings.py", line 3, in <module>
  File "/Users/rjackson/Library/Application Support/Sublime Text 3/Installed Packages/LSP.sublime-package/plugin/core/types.py", line 10, in <module>
ModuleNotFoundError: No module named 'wcmatch'
beckyjackson commented 1 month ago

Furthermore:

reloading plugin Package Control.plugin
reloading plugin User.open_console_on_startup
plugins loaded
Package Control: Installing 7 libraries...
Package Control: The library "sublime_lib" is not available for Python 3.8
Package Control: The library "PyYAML" is not available for Python 3.8
Package Control: The library "bracex" is not available for Python 3.8
Package Control: The library "backrefs" is not available for Python 3.8
Package Control: The library "lsp_utils" is not available for Python 3.8
Package Control: The library "mdpopups" is not available for Python 3.8
Package Control: The library "wcmatch" is not available for Python 3.8

I tried setting my python path to the path for python 3.11 and installed wcmatch, but I'm still getting the same error.

jfcherng commented 1 month ago

Did you override channels in Package Control's plugin settings? If you did, you either include all default channels or just (recommended) remove channels from your settings.

I do mean Package Control's plugin settings. Not LSP or LSP-copilot.

jfcherng commented 1 month ago

Another thing to make sure is that you are using Package Control v4 (v4.0.6 latest). But since it has been released for quite a while, it's unlikely the cause.

beckyjackson commented 1 month ago

Thanks for the pointer - I checked the Package Control settings and saw that the channels value had been overriden, and I was missing:

channel_v4 for python 3.8 compatible libraries

I removed LSP and LSP-copilot, enabled the https://packagecontrol.github.io/channel/channel_v4.json channel, and reinstalled both LSP and LSP-copilot. Upon restarting Sublime, I see this in the console:

✈ Copilot has been signed in and authorized.
jfcherng commented 1 month ago

Closed as resolved.