I’m running a similar setup with neovim and ansible LSP via Mason!
The rules that ansible lint autofix actually can fix on it’s own are well documented here.
Ansible lint is getting used to lint the file and provide you with linting feedback, for instance error messages and highlighting those, but should not actually change your code. Afaik it does not use ansible-lint --fix, but you could cross check this with copying examples of provided documentation and if your setup manages to autofix these.
I’d guess that this is due to your LSP setup trying to help you writing “valid” YAML. This also doesn’t necessarily has to be the ansible LSP maybe rather some kind of YAML LSP. So its probably rather an code syntax validation than a linting thingy.
I did browse the documentation but I didn’t find this specific case. It seems that ansible-lint acts as a reformatter that also reformats yaml, so that’s why I thought it was the one to blame.
LSP is managed via nvim-lspconfig, but the installation of the required tools is managed via mason and mason-lspconfig.nvim (this one also manages file type association).
Formatting is managed via conform.nvim and the autoformat option. It seems that by lazyvim sets prettier for yaml formatting (also installed via mason).
So that, on save it is conform.nvim the one calling prettier which is running using its default configuration.
And finally, prettier-ignore did the trick.
# prettier-ignore
property:
"{{ some long jinja expression that
I would like to keep indented
the way I write it }}"