From 79989e13aff7dc6001429f87ca55ba7ae62dfb9a Mon Sep 17 00:00:00 2001 From: bain Date: Sat, 28 Oct 2023 14:46:33 +0200 Subject: [PATCH] update nvim config --- nvim/.config/nvim/init.lua | 16 ++++++++++++++++ nvim/.config/nvim/lazy-lock.json | 1 + 2 files changed, 17 insertions(+) diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 9312056..4616458 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -82,6 +82,8 @@ require("lazy").setup({ -- to learn the available actions lsp.default_keymaps({ buffer = bufnr }) vim.keymap.set('n', 'gr', 'Telescope lsp_references', { buffer = true }) + vim.keymap.set('n', 'la', 'lua vim.lsp.buf.code_action()', { buffer = true }) + vim.keymap.set('n', 'lr', 'lua vim.lsp.buf.rename()', { buffer = true }) vim.keymap.set('x', 'f', 'lua vim.lsp.buf.format({async = true})', { buffer = true }) end) @@ -207,6 +209,15 @@ require("lazy").setup({ 'jamessan/vim-gnupg', -- ft = { ".gpg", ".pgp", ".asc" }, }, + { + 'andweeb/presence.nvim', + event = 'User EnablePresence', + config = function () + require("presence").setup({ + main_image = "file" + }) + end, + } }) -- }}} -- {{{ Keymap @@ -258,6 +269,7 @@ vim.opt.swapfile = false vim.opt.backup = false vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir" vim.opt.undofile = true +vim.opt.writebackup = false vim.opt.termguicolors = true @@ -280,3 +292,7 @@ vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, { vim.cmd([[match ErrorMsg '\s\+$']]) end }) + +vim.api.nvim_create_user_command("Presence", function () + vim.api.nvim_exec_autocmds("User", { pattern = "EnablePresence" }) +end, {}) diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index a6675ae..02d69c8 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -13,6 +13,7 @@ "nvim-treesitter": { "branch": "master", "commit": "d94e1ad9575cc211b5726f09b28ca9454aba22fe" }, "nvim-web-devicons": { "branch": "master", "commit": "cfc8824cc1db316a276b36517f093baccb8e799a" }, "plenary.nvim": { "branch": "master", "commit": "0dbe561ae023f02c2fb772b879e905055b939ce3" }, + "presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" }, "telescope.nvim": { "branch": "master", "commit": "776b509f80dd49d8205b9b0d94485568236d1192" }, "tokyodark.nvim": { "branch": "master", "commit": "4bfb42924274abc5de9f5f4779075b77c6112c85" }, "vim-fugitive": { "branch": "master", "commit": "572c8510123cbde02e8a1dafcd376c98e1e13f43" },