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

[ST4] typescript-language-server piling up popover windows #3719

Closed
jamwaffles opened this issue Oct 27, 2020 · 4 comments
Closed

[ST4] typescript-language-server piling up popover windows #3719

jamwaffles opened this issue Oct 27, 2020 · 4 comments
Labels

Comments

@jamwaffles
Copy link

Description

When using the LSP plugin with typescript-language-server, I see the same popup dialog for certain bits of code pop up repeatedly which never go away. Notice the super heavy box shadow on this screenshot:

image

Here's another example when I switched from tmp.tsx (described below) to a Markdown buffer to write this bug report in:

image

This could be an issue with the LSP package, the TypeScript or ST itself not handling things correctly but I'm not sure which. If somebody knows, please direct me to the right place to post this bug report.

Steps to reproduce

  1. Install the LSP and TypeScript plugins
  2. Configure the LSP plugin like this:
{
  "auto_show_diagnostics_panel": "never",
  "clients":
  {
    "typescript-language-server":
    {
      "command":
      [
        "/home/james/.nvm/versions/node/v14.2.0/bin/node",
        "/home/james/.yarn/bin/typescript-language-server",
        "--stdio"
      ],
      "languages":
      [
        {
          "document_selector": "source.js",
          "languageId": "javascript"
        },
        {
          "document_selector": "source.jsx",
          "languageId": "javascriptreact"
        },
        {
          "document_selector": "source.ts",
          "languageId": "typescript"
        },
        {
          "document_selector": "source.tsx",
          "languageId": "typescriptreact"
        }
      ]
    }
  },
  "log_debug": false,
  "log_stderr": false,
  "show_code_actions_bulb": false,
  "show_symbol_action_links": true,
  "show_view_status": false,
  "show_diagnostics_in_view_status": false,
  "show_view_status": false
}

You might need to change the paths to point at the correct Node/typescript-language-server binaries.

  1. Create a file called tmp.tsx and save it. Ensure the syntax highlighting is set to TypeScriptReact. This issue doesn't seem to appear with non-saved files.
  2. Paste the following into this file:
const TheThing = () => {
  const validationMessages = [1, 2, 3];
};
  1. Place the cursor at the end of the array and type .map((result)) so the final file looks like this:
const TheThing = () => {
  const validationMessages = [1, 2, 3].map((result));
};

Not valid TS, but it exhibits the error.

Expected behavior

The function signature popover for map that shows when typing .map((result)) should go away.

Actual behavior

A new popover is shown for every keypress. The popovers persist when changing tabs and when closing the file and open over one another. This issue has persisted over several versions, including the current 4090 dev build.

Environment

  • Build: 4090
  • Operating system and version: Linux Mint 20, problem shows with multiple kernel versions and both nVidia and AMD GPUs
  • Cinnamon

Startup output if anyone needs it:

