TerminalFi / LSP-copilot

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

Incompatible with any sublime-workspace? #109

Closed Sevans711 closed 1 year ago

Sevans711 commented 1 year ago

When I open a sublime workspace (e.g., file.sublime-workspace), I encounter the error below. It occurs repeatedly as LSP-copilot continues trying and failing to initialize.

Other notes:

The error:

failed to register session LSP-copilot to listener ViewListener(201)
Traceback (most recent call last):
  File "/Users/Sevans/Library/Application Support/Sublime Text 3/Installed Packages/LSP.sublime-package/plugin/core/windows.py", line 183, in _publish_sessions_to_listener_async
    listener.on_session_initialized_async(session)
  File "/Users/Sevans/Library/Application Support/Sublime Text 3/Installed Packages/LSP.sublime-package/plugin/documents.py", line 211, in on_session_initialized_async
    self._session_views[session.config.name] = SessionView(self, session, self._uri)
  File "/Users/Sevans/Library/Application Support/Sublime Text 3/Installed Packages/LSP.sublime-package/plugin/session_view.py", line 54, in __init__
    session_buffer = SessionBuffer(self, buffer_id, uri)
  File "/Users/Sevans/Library/Application Support/Sublime Text 3/Installed Packages/LSP.sublime-package/plugin/session_buffer.py", line 149, in __init__
    self._check_did_open(view)
  File "/Users/Sevans/Library/Application Support/Sublime Text 3/Installed Packages/LSP.sublime-package/plugin/session_buffer.py", line 174, in _check_did_open
    self.do_document_diagnostic_async(view, version)
  File "/Users/Sevans/Library/Application Support/Sublime Text 3/Installed Packages/LSP.sublime-package/plugin/session_buffer.py", line 460, in do_document_diagnostic_async
    if mgr.should_ignore_diagnostics(self.last_known_uri, self.session.config):
  File "/Users/Sevans/Library/Application Support/Sublime Text 3/Installed Packages/LSP.sublime-package/plugin/core/windows.py", line 364, in should_ignore_diagnostics
    if self._workspace.includes_excluded_path(path):
  File "/Users/Sevans/Library/Application Support/Sublime Text 3/Installed Packages/LSP.sublime-package/plugin/core/workspace.py", line 107, in includes_excluded_path
    exclude_patterns = self._folders_exclude_patterns[i]
IndexError: list index out of range
jfcherng commented 1 year ago

I use ST's "project" feature (project + workspace) on daily basis and have never encountered this...

Not sure why LSP-copilot has so many "weird" issues since it's just a normal LSP client like other Node.js-based ones...


It's a LSP's issue. You may try to reinstall LSP and if it's in vain, I suggest report it in LSP's repo.

rchl commented 1 year ago

Think https://github.com/sublimelsp/LSP/pull/2276 should fix it.

jfcherng commented 1 year ago

Closed since upstream's fix has been merged.