From d3ec7fd5912bf173120736ebd23335190d6b02a8 Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Tue, 7 Nov 2023 13:54:14 +0100 Subject: [PATCH] add comment string for terraform code --- home-manager/neovim/commentary.lua | 2 ++ home-manager/neovim/default.nix | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 home-manager/neovim/commentary.lua diff --git a/home-manager/neovim/commentary.lua b/home-manager/neovim/commentary.lua new file mode 100644 index 0000000..ef07ed1 --- /dev/null +++ b/home-manager/neovim/commentary.lua @@ -0,0 +1,2 @@ +vim.cmd([[autocmd FileType nix setlocal commentstring=#%s]]) +vim.cmd([[autocmd FileType terraform setlocal commentstring=#%s]]) diff --git a/home-manager/neovim/default.nix b/home-manager/neovim/default.nix index 7303449..ac36944 100644 --- a/home-manager/neovim/default.nix +++ b/home-manager/neovim/default.nix @@ -36,7 +36,7 @@ { plugin = vim-commentary; type = "lua"; - config = "vim.cmd([[autocmd FileType nix setlocal commentstring=#%s]])"; + config = builtins.readFile ./commentary.lua; } vim-sleuth {