python-language-server
python-language-server copied to clipboard
pyls.plugins.jedi_completion.include_params: default changed recently
It seems commit dfff3c965fea83c0429b17c37a0668b6023f519b by @gatesn changed the default value of the config parameter pyls.plugins.jedi_completion.include_params from true to false.
package.json still says its default value is true, so this might be unintentional. Can you, please, change it back to true? I think the following simple patch is probably sufficient.
diff --git a/pyls/plugins/jedi_completion.py b/pyls/plugins/jedi_completion.py
index d2d11cd..4aca0d0 100644
--- a/pyls/plugins/jedi_completion.py
+++ b/pyls/plugins/jedi_completion.py
@@ -49,7 +49,7 @@ def pyls_completions(config, document, position):
snippet_support = completion_capabilities.get('completionItem', {}).get('snippetSupport')
settings = config.plugin_settings('jedi_completion', document_path=document.path)
- should_include_params = settings.get('include_params')
+ should_include_params = settings.get('include_params', True)
return [_format_completion(d, snippet_support and should_include_params) for d in definitions] or None
Also, I think it's not possible to set this config variable from different config files (setup.cfg,tox.ini, ...) How should a user set this config parameter?
Thank you.
i got the same problem, too
solved this question. settings only accepted when configuration changed. and what i use as client is monaco.
so i change the configura, and overwrite onDidChangeConfiguration,
config.onDidChangeConfiguration = () => { langaugeClient.sendNotification( DidChangeConfigurationNotification.type, { settings: pyls_cfg } ) }
and the pyls_cfg is the json object, and it works. hope this can help you
Thank you.
I still hope for a server-side solution. Or a change in package.json to document the new behavior.
I would like to add my voice to this. I searched for a few hours as to why I was not getting snippet support from pyls.
#671 proposes the same modification, so I don't have high hopes for this issue.
@netweng could you point out what that config object looks alike? I'm trying to replicate the same with Monaco