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

[WIN] When creating a new unsaved file, autocompletion does not work in it #10

Closed
hazratisulton opened this issue Feb 14, 2024 · 2 comments

Comments

@hazratisulton
Copy link

Create new file - Try completion in it -> Completion not working
In console:
Traceback (most recent call last): File "C:\Program Files\Sublime Text\Lib\python38\sublime_plugin.py", line 959, in on_modified run_view_callbacks('on_modified', view_id) File "C:\Program Files\Sublime Text\Lib\python38\sublime_plugin.py", line 741, in run_view_callbacks callback(v, *args) File "C:\Program Files\Sublime Text\Lib\python38\sublime_plugin.py", line 162, in profiler return event_handler(*args) File "C:\Users\agzam\AppData\Roaming\Sublime Text\Packages\refact\__init__.py", line 21, in on_modified session = refact_session_manager.get_session(view) File "C:\Users\agzam\AppData\Roaming\Sublime Text\Packages\refact\src\refact_sessions.py", line 35, in get_session self.views[view_id] = RefactSession(view, self.get_connection, view_id == "UI") File "C:\Users\agzam\AppData\Roaming\Sublime Text\Packages\refact\src\refact_sessions.py", line 58, in __init__ self.connection().load_document(self.file_name, get_text(self.view), self.languageId) File "C:\Users\agzam\AppData\Roaming\Sublime Text\Packages\refact\src\refact_lsp.py", line 19, in load_document uri = pathlib.Path(file_name).as_uri() File "./python3.8/pathlib.py", line 748, in as_uri ValueError: relative path can't be expressed as a file URI
If you save the file, the compliment will start working

Versions:
Sublime plugin v 0.0.1
Sublime Text Build 4169

@olegklimov
Copy link
Contributor

olegklimov commented Feb 15, 2024

An interesting one. We use URI in refact-lsp everywhere, not path.

@hazratisulton
Copy link
Author

#15 - fixed

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