ansible / vscode-ansible

vscode/vscodium extension for providing Ansible auto-completion and integrating quality assurance tools like ansible-lint, ansible syntax check, yamllint, molecule and ansible-test.
https://ansible.readthedocs.io/projects/vscode-ansible/
MIT License
360 stars 86 forks source link

VSCode eats argument names from popup documentation #1343

Open signed-log opened 4 months ago

signed-log commented 4 months ago

Summary

VSCode eats argument names from popup documentation

image

Extension version

v24.5.2

VS Code version

1.90.0-insider

Ansible Version

ansible [core 2.16.7]
  config file = /root/faiserver-vm/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /root/.cache/pypoetry/virtualenvs/faiserver-vm-7JCm3fVC-py3.11/lib/python3.11/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /root/.cache/pypoetry/virtualenvs/faiserver-vm-7JCm3fVC-py3.11/bin/ansible
  python version = 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] (/root/.cache/pypoetry/virtualenvs/faiserver-vm-7JCm3fVC-py3.11/bin/python)
  jinja version = 3.1.4
  libyaml = True

OS / Environment

Debian 12, both using Remote: SSH and local

Relevant log output

No response

Snowman-25 commented 3 months ago

Same is happening to me.

BendingBender commented 3 months ago

For me it's been like this for over a year. Basically, everything marked with a C() in the docs (I suppose monospace font) is being eaten by the documentation popups.

priyamsahoo commented 2 months ago

@signed-log, could you share the example playbook to reproduce this in the local environment?

jbericat commented 1 month ago

I've got the very same problem, so I might provide with the info you need to reproduce @priyamsahoo :

image

Expected outcome

