Auto Update LSP on Startup seems to be ignored. #102
Replies: 11 comments 1 reply
-
Thanks for reporting this issue, we will take a look on ASAP |
Beta Was this translation helpful? Give feedback.
-
@crashmeister Make sure your configuration is correct. From the screenshot i can already tell it is not: maxLineLenght must be number not string. If its still not working. Provide Log from: View -> Python LSP log |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
The file /Users/Craig/Library/Application Support/NetBeans/19/.pythonlsp/lsp_log_file is empty. If the 'Python LSP Log' you referenced is available elsewhere in the file system, let me know where so I can find it. If the config was the issue, the issue would NOT have corrected itself after adding/removing a space to the config. |
Beta Was this translation helpful? Give feedback.
-
If there is none thats mean you are not using the latest version. Upgrade to 1.8! I just tested the feature and it is working:
{
"auto_pop_completion": false,
"configurationSources": [
"pycodestyle"
],
"plugins": {
"autopep8": {
"enabled": false
},
"flake8": {
"config": "",
"enabled": false,
"exclude": [],
"executable": "flake8",
"filename": "",
"hangClosing": false,
"ignore": [],
"maxLineLength": 80,
"indentSize": 4,
"perFileIgnores": [],
"select": [
""
]
},
"jedi": {
"auto_import_modules": [
"numpy"
],
"extra_paths": [],
"env_vars": {}
},
"jedi_completion": {
"enabled": true,
"include_params": true,
"include_class_objects": false,
"include_function_objects": false,
"fuzzy": false,
"eager": false,
"resolve_at_most": 25,
"cache_for": [
"pandas",
"numpy",
"tensorflow",
"matplotlib"
]
},
"jedi_definition": {
"enabled": true,
"follow_imports": true,
"follow_builtin_imports": true,
"follow_builtin_definitions": true
},
"jedi_hover": {
"enabled": true
},
"jedi_references": {
"enabled": true
},
"jedi_signature_help": {
"enabled": true
},
"jedi_symbols": {
"enabled": true,
"all_scopes": true,
"include_import_symbols": true
},
"mccabe": {
"enabled": true,
"threshold": 15
},
"preload": {
"enabled": true,
"modules": []
},
"pycodestyle": {
"enabled": true,
"exclude": [],
"filename": [],
"select": [
""
],
"ignore": [],
"hangClosing": false,
**"maxLineLength": 80,**
"indentSize": 4
},
"pydocstyle": {
"enabled": false,
"convention": "None",
"addIgnore": [],
"addSelect": [],
"ignore": [],
"select": [
""
],
"match": "(?!test_).*\\.py",
"matchDir": "[^\\.].*"
},
"pyflakes": {
"enabled": true
},
"pylint": {
"enabled": false,
"args": [],
"executable": ""
},
"rope_autoimport": {
"enabled": false,
"memory": false
},
"rope_completion": {
"enabled": false,
"eager": false
},
"yapf": {
"enabled": false
},
"rope": {
"extensionModules": "",
"ropeFolder": [
""
]
},
"pylsp_mypy": {
"enabled": false,
"live_mode": true,
"dmypy": false,
"strict": false
},
"black": {
"enabled": true,
"cache_config": false,
"line_length": 80,
"preview": false
},
"pyls-memestra": {
"enabled": true,
"recursive": false,
"decorator_module": "deprecated",
"decorator_function": "deprecated",
"reason_keyword": "reason",
"additional_search_paths": []
}
}
}
If its not working on your side thats probably means your config is rejected by the LSP server (due to some incoherence or else) and you should get a trace in the log file This issue contains informations that might help you: #92 |
Beta Was this translation helpful? Give feedback.
-
Please note that I am using MacOS, not Windows. Upgraded to 1.8. Copied your config above. Removed the ** from line length. I tried a few changes to the config but cannot get it do what I want. Example: I changed the ignore to: All I want is to have syntax highlighting and basic syntax checking (NOT coding rules). Is this possible ? |
Beta Was this translation helpful? Give feedback.
-
Found this in the IDE.log while playing with the config settings, may be why no log entries:
|
Beta Was this translation helpful? Give feedback.
-
@crashmeister : your problem is that your are using an empty config: "" to flake8 which override everything. This config works well for me: "flake8": {
"enabled": true,
"exclude": [],
"executable": "flake8",
"filename": "",
"hangClosing": false,
"ignore": ["E501"],
"maxLineLength": 75,
"indentSize": 4,
"perFileIgnores": []
}, you need to remove: "config": "",
"select": [
""
] I made a little fix so that the log is more verbose. Upgrade to version 1.9 |
Beta Was this translation helpful? Give feedback.
-
Wow, not sure what is going on here.
|
Beta Was this translation helpful? Give feedback.
-
BTW, the LSP log is now populated. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Status update: Copied the schema. For the first time, the code checking is now working, which is great. Unfortunately, it is still loading the wrong config on startup. I still have to force a reload in settings to get the right one loaded.
My config sets pycodestyle as follows:
|
Beta Was this translation helpful? Give feedback.
-
When I start Netbeans (v19) and open a python source file, the configuration I have set up is not implemented.
I have to open settings, add a space to the config somewhere to trick it into thinking it has been updated, the click 'Apply'.
At this point my config works. Opening another files shows correct implementation of the config. When I quit Netbeans, the config is lost.
I should NOT have to do this every time I open Netbeans. My config should be applied automatically.
This shows all the code marked with violations after opening Netbeans:
This shows the LSP Server tab in Netbeans Settings, Auto Update is checked:
This shows the same code correctly displayed after applying a dummy 'space' change to the config:
Thanks.
Craig.
Beta Was this translation helpful? Give feedback.
All reactions