-- HELPERS ---------------------------------------------------- local cmd = vim.cmd -- to execute Vim commands e.g. cmd('pwd') local fn = vim.fn -- to call Vim functions e.g. fn.bufnr() local g = vim.g -- a table to access global variables local keymap = vim.keymap -- keymap local scopes = {o = vim.o, b = vim.bo, w = vim.wo} g.mapleader = ';' keymap.set('n', 'sw', '') keymap.set('n', 'sww', 'k') keymap.set('n', 'sws', 'j') keymap.set('n', 'swa', 'h') keymap.set('n', 'swd', 'l') keymap.set('n', 'aa', 'gT') keymap.set('n', 'dd', 'gt') keymap.set('n', '', ':%!jq .') keymap.set('n', 'sg', ':lua vim.diagnostic.open_float(0, {scope="line"})')