From 40bdbd29d09e532d36388c61e71e83a8a017de65 Mon Sep 17 00:00:00 2001 From: Ruslan Date: Fri, 13 Feb 2026 16:26:03 +0200 Subject: [PATCH] feat(surround): add surround for ansible variables --- after/ftplugin/yaml_ansible.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 after/ftplugin/yaml_ansible.lua diff --git a/after/ftplugin/yaml_ansible.lua b/after/ftplugin/yaml_ansible.lua new file mode 100644 index 0000000..47d859b --- /dev/null +++ b/after/ftplugin/yaml_ansible.lua @@ -0,0 +1,15 @@ +-- update this configuration of nvim-surround +-- to handle {{ }} structure in ansible +-- I want to be able to add and delete those braces +local surround = require('nvim-surround') + +surround.buffer_setup({ + surrounds = { + ['v'] = { + add = { '{{ ', ' }}' }, + find = '{{[^}]-}}', + delete = '({{%s+)().+(%s+}})()$', + } + } +}) +