startup, version: 4090 linux x64 channel: dev
executable: /opt/sublime_text/sublime_text
working dir: /home/james
packages path: /home/james/.config/sublime-text/Packages
state path: /home/james/.config/sublime-text/Local
zip path: /opt/sublime_text/Packages
zip path: /home/james/.config/sublime-text/Installed Packages
ignored_packages: ["Rust", "Vintage"]
pre session restore time: 0.0887133
startup time: 0.194632
first paint time: 0.200423
git: located Sublime Merge installed at /opt/sublime_merge
git: using configuration from system git install
git: tracking working dir /home/james/Repositories/Fluidic/cloudapi
reloading plugin Default.arithmetic
reloading plugin Default.auto_indent_tag
reloading plugin Default.block
reloading plugin Default.colors
reloading plugin Default.comment
reloading plugin Default.convert_color_scheme
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.indentation
reloading plugin Default.install_package_control
reloading python 3.3 plugin 0_package_control_loader.00-package_control
reloading python 3.3 plugin 0_package_control_loader.01-pygments
reloading python 3.3 plugin 0_package_control_loader.10-shellenv
reloading python 3.3 plugin 0_package_control_loader.50-backrefs
reloading python 3.3 plugin 0_package_control_loader.50-bracex
reloading python 3.3 plugin 0_package_control_loader.50-markupsafe
reloading python 3.3 plugin 0_package_control_loader.50-pymdownx
reloading python 3.3 plugin 0_package_control_loader.50-python-markdown
reloading python 3.3 plugin 0_package_control_loader.50-pyyaml
reloading python 3.3 plugin 0_package_control_loader.51-python-jinja2
reloading python 3.3 plugin 0_package_control_loader.55-mdpopups
reloading python 3.3 plugin 0_package_control_loader.55-wcmatch
reloading python 3.3 plugin Alignment.Alignment
reloading python 3.3 plugin Case Conversion.case_conversion
reloading python 3.3 plugin Case Conversion.case_parse
reloading python 3.3 plugin Color Highlight.ColorHighlight
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile
reloading plugin Default.quick_panel
reloading plugin Default.rename
reloading python 3.3 plugin Color Highlight.colorizer
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading python 3.3 plugin Color Highlight.colors
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading python 3.3 plugin Color Highlight.settings
reloading plugin Default.settings
reloading python 3.3 plugin Evaluate.evaluate
reloading plugin Default.show_scope_name
reloading plugin Default.side_bar
reloading python 3.3 plugin Git.git_commands
reloading plugin Default.sort
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.ui
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading python 3.3 plugin Github Tools.github
reloading plugin ShellScript.ShellScript
reloading plugin INI.open_context_reg_key
reloading plugin INI.reg_completions
reloading plugin LESS.less_completions
reloading python 3.3 plugin Github Tools.github_blame
reloading python 3.3 plugin Github Tools.github_copy_link
reloading python 3.3 plugin Github Tools.github_create_pr
reloading plugin Pretty JSON.PrettyJson
reloading python 3.3 plugin Github Tools.github_file_history
reloading python 3.3 plugin Github Tools.github_issues
reloading python 3.3 plugin Github Tools.github_open
reloading python 3.3 plugin Github Tools.github_plugin_settings
reloading python 3.3 plugin Github Tools.github_pulls
reloading python 3.3 plugin Github Tools.github_repository
reloading python 3.3 plugin LSP.boot
reloading plugin Pretty JSON.PrettyJsonListeners
reloading plugin Sass.sass_completions
git: tracking working dir /home/james/Repositories/Fluidic/password_store
git: tracking working dir /home/james/Repositories/Fluidic/background_subtraction
git: tracking working dir /home/james/Repositories/event-sauce
reloading python 3.3 plugin MarkdownPreview.markdown_preview
reloading python 3.3 plugin MarkdownPreview.markdown_settings
reloading python 3.3 plugin MarkdownPreview.markdown_wrapper
reloading python 3.3 plugin Package Control.1_reloader
reloading python 3.3 plugin Package Control.2_bootstrap
reloading python 3.3 plugin Package Control.Package Control
reloading python 3.3 plugin Rust Enhanced.cargo_build
reloading python 3.3 plugin Rust Enhanced.SyntaxCheckPlugin
reloading python 3.3 plugin Rust Enhanced.toggle_setting
reloading python 3.3 plugin RustFmt.difflib
reloading python 3.3 plugin RustFmt.RustFmt
reloading python 3.3 plugin JsPrettier.JsPrettier
reloading python 3.3 plugin TodoReview.TodoReview
reloading python 3.3 plugin TypeScript.main
2020-10-27 15:19:56,007: 139891477061056: WARNING: TypeScript plugin initialized.
WARNING:TS:TypeScript plugin initialized.
reloading python 3.3 plugin WakaTime.WakaTime
plugins loaded
Path of node executable is configured as: /home/james/.nvm/versions/node/v14.5.0/bin/node
[WakaTime] [INFO] Initializing WakaTime plugin v9.1.2
Package Control: Skipping automatic upgrade, last run at 2020-10-27 14:50:00, next run at 2020-10-27 15:50:00 or after
@jamwaffles
Copy link
Author

This issue seems to persist even when disabling the LSP package. Disabling the TypeScript package makes the popovers go away entirely, so I guess that might be the culprit.

@wbond
Copy link
Member

wbond commented Oct 27, 2020

Generally Microsoft's TypeScript package for Sublime Text unfortunately seems to rather often run into issues like this. For ST4 I would generally recommend the built-in TypeScript syntax and using the LSP server. The combination of those should provide a better experience, and are likely more well-maintained.

@wbond wbond closed this as completed Oct 27, 2020
@wbond wbond added the Support label Oct 27, 2020
@rwols
Copy link

rwols commented Oct 27, 2020

It's a problem of the Microsoft Typescript package: microsoft/TypeScript-Sublime-Plugin#760

@jamwaffles
Copy link
Author

Thanks for the link. I looked through this repo for issues but it didn't occur to me to look elsewhere. Apologies for the time waste!

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

No branches or pull requests

3 participants