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

LSP completion does not seem to be invoked correctly when manually typing a package prefix. #1680

Closed
alecthomas opened this issue May 24, 2021 · 2 comments

Comments

@alecthomas
Copy link

Describe the bug

Using the Go LSP and SublimeLSP, LSP completion does not seem to be invoked correctly when manually typing a package prefix.

In the example below this prefix is manifest.. When typing that manually the only completions that show are those from the original dialog that match the prefix. As can be seen from the video, if completion is invoked prior to the . (eg. manif<tab>) then LSP completion is correctly invoked.

This is reliably reproducible, so maybe it's some weird setting I have enabled?

I've also tried the exact same steps using VSCode and the same version of gopls, and it works correctly.

To Reproduce
Steps to reproduce the behavior:

  1. Use gopls.
  2. Type a full package including period, eg. fmt. - a truncated list of completions is displayed.
  3. Type a package prefix, eg. fm<tab> - a full list of completions is displayed.

Expected behavior

LSP completions should populate the completion list after a period.

Screenshots

sublimelsp-bug.mov

Environment (please complete the following information):

  • OS: MacOS 11.3.1
  • Sublime Text version: 4106
  • LSP version: 1.3.1
  • Language servers used: gopls 0.6.11

Additional context

My LSP settings:

// Settings in here override those in "LSP/LSP.sublime-settings"
{
  "log_debug": true,
  "log_server": [
    "panel",
  ],
  "lsp_format_on_save": true,
  "show_symbol_action_links": true,
  "lsp_code_actions_on_save": {
    "source.fixAll": true,
    "source.organizeImports": true
  },
  "show_code_actions": "bulb",
  "show_diagnostics_panel_on_save": 0,
  "inhibit_snippet_completions": true,
  "show_references_in_quick_panel": true,
  "clients": {
    "gopls": {
      "enabled": true,
      "command": ["gopls"],
      "languageId": "go",
      "scopes": ["source.go"],
      "syntaxes": [
          "Packages/Go/Go.sublime-syntax",
          "Packages/GoSublime/syntax/GoSublime-Go-Recommended.sublime-syntax"
      ],
      "initializationOptions": {
          "experimentalWorkspaceModule": false,
          "usePlaceholders": true,
      },
    },
  }
}
@rwols
Copy link
Member

rwols commented May 24, 2021

Is this the same as #1228?

@alecthomas
Copy link
Author

It looks like it is yes. Apologies, I did a search but failed to find it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants