facelessuser / sublime-markdown-popups

Markdown popup dependency for Sublime
https://facelessuser.github.io/sublime-markdown-popups/
Other
112 stars 13 forks source link

Popups on Wayland #88

Closed Elinvynia closed 4 years ago

Elinvynia commented 4 years ago

Hello!

I am using LSP which uses mdpopups to dislay the docs of an item when you hover it, however they are not appearing for me. Other sublime features seem to work fine (like the right click context menu). I'd be happy to help with providing more useful information if necessary.

I'm running ST4 on Arch with SwayWM

facelessuser commented 4 years ago
  1. If you've installed something that recently uses mdpopups, make sure you restart Sublime to make sure mdpopups gets loaded up properly.

  2. If you are having issues, look in your Sublime console to see if there are errors, then post the errors here.

  3. If there are no errors in the console from mdpopups, then I would assume the issue is with LSP.

@gir-bot add S: more-info-needed

Elinvynia commented 4 years ago
startup, version: 4074 linux x64 channel: dev
executable: /opt/sublime_text/sublime_text
working dir: /home/-snip-
packages path: /home/-snip-/.config/sublime-text/Packages
state path: /home/-snip-/.config/sublime-text/Local
zip path: /opt/sublime_text/Packages
zip path: /home/-snip-/.config/sublime-text/Installed Packages
ignored_packages: ["Rust", "Vintage"]
pre session restore time: 0.199977
startup time: 0.303416
first paint time: 0.310388
git: tracking working dir /home/-snip-/projects/tranquility
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-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 LSP.boot
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 plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.settings
reloading plugin Default.show_scope_name
reloading plugin Default.side_bar
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 plugin ShellScript.ShellScript
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
plugins loaded
Package Control: Skipping automatic upgrade, last run at 2020-05-18 14:14:14, next run at 2020-05-18 15:14:14 or after

The isssue could be LSP, is there something minimal I can do to rule that out and reproduce the intended behavior?

facelessuser commented 4 years ago

Sure

  1. open console
  2. if using Sublime Text 4 right click the input box in the console and select Python 3.3 (skip this step if on ST3).
  3. Make sure your cursor is on the top most line to make sure it shows up (so it's not covered by the console window).
  4. Enter the following lines in the console:
    import mdpopups
    mdpopups.version()
    mdpopups.show_popup(sublime.active_window().active_view(), '# Test\n\nHello world!\n')

If you do have errors make sure to report to me the version of mdpopups.

As for LSP, when you perform an action that you think should render a poupup, and it doesn't show, if there is an error in the console, that's what I really need. If you don't see one, it is probably not mdpopups having issues.

Elinvynia commented 4 years ago
Python 3.3>>> import mdpopups
Python 3.3>>> mdpopups.version()
(3, 7, 1)
Python 3.3>>> mdpopups.show_popup(sublime.active_window().active_view(), '# Test\n\nHello world!\n')

Nothing shows up on screen, I suspect this may be an issue with Wayland rather than LSP (since its working fine on my x11/windows machines)

facelessuser commented 4 years ago

It could be, but I'd argue that it is more likely due to Sublime and Waylan than Waylan and mdpopups. Mdpopups relies on the Sublime API to render the popups, mdpopups just ensures the content is converted from Markdown (if enabled) and injects a common styling etc.

Following similar steps, you can:

  1. Open console
  2. Make sure your cursor is on the top most line to make sure it shows up (so it's not covered by the console window).
  3. Run these commands:
    import sublime
    sublime.active_window().active_view().show_popup('Hello world!')
Elinvynia commented 4 years ago

Yeah nothing shows up either, seems like we found the culprit! I'll bring it up with Sublime, thanks a lot fo r helping me with these console commands.

facelessuser commented 4 years ago

No problem.