-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
No confirmation prompt - no code refactoring #38
Comments
Hi, looking at the logs, it looks like pymple is trying to resolve imports from root in your case. Could you show me your project tree, and try running :lua print(vim.fn.getcwd()) and paste me the output of that? Cheers |
Could you try adding the following root python marker to your config? python = {
-- the names of root markers to look out for when discovering a project
root_markers = { "pyproject.toml", "setup.py", ".git", "manage.py", ".project_root" },
... ---------------
} |
I made changes as suggested. My configuration looks as follows:
Log files:
|
Thanks, I'm pretty sure the project root discovery is starting too high in your case and never finds your project markers. Could you try updating to the latest version (I added a couple of log messages to try and debug your case), re-running your command and printing the logs? |
|
See above. Thanks for helping. I dont mind it looking into other projects, e.g., code/xnat , code/dicom_utils as they import from this project (fran), but it does not refactor the import statements as far as i can see inside fran. |
Ok, got it. I'm pretty sure opening neovim directly in your project folder will make it work. I'll try adding additional logic to properly discover project root in workflows like yours in the coming days. |
Just fyi: I now get a brief error when I start nvim: |
Just pushed a fix for your project discovery problem. Pymple should now be able to automatically infer which project you're working on when renaming files. It works on my machine. Can you confirm that's the case for yours? Thanks in advance.
|
Didn't work. Logs:
|
My bad, didn't spot that pythonpath in the logs. You should be good to go now 😉 |
Thanks to you, Now i have a powerful IDE. Still use pycharm for debugging as the debugger is a bit meh. that an interesting nextt project for you ? lol |
I mostly debug python using ipdb tbh. Never really felt the need for a full-fledged debugger :) |
Cheers ! You're welcome to contribute to pymple in the future if you find any interesting improvement you feel is worth integrating! 👍🏻 |
Hi it seems the problem has reappeared. It might be worth re-opening the issue. No more refactoring. I have updated the plugin to latest. It won't refactor filenames whether i open neovim in home folder or inside the project folder (code/fran/fran). This is the log:
|
Hi Thanks for the much needed plugin! I am setting it up with nvim-tree. I have installed all dependencies. if i go inside nvim-tree and rename a file, a rename box appears as shown in your gif. But after renaming the file nothing happens at all. No confirmation box appears. I just get the message that the file has been renamed.
Neovim:
NVIM v0.10.1
Build type: Release
LuaJIT 2.1.1713484068
Checkhealth:
==============================================================================
pymple: health#pymple#check
Checking for required plugins ~
Checking external dependencies ~
For example, I just renamed a file common.py to common2.py. See the Pymplelog:
The text was updated successfully, but these errors were encountered: