Merge pull request 'master' (#6) from cscherrNT/configs:master into master

Reviewed-on: #6
This commit is contained in:
Christoph J. Scherr 2023-07-14 19:45:19 +02:00
commit 8b611fce5c
5 changed files with 30 additions and 1 deletions

View File

@ -0,0 +1,15 @@
" off with <A-p>
nmap <A-p> :lua require('nvim-autopairs').disable()<CR>
" on with <A-P>
nmap <A-P> :lua require('nvim-autopairs').enable()<CR>
" fix <CR> being not usable to select a completion item
inoremap <silent><expr> <cr> coc#pum#visible() ? coc#pum#confirm() :
\ "\<C-g>u\<c-r>=v:lua.require'nvim-autopairs'.autopairs_cr()\<CR>"
lua << EOF
require("nvim-autopairs").setup {}
local Rule = require('nvim-autopairs.rule')
local npairs = require('nvim-autopairs')
npairs.add_rule(Rule("<>","<>","rs"))
EOF

View File

@ -60,6 +60,7 @@ nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
nmap <silent> gt :CocCommand fzf-preview.CocOutline<CR>
" Use leader + K to show documentation in preview window
nnoremap <silent><leader> K :call ShowDocumentation()<CR>

View File

@ -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

View File

@ -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

View File

@ -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