odoo-ide / vscode-odoo

Visual Studio Code extension for Odoo
https://marketplace.visualstudio.com/items?itemName=trinhanhngoc.vscode-odoo
39 stars 2 forks source link

Python refactoring options deactivated when extension is activated #78

Open mathisgauthey opened 1 month ago

mathisgauthey commented 1 month ago

Hi there.

Just found out that when using your extension, the python extract refactoring stops working. I don't know why, but this is really important in my workflow, and I don't think this is happening on the PyCharm extension.

Thanks in advance !

trinhanhngoc commented 1 month ago

Hello @mathisgauthey ,

This is a known limitation. Some refactoring features are only available when using the default Python language server (Pylance). Because the Pylance language server is not extensible, I must build a new language server for Odoo, which is currently missing some features from Pylance.

mathisgauthey commented 1 month ago

Hello @mathisgauthey ,

This is a known limitation. Some refactoring features are only available when using the default Python language server (Pylance). Because the Pylance language server is not extensible, I must build a new language server for Odoo, which is currently missing some features from Pylance.

Thanks for the answer. I noticed that removing the "python.languageServer": "None", allows to get the Pylance refactor options while preserving the vscode-odoo auto completion and features. I just get a few unresolved imports from pylance, which is normal, but it allows to benefir from such a feature.

Would it be possible to allow for an option to prevent vscode-odoo from adding this line to settings.json ?

trinhanhngoc commented 1 month ago

@mathisgauthey ,

OK. I will consider adding that option to the next version.