Open diego898 opened 7 years ago
That's a side-effect of setting the auto-complete to a mininum width here. It might be the best to undo that change.
PS. LaTeX-cwl only hosts the cwl files. LaTeXTools parses them and provides the auto completion.
ah - so I should delete the corresponding issue over there? Also - Would you suggest I make a change myself to fix this? If so, where? Or will it be fixed within latextools itself? Thanks!
You can just delete the mentioned line. If we fix this #790 will occur again so I am not sure whether wie fix it. However I would vote to fix this and not force a minimal auto complete size.
Hm I went ahead and deleted that line, and it the popup now displays but Im getting the following behavior:
Notice, for some reason selecting \longleftarrow
places it without the actual backslash now in both regular and math mode
Okay I wondered about that behavior. Thanks for that hint, that it is related to ljust. Change this line
to
(c[0], c[1][1:]) if c[1].startswith("\\") and "${" in c[1] else c
Thanks @r-stein, that fixed it for me.
So to summarize, in order for me to fix the issues that came up in this post I had to make the following changes to latex_cwl_completions.py
Let's leave this open until we have a working solution in the am actual release.
One thing that might get the advantages of both approaches is to apply the left-justification only to the first entry in the results (this would have to be moved elsewhere). We could even try making the size of the padding configurable, since the size might depend on the environment is run in.
One thing that might get the advantages of both approaches is to apply the left-justification only to the first entry in the results
This would result in a autocomplete, that shrinks after you type a few characters and the first entry disappears. I think this issue is more important than the other one, so I vote for fixing this and search for a way to fix both.
Quick question - when latextools is updated in the future, what will happen to me since I've changed my local installation? I guess package control will return an error and then I can just uninstall/reinstall?
If the file is changed by the update it will be overwritten.
ah I thought package control might not like that - got it thanks!
Hello again! Sorry about this, but even after making the above changes, I see that the clipping is still happening, but it seems to only be happening with the suggestions of \newcommand
I've defined in a custom file.
You need to change this file and maybe the next line to
return (s + "\tlocal", comp[1:] if comp.startswith("\\") and "${" in comp else comp)
Sorry @r-stein when you say I need to change that file/line do you mean I need to change that line to what you suggested? I am unclear because you said"and maybe the next line", which suggests I need to change that file (to what?) in addition to changing the return line. If I take that interpretation, I understand it to mean that I DELETE that line, AND CHANGE the return line to what you suggested. Is this correct?
Yes the line I suggested and maybe the next line (I am not sure about that).
I've only deleted that line, and it seems to work fine right now. I will report back if anything! Thanks!
This issue mirrors the one I made on the LaTeX-cwl project: https://github.com/LaTeXing/LaTeX-cwl/issues/6
I am unsure if latexing is still being developed, or if at some point latextools will want to replace latex-cwl with its own version.