Sublime Forum

[SOLVED] Tooltip h1 cut off

#1

Any ideas why this is happening and how to fix it?

0 Likes

#2

Quite a little information about what you want here.

But let me guess

You mean the ta = []) ?

You are using LSP?

Answer:

Malformed docstring from a language-server.

0 Likes

#3

Yeah

ta = [])

is cut off, i’m using CodeComplice as the package on LSP for php isn’t as good.

0 Likes

#4

CodeComplice uses Komodo Edit’s codeintel2 library to provide such information. codeintel is mainly for python2 and goes back to 2007. It wasn’t updated much since then.

Maybe a parser bug within codeintel or a flaw with python3 code? codeintel2 is too heavy to search for errors for a none-involved guy.

CodeComplice as client of codeintel2 seem no longer maintained, so it might be hard to get it solved.

The first line of the content returned by codeintel2 is rendered as h1. Looks like the signature is cut by codeintel2 library for any reason.

1 Like

#5

It’s a shame it doesn’t seem to be maintained anymore.

Is there anything I can change to try and stop it from being cut off?

0 Likes

#6

You could try to hack the posted function in CodeComplice to check the second or even third line of each snippet to be part of the function. But as I didn’t dig too deep into it, you’d need to figure out the format and how to do it on your own.

The fact it is no longer maintained and doesn’t support most of the recent features, is one reason for me not to use it.

I played around with the latest beta ( 3.0.0-beta.32 ) of SublimeCodeIntel, which uses codeintel2 as a server like LSP does with language-servers. It needed some tweaks to work with windows (use TCP/IP instead of PIPES) and shows the terminal window, but seems to be under developement by @Kronuz. Maybe you can ask him to have a look on the issue.

0 Likes

#7

I just wish I knew python, i’ll give it a go though :slight_smile: wish me luck

0 Likes

#8

Created an issue if anyone can solve it, it’s sending my eyes west and usually i’d just var_dump() to get the contents of a variable, don’t even know how i’d do that in Sublime using python.

0 Likes

#9

It seems for some reason this part is at index 1 in the array.

ta = [])

Still looking for help python syntax is confusing.

0 Likes

#11

Found some instances where it doesn’t work, back to the drawing board :smiley:

0 Likes

#12

Okay now this should fix it, hopefully I don’t have anymore weird edge cases.

https://github.com/carlevison/CodeComplice/blob/2f49efcbb42cb8b68a4a0c7cd584b387a8275e4b/CodeComplice.py#L236-L241

Now life is bright and happy again

0 Likes