Skip to content

Conversation

@CREAsTIVE
Copy link

@CREAsTIVE CREAsTIVE changed the title Update repository.json Add LSP-rustowl May 20, 2025
@CREAsTIVE
Copy link
Author

any updates?

@jwortmann
Copy link
Member

The PR reviewer action is currently broken -> #128

I took a quick look over the plugin and I would recommend to create an LspTextCommand to run the server request. Within that command you can use self.session_by_name to retrieve the plugin's session (instead of needing to use the "private" LSP methods to get the session from the listener). Then you would just run this command from your EventListener callbacks. That would also give you the flexibility to manually run this command from a key binding or context menu, in case that might be useful.

For example:

from LSP.plugin import LspTextCommand
from LSP.plugin.core.registry import get_position

class LspRustowlAnalyzeCommand(LspTextCommand):
    session_name = SESSION_NAME

    def run(self, edit: sublime.Edit, event: dict | None = None, point: int | None = None) -> None:
        session = self.session_by_name(self.session_name)
        if session:
            pos = position(self.view, get_position(self.view, event, point))
            session.send_request(...)

class Listener(sublime_plugin.EventListener):
    def on_selection_modified(self, view: sublime.View):
        if get_setting(view, "rustowl.hover_type") == "cursor" and len(view.sel()) > 0:
            view.run_command("lsp_rustowl_analyze", {"point": view.sel()[0].a})

    def on_hover(self, view, point, hover_zone):
        if get_setting(view, "rustowl.hover_type") == "mouse":
            view.run_command("lsp_rustowl_analyze", {"point": point})

@CREAsTIVE
Copy link
Author

CREAsTIVE commented May 30, 2025

Repository was updated, new version published. Now its possible to use lsp-rustowl with commands only, without auto analyzing selected token, thanks @jwortmann. I will wait for reviewer action tool to be fixed.

@CREAsTIVE
Copy link
Author

CREAsTIVE commented Jun 9, 2025

bump

@CREAsTIVE
Copy link
Author

bump x2

@CREAsTIVE
Copy link
Author

bububump?

@rwols
Copy link
Member

rwols commented Jul 27, 2025

Apologies for the silence. I'm looking at your plugin.

@rwols
Copy link
Member

rwols commented Jul 27, 2025

@CREAsTIVE could you please rebase to the latest main branch changes? (I think #128 makes the PR bot work)

@rwols
Copy link
Member

rwols commented Jul 27, 2025

LGTM in any case

Copy link

@STReviewBot STReviewBot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated testing result: WARNING

Repo link: LSP-rustowl
Results help

Packages added:
  - LSP-rustowl

Processing package "LSP-rustowl"
  - WARNING: It looks like you're using platform-dependent code. Make sure you thought about the platform key in your pull request.
    - File: plugin.py
    - Line: 50, Column: 8
  - WARNING: It looks like you're using platform-dependent code. Make sure you thought about the platform key in your pull request.
    - File: plugin.py
    - Line: 52, Column: 8
  - WARNING: It looks like you're using platform-dependent code. Make sure you thought about the platform key in your pull request.
    - File: plugin.py
    - Line: 54, Column: 8
  - WARNING: It looks like you're using platform-dependent code. Make sure you thought about the platform key in your pull request.
    - File: plugin.py
    - Line: 60, Column: 8
  - WARNING: It looks like you're using platform-dependent code. Make sure you thought about the platform key in your pull request.
    - File: plugin.py
    - Line: 62, Column: 8
  - WARNING: It looks like you're using platform-dependent code. Make sure you thought about the platform key in your pull request.
    - File: plugin.py
    - Line: 64, Column: 8
  - WARNING: It looks like you're using platform-dependent code. Make sure you thought about the platform key in your pull request.
    - File: plugin.py
    - Line: 69, Column: 8
  - WARNING: It looks like you're using platform-dependent code. Make sure you thought about the platform key in your pull request.
    - File: plugin.py
    - Line: 155, Column: 8

Copy link

@STReviewBot STReviewBot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated testing result: WARNING

Repo link: LSP-rustowl
Results help

Packages added:
  - LSP-rustowl

Processing package "LSP-rustowl"
  - WARNING: It looks like you're using platform-dependent code. Make sure you thought about the platform key in your pull request.
    - File: plugin.py
    - Line: 50, Column: 8
  - WARNING: It looks like you're using platform-dependent code. Make sure you thought about the platform key in your pull request.
    - File: plugin.py
    - Line: 52, Column: 8
  - WARNING: It looks like you're using platform-dependent code. Make sure you thought about the platform key in your pull request.
    - File: plugin.py
    - Line: 54, Column: 8
  - WARNING: It looks like you're using platform-dependent code. Make sure you thought about the platform key in your pull request.
    - File: plugin.py
    - Line: 60, Column: 8
  - WARNING: It looks like you're using platform-dependent code. Make sure you thought about the platform key in your pull request.
    - File: plugin.py
    - Line: 62, Column: 8
  - WARNING: It looks like you're using platform-dependent code. Make sure you thought about the platform key in your pull request.
    - File: plugin.py
    - Line: 64, Column: 8
  - WARNING: It looks like you're using platform-dependent code. Make sure you thought about the platform key in your pull request.
    - File: plugin.py
    - Line: 69, Column: 8
  - WARNING: It looks like you're using platform-dependent code. Make sure you thought about the platform key in your pull request.
    - File: plugin.py
    - Line: 155, Column: 8

@CREAsTIVE
Copy link
Author

@CREAsTIVE could you please rebase to the latest main branch changes? (I think #128 makes the PR bot work)

Done, thanks for response :D

@rwols
Copy link
Member

rwols commented Jul 30, 2025

Did you verify your plug-in works on macOS, Linux and Windows?

@CREAsTIVE
Copy link
Author

Did you verify your plug-in works on macOS, Linux and Windows?

I did verify it on windows, forget about other platforms, my bad. I will come back when I check the functionality on other platforms

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

Successfully merging this pull request may close these issues.

4 participants