From 6114c6d81e73d26775c18493ef0b8d1924ac2501 Mon Sep 17 00:00:00 2001 From: George A Date: Wed, 10 Nov 2021 09:48:22 +0000 Subject: [PATCH] init.vim --- init.vim | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/init.vim b/init.vim index db3a0e6..13b75f4 100644 --- a/init.vim +++ b/init.vim @@ -66,6 +66,10 @@ set completeopt=menu,menuone,noselect "=========================== Visual Search Text ============================= vnoremap // y/\V=escape(@",'/\') +"================= Decrease time waiting between keypresses ================ +set timeoutlen=800 +"=========================== Oops forgot sudo =============================== +cmap w!! w !sudo tee > /dev/null % "=========================== Set 24 bit colour ============================== let $NVIM_TUI_ENABLE_TRUE_COLOR=1 if (has("termguicolors")) @@ -168,18 +172,12 @@ nnoremap l :BuffergatorMruCycleNext nnoremap h :BuffergatorMruCyclePrev nnoremap gp GitGutterPreviewHunk nnoremap gu GitGutterUndoHunk -nnoremap gs GitGutterStageHunk +"nnoremap gs GitGutterStageHunk nnoremap T T:NERDTree -nnoremap gd :Gdiff :0 +nnoremap gd :Git diff :0 +nnoremap gb :Git blame nnoremap gw :Gw -nnoremap gst :Gst - -" Set language server bindings -"nnoremap j :call LanguageClient#textDocument_hover() -"nnoremap d :call LanguageClient#textDocument_definition() -"nnoremap r :call LanguageClient#textDocument_rename() -"nnoremap a :call LanguageClient#textDocument_codeAction() -"nnoremap e :call LanguageClient#explainErrorAtPoint() +nnoremap gs :Git "================================= LSP ================================== lua <'] = cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'}), [''] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }), [''] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }), [''] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }), @@ -254,7 +253,7 @@ lua <lua vim.lsp.buf.definition()', opts) buf_set_keymap('n', 'K', 'lua vim.lsp.buf.hover()', opts) buf_set_keymap('n', 'gi', 'lua vim.lsp.buf.implementation()', opts) - buf_set_keymap('n', '', 'lua vim.lsp.buf.signature_help()', opts) + -- buf_set_keymap('n', '', 'lua vim.lsp.buf.signature_help()', opts) buf_set_keymap('n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', opts) buf_set_keymap('n', 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', opts) buf_set_keymap('n', 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', opts) @@ -271,7 +270,7 @@ lua <