Add maxLiteralStringLength as a configuration property
We introduce a new configuration property maxLiteralStringLength that fixes #1416 and #1655.
The property can be set either in the serverSettings (e.g. .vscode/settings.json):
{
"basedpyright.analysis.maxLiteralStringLength": 100
}
or in the pyproject.toml:
[tool.basedpyright]
maxLiteralStringLength = 100
or in the pyrightconfig.json:
{
"maxLiteralStringLength": 100
}
Know issues
It looks like we can't control the render-length of completion suggestions, which is unfortunate. However, even though completion suggestions are still truncated after 50 characters, the effective value on auto-complete respects the configuration property.
@DetachHead This touches a lot of stuff, so it will probably be a huge pain to merge with future pyright releases... Don't know how you typically handle this. Let me know if it can be improved.