I’ve restarted creating ansible yaml content and realized that some quality of life tooling is missing for ansible yaml content developers. That is why I’ve decided to create ansible language protocol server (LSP) with all the features that are missing in the official one (from my point of view).
Here is a link to public repo:
There are also VS Code (and Open VSX) plugins:
https://marketplace.visualstudio.com/items?itemName=kksat.zals
Open VSX Registry (VS Code forks, e.g. Cursor)
This extension is a drop-in replacement for official Red Hat ansible VS Code extension, but also can be used alogn side it:
https://marketplace.visualstudio.com/items?itemName=redhat.ansible
All the ansible yaml language features available in both extensions (mine and official):
- Syntax highlighting
- Integration with ansible-lint
- Smart autocompletion
- Documentation reference (in official extension this feature is only for modules, see below for zals)
- Jump to module code
What is not supported in my extension:
- all that is not related to ansible yaml content
- lightspeed (certainly not)
- mcp server (certainly not)
- ansible execution environments (unlikely in the future)
- content creation tools (not yet)
- nothing related to ansible-dev-tools package (no idea)
What does this extension bring? Why would anyone use it? Because of its features. All screenshots and screen recordins are from VS Code. I am preparing neovim plugin as well.
Variables:
-
Variable hover
-
Find all references of variable:

-
Find all references of variable key:

Here only variablesansible_facts['distribution']are shown, this will also work withansible_facts.distribution(both ways) -
Add and remove debug statements for variables


Roles:
-
Role hover - opens role readme file when you hover over role name in import_role or include_role
-
Role parameter hover - get extract from argument_specs file when you hover over role parameters (both for import_role and include_role)
-
Go to role definition. Here role definition is argument_spec file:

-
Go to role implementation. Here role implementation is role tasks/main file:

-
Go to definition for role parameters - again this is argument_specs file:

-
Go to implementaton for role parameters - open defaults/main or vars/main role file where parameter value is set:
Workspace features:
-
Find symbols in the workspace - fuzzy search across all playbooks, roles, tasks in your workspace:

More to follow!
If you have an idea in mind - please let me know. The current roadmap: variable rename, extracting tasks to roles, memory usage optimization.
More information about implementation.
This is native binary (win, mac, linux) written in zig. Size is about 5 Mb. Does not depend on anything with exception of ansible-core and ansible-lint. When it starts it needs < 10 seconds to read and parse collection with 1000 files. After that it does not reread from disk.
Memory footprint for this extension is 40 MB current / 155 MB peak on my mac for the project
that contains roughly 5,542 YAML files and 11,104 total files (excluding Git, virtualenvs, and common caches).
Almost all operations (with few exceptions) are performed in around 10 ms, this was one of the reasons I’ve used zig (compiled language). I wanted nice UX and not break user flow.
If you find this extension and lsp useful, I would highly appreciate it if you write a quick review and submit your rating using these links:
https://marketplace.visualstudio.com/items?itemName=kksat.zals&ssr=false#review-details
https://open-vsx.org/extension/kksat/zals/reviews
You can always contact me directly
Thank you for you attention.


