From fc67eecc8a40bf28d3d2b190702e58c580bfba9f Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Thu, 19 Jan 2023 18:33:43 +0100 Subject: vim: format config with stylua MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Robert Günzler --- .vim/after/ftplugin/go.lua | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) (limited to '.vim/after/ftplugin/go.lua') diff --git a/.vim/after/ftplugin/go.lua b/.vim/after/ftplugin/go.lua index c881292..94eaa0e 100644 --- a/.vim/after/ftplugin/go.lua +++ b/.vim/after/ftplugin/go.lua @@ -1,20 +1,19 @@ -- vim.opt.shiftwidth = 4 -vim.keymap.set('n', - 'i', - function() - local iface = vim.fn.input('Impl: ') - if not iface or iface == '' then return end - require('misc').word_under_cursor(function(word) - vim.cmd ('normal ][o') - local args = { - 'impl', - '-dir', - vim.fn.expand('%:h:p'), - '"'..string.lower(word:sub(0,1))..' *'..word..'"', - iface, - } - vim.cmd ('r!' .. table.concat(args, ' ')) - end) +vim.keymap.set('n', 'i', function() + local iface = vim.fn.input('Impl: ') + if not iface or iface == '' then + return end -) + require('misc').word_under_cursor(function(word) + vim.cmd('normal ][o') + local args = { + 'impl', + '-dir', + vim.fn.expand('%:h:p'), + '"' .. string.lower(word:sub(0, 1)) .. ' *' .. word .. '"', + iface, + } + vim.cmd('r!' .. table.concat(args, ' ')) + end) +end) -- cgit 1.4.1