Merge pull request 'master' (#2) from PlexSheep/configs:master into master
Reviewed-on: cscherrNT/configs#2
This commit is contained in:
commit
3baeb502a3
11
README.md
11
README.md
|
@ -1,8 +1,8 @@
|
||||||
# configs
|
# configs
|
||||||
|
|
||||||
This repository contains most of the configs I use on my systems, this is all for Linux
|
This repository contains most of the configs I use on my systems, this is all
|
||||||
systems, be it servers or workstations. To install it, just run the desktop/server script as the
|
for Linux systems, be it servers or workstations. To install it, just run the
|
||||||
target user, some stuff will need to run as root.
|
desktop/server script as the target user, some stuff will need to run as root.
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
- vim
|
- vim
|
||||||
|
@ -14,9 +14,10 @@ target user, some stuff will need to run as root.
|
||||||
- lsd (workstations)
|
- lsd (workstations)
|
||||||
- nodejs (nvim language server)
|
- nodejs (nvim language server)
|
||||||
|
|
||||||
|
|
||||||
# Mirrored
|
# Mirrored
|
||||||
The origin of this repository is [git.cscherr.de](https://git.cscherr.de/PlexSheep/configs.git)
|
The origin of this repository is [git.cscherr.de](https://git.cscherr.de/PlexSheep/configs.git)
|
||||||
|
|
||||||
It is mirrored to:
|
It is mirrored to:
|
||||||
- [github](https://github.com/PlexSheep/configs)
|
- [GitHub](https://github.com/PlexSheep/configs)
|
||||||
- [codeberg](https://codeberg.org/PlexSheep/configs)
|
- [Codeberg](https://codeberg.org/PlexSheep/configs)
|
||||||
|
|
|
@ -10,6 +10,31 @@ inoremap <silent><expr> <cr> coc#pum#visible() ? coc#pum#confirm() :
|
||||||
lua << EOF
|
lua << EOF
|
||||||
require("nvim-autopairs").setup {}
|
require("nvim-autopairs").setup {}
|
||||||
local Rule = require('nvim-autopairs.rule')
|
local Rule = require('nvim-autopairs.rule')
|
||||||
|
local remap = vim.api.nvim_set_keymap
|
||||||
local npairs = require('nvim-autopairs')
|
local npairs = require('nvim-autopairs')
|
||||||
npairs.add_rule(Rule("<>","<>","rs"))
|
npairs.setup({map_cr=false})
|
||||||
|
|
||||||
|
-- skip it, if you use another global object
|
||||||
|
_G.MUtils= {}
|
||||||
|
|
||||||
|
-- old version
|
||||||
|
-- MUtils.completion_confirm=function()
|
||||||
|
-- if vim.fn["coc#pum#visible"]() ~= 0 then
|
||||||
|
-- return vim.fn["coc#_select_confirm"]()
|
||||||
|
-- else
|
||||||
|
-- return npairs.autopairs_cr()
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
|
||||||
|
-- new version for custom pum
|
||||||
|
MUtils.completion_confirm=function()
|
||||||
|
if vim.fn["coc#pum#visible"]() ~= 0 then
|
||||||
|
return vim.fn["coc#pum#confirm"]()
|
||||||
|
else
|
||||||
|
return npairs.autopairs_cr()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
remap('i' , '<CR>','v:lua.MUtils.completion_confirm()', {expr = true , noremap = true})
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -21,7 +21,7 @@ local function my_on_attach(bufnr)
|
||||||
-- however, through magic, the default keys are loaded anyways ONLY IN WSL
|
-- however, through magic, the default keys are loaded anyways ONLY IN WSL
|
||||||
-- I have made a separate branch (wsl) for any such things
|
-- I have made a separate branch (wsl) for any such things
|
||||||
-- just use a proper Linux, if possible
|
-- just use a proper Linux, if possible
|
||||||
--api.config.mappings.default_on_attach(bufnr)
|
api.config.mappings.default_on_attach(bufnr)
|
||||||
|
|
||||||
-- custom mappings
|
-- custom mappings
|
||||||
-- cd
|
-- cd
|
||||||
|
|
Loading…
Reference in New Issue