diff --git a/home/.config/nvim/autopairs.vim b/home/.config/nvim/autopairs.vim new file mode 100644 index 0000000..a3cf6c5 --- /dev/null +++ b/home/.config/nvim/autopairs.vim @@ -0,0 +1,15 @@ +" off with +nmap :lua require('nvim-autopairs').disable() +" on with +nmap :lua require('nvim-autopairs').enable() + +" fix being not usable to select a completion item +inoremap coc#pum#visible() ? coc#pum#confirm() : + \ "\u\=v:lua.require'nvim-autopairs'.autopairs_cr()\" + +lua << EOF +require("nvim-autopairs").setup {} +local Rule = require('nvim-autopairs.rule') +local npairs = require('nvim-autopairs') +npairs.add_rule(Rule("<>","<>","rs")) +EOF diff --git a/home/.config/nvim/coc.vim b/home/.config/nvim/coc.vim index 9678931..a8f022f 100644 --- a/home/.config/nvim/coc.vim +++ b/home/.config/nvim/coc.vim @@ -60,6 +60,7 @@ nmap gd (coc-definition) nmap gy (coc-type-definition) nmap gi (coc-implementation) nmap gr (coc-references) +nmap gt :CocCommand fzf-preview.CocOutline " Use leader + K to show documentation in preview window nnoremap K :call ShowDocumentation() diff --git a/home/.config/nvim/init.vim b/home/.config/nvim/init.vim index 2c06fe4..054ad8d 100644 --- a/home/.config/nvim/init.vim +++ b/home/.config/nvim/init.vim @@ -19,7 +19,9 @@ if vim.g.started_by_firenvim == true then vim.cmd('runtime common.vim') else vim.cmd('runtime common.vim') + vim.cmd('runtime plugs.vim') vim.cmd('runtime main.vim') + vim.cmd('runtime autopairs.vim') end if os.name() == "Windows" then diff --git a/home/.config/nvim/plugs.vim b/home/.config/nvim/plugs.vim index f44743e..ce691fd 100644 --- a/home/.config/nvim/plugs.vim +++ b/home/.config/nvim/plugs.vim @@ -1,7 +1,7 @@ call plug#begin() Plug 'glacambre/firenvim', { 'do': { _ -> firenvim#install(0) } } -Plug 'jiangmiao/auto-pairs' +Plug 'windwp/nvim-autopairs' Plug 'mhinz/vim-startify' Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'psliwka/vim-smoothie' " scorll with STRG + d or STRG + u diff --git a/home/.config/nvim/utils.lua b/home/.config/nvim/utils.lua new file mode 100644 index 0000000..2ba735e --- /dev/null +++ b/home/.config/nvim/utils.lua @@ -0,0 +1,11 @@ +local utils = {} + +function M.map(mode, lhs, rhs, opts) + local options = { noremap = true } + if opts then + options = vim.tbl_extend("force", options, opts) + end + vim.api.nvim_set_keymap(mode, lhs, rhs, options) +end + +return utils diff --git a/home/.gitconfig b/home/.gitconfig index 50fcf7a..2039469 100644 --- a/home/.gitconfig +++ b/home/.gitconfig @@ -1,7 +1,7 @@ [user] - email = Christoph.Scherr@newtec.de - name = Christoph J. Scherr - signingkey = Christoph.Scherr@newtec.de + email = software@cscherr.de + name = PlexSheep + signingkey = software@cscherr.de [credential] helper = store --file ~/.git-credentials [commit]