spyder-ide / pyls-spyder

Spyder extensions for the python language server (pyls)
MIT License
0 stars 6 forks source link

Annotations are not shown in Outline and comments are not shown in "Show todo list" #23

Open AlexStox opened 3 years ago

AlexStox commented 3 years ago

Problem Description

I don't understand, are there different purposes for "annotations" and "comments"?

"Annotations" (# TODO, # !!!, # ???, etc.) are available only via Header menu -> Source -> Show todo list. While "Comments" (# ---- whatever text here) are shown in Outline pane.

I found the way how to combine them together: # ---- # TODO sometext - in this case it will be available as a comment in Outline and as an annotation in Show todo list.

The major issue is I can't simply make any annotation to see it in Outline, as well as if I make a "comment", it won't be available in Show todo list.

What steps reproduce the problem?

  1. Make any annotation in the Editor code: # TODO I should do this

  2. On Outline pane in Options menu check the box "Show special comments"

  3. You won't see the annotation in the Outline list

  4. Make any comment in the Editor code: # ---- I comment on this

  5. On Outline pane in Options menu check the box "Show special comments"

  6. You can see the comment in the Outline list

  7. But you won't see the comment in Header menu -> Source -> Show todo list

What is the expected output? What do you see instead?

I would like to see comments in the Show todo list as well as to see annotations in the Outline list

Versions

Dependencies


# Mandatory:
atomicwrites >=1.2.0          :  1.4.0 (OK)
chardet >=2.0.0               :  4.0.0 (OK)
cloudpickle >=0.5.0           :  1.6.0 (OK)
cookiecutter >=1.6.0          :  1.7.2 (OK)
diff_match_patch >=20181111   :  20200713 (OK)
intervaltree >=3.0.2          :  3.1.0 (OK)
IPython >=7.6.0               :  7.22.0 (OK)
jedi =0.17.2                  :  0.17.2 (OK)
jsonschema >=3.2.0            :  3.2.0 (OK)
keyring >=17.0.0              :  22.3.0 (OK)
nbconvert >=4.0               :  6.0.7 (OK)
numpydoc >=0.6.0              :  1.1.0 (OK)
paramiko >=2.4.0              :  2.7.2 (OK)
parso =0.7.0                  :  0.7.0 (OK)
pexpect >=4.4.0               :  4.8.0 (OK)
pickleshare >=0.4             :  0.7.5 (OK)
psutil >=5.3                  :  5.8.0 (OK)
pygments >=2.0                :  2.8.1 (OK)
pylint >=1.0                  :  2.7.4 (OK)
pyls >=0.36.2;<1.0.0          :  0.36.2 (OK)
pyls_black >=0.4.6            :  0.4.6 (OK)
pyls_spyder >=0.3.2           :  0.3.2 (OK)
qdarkstyle =3.0.2             :  3.0.2 (OK)
qstylizer >=0.1.10            :  0.1.10 (OK)
qtawesome >=0.5.7             :  1.0.2 (OK)
qtconsole >=5.0.3             :  5.0.3 (OK)
qtpy >=1.5.0                  :  1.9.0 (OK)
rtree >=0.8.3                 :  0.9.4 (OK)
setuptools >=39.0.0           :  52.0.0.post20210125 (OK)
sphinx >=0.6.6                :  3.5.3 (OK)
spyder_kernels >=2.0.1,<2.1.0 :  2.0.1 (NOK)
textdistance >=4.2.0          :  4.2.1 (OK)
three_merge >=0.1.1           :  0.1.1 (OK)
watchdog >=0.10.3;<2.0.0      :  1.0.2 (OK)
zmq >=17                      :  20.0.0 (OK)

# Optional:
cython >=0.21                 :  None (NOK)
matplotlib >=2.0.0            :  3.3.4 (OK)
numpy >=1.7                   :  1.19.2 (OK)
pandas >=1.1.1                :  1.1.3 (OK)
scipy >=0.17.0                :  1.6.2 (OK)
sympy >=0.7.3                 :  None (NOK)
ccordoba12 commented 3 years ago

Hey @AlexStox, thanks for reporting. What we categorize as "special comments" are simply comments that start with four dashes (as you found out).

However, we could include annotation comments as well. @andfoy, what do you think about this?

AlexStox commented 3 years ago

well, actually as I mentioned, it's possible to include them both into the Outline using the format: # ---- # TODO sometext

AlexStox commented 3 years ago

Maybe it's better to add a list of TODOs and likewise notes as a list to Outline? As additional checkbox - it's great from navigation and quick access point of view, when I can see them all and go there (no need to click the top menu)

andfoy commented 3 years ago

We could definitely add special comments to the symbols request, while also adding them to a new linting call in pyls-spyder