From 3e7075f8944ac56b78c82f68835722807ad62e18 Mon Sep 17 00:00:00 2001 From: Chloe Kudryavtsev Date: Wed, 18 Jan 2023 10:11:34 +0100 Subject: nvim: update config (checkpoint) --- dot_config/nvim/lua/bindings.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'dot_config/nvim/lua/bindings.lua') diff --git a/dot_config/nvim/lua/bindings.lua b/dot_config/nvim/lua/bindings.lua index eb579f9..42c5896 100644 --- a/dot_config/nvim/lua/bindings.lua +++ b/dot_config/nvim/lua/bindings.lua @@ -1,3 +1,5 @@ +---@diagnostic disable:undefined-global + local util = require 'util' local env = vim.env @@ -11,11 +13,21 @@ if not util.hp 'which-key.nvim' then else -- general bindings that aren't specific to a plugin require 'which-key'.register { + -- diagnostics + [''] = { + e = { vim.diagnostic.open_float, 'diag float' }, + q = { vim.diagnostic.setloclist, 'diag locations' }, + }, + ['[d'] = { vim.diagnostic.goto_prev, 'prev diag' }, + [']d'] = { vim.diagnostic.goto_next, 'next diag' }, + + -- source ['s'] = { name = '+source', v = { function() dofile(env.MYVIMRC) end, 'Vimrc' }, ['%'] = { 'source %', 'Current File' }, }, + -- document missing builtins ['g'] = { t = 'Next tab', -- cgit v1.2.3