diff --git a/README.md b/README.md index 479db38..431d5d2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # configs -This repository contains most of the configs I use on my systems, this is all for Linux -systems, be it servers or workstations. To install it, just run the desktop/server script as the -target user, some stuff will need to run as root. +This repository contains most of the configs I use on my systems, this is all +for Linux systems, be it servers or workstations. To install it, just run the +desktop/server script as the target user, some stuff will need to run as root. # Dependencies - vim @@ -14,9 +14,10 @@ target user, some stuff will need to run as root. - lsd (workstations) - nodejs (nvim language server) + # Mirrored The origin of this repository is [git.cscherr.de](https://git.cscherr.de/PlexSheep/configs.git) It is mirrored to: -- [github](https://github.com/PlexSheep/configs) -- [codeberg](https://codeberg.org/PlexSheep/configs) \ No newline at end of file +- [GitHub](https://github.com/PlexSheep/configs) +- [Codeberg](https://codeberg.org/PlexSheep/configs) diff --git a/home/.config/nvim/autopairs.vim b/home/.config/nvim/autopairs.vim index a3cf6c5..fd0cda6 100644 --- a/home/.config/nvim/autopairs.vim +++ b/home/.config/nvim/autopairs.vim @@ -10,6 +10,31 @@ inoremap coc#pum#visible() ? coc#pum#confirm() : lua << EOF require("nvim-autopairs").setup {} local Rule = require('nvim-autopairs.rule') +local remap = vim.api.nvim_set_keymap 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' , '','v:lua.MUtils.completion_confirm()', {expr = true , noremap = true}) + EOF diff --git a/home/.config/nvim/nvim-tree.vim b/home/.config/nvim/nvim-tree.vim index d49fb59..6083ee6 100644 --- a/home/.config/nvim/nvim-tree.vim +++ b/home/.config/nvim/nvim-tree.vim @@ -21,7 +21,7 @@ local function my_on_attach(bufnr) -- however, through magic, the default keys are loaded anyways ONLY IN WSL -- I have made a separate branch (wsl) for any such things -- just use a proper Linux, if possible - --api.config.mappings.default_on_attach(bufnr) + api.config.mappings.default_on_attach(bufnr) -- custom mappings -- cd