Like the official collection docs (it's the same source):

image

VS Code Version

$ code --version
1.92.2
fee1edb8d6d72a0ddff41e5f71a671c23ed924b9
x64

Enabled VS Code Extensions

Details

``` $ code --list-extensions --show-versions aaron-bond.better-comments@3.0.2 andenetalexander.vim-cheatsheet@0.0.1 chrischinchilla.vscode-pandoc@0.4.8 dotjoshjohnson.xml@2.5.1 hashicorp.terraform@2.32.2 jamesls.jmespath-vscode@0.0.3 mdickin.markdown-shortcuts@0.12.0 ms-azuretools.vscode-docker@1.29.2 ms-kubernetes-tools.vscode-kubernetes-tools@1.3.16 ms-python.black-formatter@2024.2.0 ms-python.debugpy@2024.10.0 ms-python.isort@2023.10.1 ms-python.python@2024.12.3 ms-python.vscode-pylance@2024.8.1 ms-toolsai.jupyter@2024.7.0 ms-toolsai.jupyter-keymap@1.1.2 ms-toolsai.jupyter-renderers@1.0.19 ms-toolsai.vscode-jupyter-cell-tags@0.1.9 ms-toolsai.vscode-jupyter-slideshow@0.1.6 ms-vscode-remote.remote-containers@0.380.0 ms-vscode-remote.remote-ssh@0.113.1 ms-vscode-remote.remote-ssh-edit@0.86.0 ms-vscode.powershell@2024.2.2 ms-vscode.remote-explorer@0.4.3 ms-vscode.vscode-typescript-next@5.7.20240823 oderwat.indent-rainbow@8.3.1 pdconsec.vscode-print@0.12.16 pkief.material-icon-theme@5.9.0 redhat.ansible@24.9.5152897 redhat.vscode-commons@0.0.6 redhat.vscode-redhat-account@0.2.0 redhat.vscode-xml@0.27.1 redhat.vscode-yaml@1.15.0 standard.vscode-standard@2.1.3 streetsidesoftware.code-spell-checker@3.0.1 streetsidesoftware.code-spell-checker-catalan@1.0.5 tnaseem.theme-seti@0.0.2 vscodevim.vim@1.27.3 wholroyd.jinja@0.0.8 xabikos.javascriptsnippets@1.8.0 yzhang.markdown-all-in-one@3.6.2 ```

Settings file

settings.json

```json { "redhat.telemetry.enabled": false, "terminal.integrated.enableMultiLinePasteWarning": "never", "terminal.integrated.detectLocale": "on", "settingsSync.ignoredExtensions": [ "ms-vscode-remote.remote-wsl" ], "workbench.iconTheme": "material-icon-theme", "workbench.colorTheme": "Seti Modified", "files.associations": { "*.yml": "ansible", "*.yaml": "ansible", "*.md": "ansible" }, "editor.tokenColorCustomizations": { "comments": "#1cce16" }, "keyboard.dispatch": "keyCode", "files.insertFinalNewline": true, "security.workspace.trust.untrustedFiles": "open", "javascript.preferences.quoteStyle": "single", "[python]": { "diffEditor.ignoreTrimWhitespace": false, "editor.formatOnType": true, "editor.wordBasedSuggestions": "off", "editor.defaultFormatter": "ms-python.black-formatter" }, "[xml]": { "editor.defaultFormatter": "redhat.vscode-xml" }, "explorer.confirmDragAndDrop": false, "workbench.colorCustomizations": { "[Seti Modified]": { "commandCenter.border": "#00a2ff", "commandCenter.activeBackground": "#1d42bd", "commandCenter.background": "#1d42bd", "commandCenter.activeForeground": "#d9ff00", "commandCenter.inactiveForeground": "#d9ff00", "commandCenter.foreground": "#d9ff00", }, }, "window.title": "${dirty}${folderName}", "explorer.compactFolders": false, "emmet.includeLanguages": { "jinja2": "html", "jinja-html": "html", "django-html": "html", }, "editor.hover.delay": 1000, "[markdown]": { "editor.defaultFormatter": "yzhang.markdown-all-in-one" }, "terminal.integrated.drawBoldTextInBrightColors": true, "editor.renderFinalNewline": "on", "files.trimFinalNewlines": true, "files.trimTrailingWhitespace": true, "terminal.integrated.fontFamily": "'RobotoMono Nerd Font'", "[ansible]": { "editor.detectIndentation": true, "editor.insertSpaces": true, "editor.tabSize": 2, "editor.quickSuggestions": { "comments": true, "other": true, "strings": true }, "editor.autoIndent": "advanced", "editor.defaultFormatter": "redhat.ansible", "editor.defaultFoldingRangeProvider": "redhat.ansible" }, "ansible.completion.provideRedirectModules": true, "ansible.executionEnvironment.enabled": true, "ansible.executionEnvironment.volumeMounts": [ { "src": "/home/jordi/.ssh/", "dest": "/runner/.ssh/", "options": "ro" }, { "src": "/home/jordi/.ansible/", "dest": "/runner/.ansible/", "options": "rw" } ], "ansible.executionEnvironment.containerEngine": "docker", "ansible.lightspeed.enabled": false, "ansible.executionEnvironment.pull.policy": "always", "ansible.executionEnvironment.image": "xxxxxxxxxxxxxxxxxx", "workbench.settings.applyToAllProfiles": [ "terminal.integrated.drawBoldTextInBrightColors", "ansible.ansible.path", "ansible.python.interpreterPath", "ansible.ansibleNavigator.path", "ansible.validation.lint.path", "ansible.executionEnvironment.enabled", "ansible.executionEnvironment.containerEngine", "ansible.executionEnvironment.image", "ansible.executionEnvironment.pull.arguments", "ansible.executionEnvironment.pull.policy", "editor.defaultFoldingRangeProvider", "editor.defaultFormatter", "notebook.defaultFormatter", "[ansible]", "ansible.executionEnvironment.volumeMounts", "ansible.validation.lint.arguments", "ansible.executionEnvironment.containerOptions" ], "terminal.integrated.minimumContrastRatio": 7, "editor.largeFileOptimizations": false, "diffEditor.ignoreTrimWhitespace": false, "cSpell.language": "en,ca", "diffEditor.useInlineViewWhenSpaceIsLimited": false, "settingsSync.ignoredSettings": [ "-ansible.ansible.path", "-ansible.ansible.reuseTerminal", "-ansible.python.interpreterPath", "-ansible.python.activationScript", "-ansible.ansibleNavigator.path", "-ansible.validation.lint.path" ], "ansibleServer.trace.server": "verbose", "editor.defaultFoldingRangeProvider": "redhat.ansible", "editor.defaultFormatter": "redhat.ansible", "notebook.defaultFormatter": "standard.vscode-standard" } ```

Ansible Playbook

Details

```yml --- - name: Test playbook hosts: localhost tasks: - name: Set up cronjob to run docker system prune ansible.builtin.cron: name: "Docker system prune 30 days" minute: 0 hour: 6 job: "docker system prune -af --filter 'until=720h'" tags: cron-docker-prune ```

Ansible language server trace

(Appears on the "output" widget when hovering onto an element)

Details

``` [Trace - 1:39:46 AM] Received response 'textDocument/hover - (3)' in 7ms. Result: { "contents": { "kind": "markdown", "value": "`str`\n\nMinute when the job should run \\(0\\-59\\, \\*\\, \\*/2\\, and so on\\)\\.\n\n\n*Default*:\n ```javascript\n*\n```" } } ```

Ansible & Python versions

Details

```shell $ bash-4.4$ ansible --version ansible [core 2.15.11] config file = /home/jordi/MyStuff/repos/gitlab/ajuntament_de_terrassa/ansible-v2/ansible.cfg configured module search path = ['/runner/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.11/site-packages/ansible ansible collection location = /runner/.ansible/collections:/usr/share/ansible/collections executable location = /usr/local/bin/ansible python version = 3.11.7 (main, Jan 26 2024, 19:22:20) [GCC 8.5.0 20210514 (Red Hat 8.5.0-21)] (/usr/bin/python3) jinja version = 3.1.4 libyaml = True ```

OS / Environment

Details

```bash $ cat /etc/os-release PRETTY_NAME="Ubuntu 22.04.4 LTS" NAME="Ubuntu" VERSION_ID="22.04" VERSION="22.04.4 LTS (Jammy Jellyfish)" VERSION_CODENAME=jammy ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=jammy ```