ansible / ansible-language-server

🚧 Ansible Language Server codebase is now included in vscode-ansible repository
https://github.com/ansible/vscode-ansible
MIT License
248 stars 91 forks source link

Command failed error appears when running ansible-lint #21

Closed yaegassy closed 3 years ago

yaegassy commented 3 years ago

Problem

If there are syntax errors problems, you will get a very unimpressive error message.

2_vscode-ansible-error

Is it possible for the language server to handle it properly and put it in the diagnostics message?

Solution

Please add some adjusting here

Alternatives

No response

Additional context

I created an extension to use "ansible-language-server" using coc.nvim, a VSCode-like plugin for Vim8/Neovim.

I was surprised to see a bright red error screen. :(

1_coc-ansible-error
priyamsahoo commented 3 years ago

Hey, thanks for this. The code base is currently going through a major refactoring effort. We don't expect this to be an issue when that work is done. This will remain open until sometime after the new version is released. Please check back in the next month or so.

There's a high chance that this will get fixed after https://github.com/ansible/ansible-language-server/pull/5 is merged!

priyamsahoo commented 3 years ago

Also, based on the output, I believe that ansible-lint is either not installed in the env. or not configured properly.

For a quick fix, try setting disabling the lint in the settings.json as see if the error shows up or not.

Nonetheless, it will be fixed in the #5 is merged!

priyamsahoo commented 3 years ago

Also, about the solution:

yaegassy commented 3 years ago

@priyamsahoo Thanks for the info!!!

I understood that there is already a similar issue.

My extension (coc-ansible) for Vim is tuned to automatically set ansible.ansibleLint.enabled to false if ansible-lint is not detected in the current Python environment (including virtual environments).

yaegassy commented 3 years ago

This issue is closed because there is a similar issue and it looks like it will be adjusted in the future.