From a7b72fc27edac2305dbf0af807981bd703835b25 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Mon, 23 May 2022 04:41:22 +0100 Subject: Fix example woopsy --- README | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'README') diff --git a/README b/README index aedbabd..ea7c902 100644 --- a/README +++ b/README @@ -45,15 +45,16 @@ lua <e", "lua vim.diagnostic.open_float()") nn("[d", "lua vim.diagnostic.goto_prev()") nn("]d", "lua vim.diagnostic.goto_next()") local function onattach(client, buf) + local function nn(from, to) + vim.api.nvim_buf_set_keymap(buf, "n", from, to, opts) + end nn("gD", "lua vim.lsp.buf.declaration()") nn("gd", "lua vim.lsp.buf.definition()") nn("K", "lua vim.lsp.buf.hover()") -- cgit v1.2.3