From 510ab5ec4e2a252866d185449bc404e66ef6b06a Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Wed, 6 Mar 2024 15:52:27 +0100 Subject: [PATCH] important plugins --- .gitignore | 1 + init.lua | 2 ++ lazy-lock.json | 66 ------------------------------------------------- lua/plugins.lua | 65 ++++++++++++++++++++++++++++++++++++++++++++++++ lua/vscode.lua | 23 ----------------- 5 files changed, 68 insertions(+), 89 deletions(-) create mode 100644 .gitignore delete mode 100644 lazy-lock.json create mode 100644 lua/plugins.lua diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e033bc6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +lazy-lock.json diff --git a/init.lua b/init.lua index d86f4f2..fb369e4 100644 --- a/init.lua +++ b/init.lua @@ -184,3 +184,5 @@ load_mappings("movements") load_mappings("edit") load_mappings("tabs") load_mappings("ui") + +require("plugins") diff --git a/lazy-lock.json b/lazy-lock.json deleted file mode 100644 index dcda75f..0000000 --- a/lazy-lock.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, - "LuaSnip": { "branch": "master", "commit": "2dbef19461198630b3d7c39f414d09fb07d1fdd2" }, - "base46": { "branch": "v2.0", "commit": "3f2b658cbd6650ddaf2bae3233e143a41ca25b1a" }, - "better-escape.nvim": { "branch": "master", "commit": "7e86edafb8c7e73699e0320f225464a298b96d12" }, - "ccc.nvim": { "branch": "main", "commit": "ec6e23fd2c0bf4ffcf71c1271acdcee6e2c6f49c" }, - "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, - "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, - "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "conform.nvim": { "branch": "master", "commit": "4588008a7c5b57fbff97fdfb529c059235cdc7ee" }, - "deadcolumn.nvim": { "branch": "master", "commit": "b84cdf2fc94c59651ececd5e4d2a0488b38a7a75" }, - "dressing.nvim": { "branch": "master", "commit": "6f212262061a2120e42da0d1e87326e8a41c0478" }, - "firenvim": { "branch": "master", "commit": "f2dd6d3bcf3309a7dd30c79b3b3c03ab55cea6e2" }, - "flit.nvim": { "branch": "main", "commit": "39e3399ed2cbc328778258ac0d497ece9ed8fe32" }, - "friendly-snippets": { "branch": "main", "commit": "b8fae73a479ae0a1c54f5c98fa687ae8a0addc53" }, - "gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" }, - "goto-preview": { "branch": "main", "commit": "16ec236fabb40b2cebfe283b1d701338886462db" }, - "icon-picker.nvim": { "branch": "master", "commit": "3ee9a0ea9feeef08ae35e40c8be6a2fa2c20f2d3" }, - "incline.nvim": { "branch": "main", "commit": "4d025952ba2e03f723e31c2c0945f75d29b63efd" }, - "indent-blankline.nvim": { "branch": "master", "commit": "b7aa0aed55887edfaece23f7b46ab22232fc8741" }, - "kitty-scrollback.nvim": { "branch": "main", "commit": "bb5332b8ec0763b9e611f8cabf4165ed8c3893f5" }, - "lazy.nvim": { "branch": "main", "commit": "aedcd79811d491b60d0a6577a9c1701063c2a609" }, - "lazygit.nvim": { "branch": "main", "commit": "1e08e3f5ac1152339690140e61a4a32b3bdc7de5" }, - "leap.nvim": { "branch": "main", "commit": "14eda5bb233354933baa99b6d40bef3a40dbeaae" }, - "lsp-inlayhints.nvim": { "branch": "main", "commit": "d981f65c9ae0b6062176f0accb9c151daeda6f16" }, - "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, - "marks.nvim": { "branch": "master", "commit": "74e8d01b2a2131b6e46354cffc553aa7f81bcf5b" }, - "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, - "mini.trailspace": { "branch": "main", "commit": "60d0eca6703b55285e33b0da00105cde50d188df" }, - "neodev.nvim": { "branch": "main", "commit": "0ee95ecefc8ea45898a0383364f736e098c8703f" }, - "noice.nvim": { "branch": "main", "commit": "bf67d70bd7265d075191e7812d8eb42b9791f737" }, - "none-ls.nvim": { "branch": "main", "commit": "912f81829e9ab4ee3d54c3ea5a304c264f0003bc" }, - "nui.nvim": { "branch": "main", "commit": "35da9ca1de0fc4dda96c2e214d93d363c145f418" }, - "nvim-autopairs": { "branch": "master", "commit": "096d0baecc34f6c5d8a6dd25851e9d5ad338209b" }, - "nvim-bqf": { "branch": "main", "commit": "bdc2a4e5bb670b3c0e33ada9c0eec636d93a0748" }, - "nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" }, - "nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" }, - "nvim-dap": { "branch": "master", "commit": "9adbfdca13afbe646d09a8d7a86d5d031fb9c5a5" }, - "nvim-dap-ui": { "branch": "master", "commit": "d845ebd798ad1cf30aa4abd4c4eff795cdcfdd4f" }, - "nvim-dap-virtual-text": { "branch": "master", "commit": "d4542ac257d3c7ee4131350db6179ae6340ce40b" }, - "nvim-lightbulb": { "branch": "master", "commit": "8f00b89dd1b1dbde16872bee5fbcee2e58c9b8e9" }, - "nvim-lspconfig": { "branch": "master", "commit": "1759ea68fbbb1303192020d3e59936189359e0ed" }, - "nvim-notify": { "branch": "master", "commit": "80b67b265530632505193553d05127ae7fe09ddd" }, - "nvim-tree.lua": { "branch": "master", "commit": "f39f7b6fcd3865ac2146de4cb4045286308f2935" }, - "nvim-treesitter": { "branch": "master", "commit": "f197a15b0d1e8d555263af20add51450e5aaa1f0" }, - "nvim-ufo": { "branch": "main", "commit": "b0741a647efd98d9abb6cb653e056d24a07e4581" }, - "nvim-web-devicons": { "branch": "master", "commit": "aaec87dbdaa776bfa0a13c8694bec9bcb7454719" }, - "plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" }, - "promise-async": { "branch": "main", "commit": "94f6f03c6c1e2aab551aacdf0c1e597a7269abb6" }, - "rustaceanvim": { "branch": "master", "commit": "4af9aacd46572e25fca3e6f08706aabc5268a375" }, - "sidebar.nvim": { "branch": "main", "commit": "5695712eef6288fff667343c4ae77c54911bdb1b" }, - "telescope-zoxide": { "branch": "main", "commit": "68966349aa1b8e9ade403e18479ecf79447389a7" }, - "telescope.nvim": { "branch": "master", "commit": "e54fbf4ab2b64640b639b75c006c23b4bc51c86f" }, - "todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" }, - "toggleterm.nvim": { "branch": "main", "commit": "b49df5cdce67a8964d1b027dae94bde212092b51" }, - "treesj": { "branch": "main", "commit": "14808da3cddd62fc86ede53a5ea1fd1635897e75" }, - "trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" }, - "ui": { "branch": "v2.0", "commit": "1737a2a98e18b635480756e817564b60ff31fc53" }, - "vim-cursorword": { "branch": "master", "commit": "371fdd7fa8817c28aa09d181cfcfa3c7ca29bf56" }, - "vim-eunuch": { "branch": "master", "commit": "084946fb1c8103ae0cb7342e9be3a2c69374958c" }, - "vim-illuminate": { "branch": "master", "commit": "97c1265ff0b67064b6cfdc15bafc50202a537ae2" }, - "vim-table-mode": { "branch": "master", "commit": "4ff8de2ac93431ee6d85a9e04177012752e6abdc" }, - "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } -} \ No newline at end of file diff --git a/lua/plugins.lua b/lua/plugins.lua new file mode 100644 index 0000000..c99e8e9 --- /dev/null +++ b/lua/plugins.lua @@ -0,0 +1,65 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.loop.fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) + +-- Example using a list of specs with the default options +vim.g.mapleader = " " -- Make sure to set `mapleader` before lazy so your mappings are correct + +require("lazy").setup({ + { + "mhartington/oceanic-next", + config = function() + vim.cmd("syntax enable") + vim.cmd("colorscheme OceanicNext") + end, + }, + { + "ggandor/leap.nvim", + lazy = false, + }, + { + "ggandor/flit.nvim", + lazy = false, + config = function() + require("flit").setup({ + keys = { f = "f", F = "F", t = "t", T = "T" }, + -- A string like "nv", "nvo", "o", etc. + labeled_modes = "v", + multiline = true, + -- Like `leap`s similar argument (call-specific overrides). + -- E.g.: opts = { equivalence_classes = {} } + opts = {}, + }) + end, + }, + { + "echasnovski/mini.trailspace", + lazy = false, + event = { "BufReadPost", "BufNewFile" }, + opts = {}, + }, + { + -- exit insert mode with 'jk' + "max397574/better-escape.nvim", + enabled = true, + event = "InsertEnter", + config = function() + require("better_escape").setup() + end, + }, + { + "dhruvasagar/vim-table-mode", + lazy = false, + -- tm is automatically set for toggle + -- see t menu + }, +}) diff --git a/lua/vscode.lua b/lua/vscode.lua index 74f11ba..e69de29 100644 --- a/lua/vscode.lua +++ b/lua/vscode.lua @@ -1,23 +0,0 @@ -vim.api.nvim_exec([[ - " THEME CHANGER - function! SetCursorLineNrColorInsert(mode) - " Insert mode: blue - if a:mode == "i" - call VSCodeNotify('nvim-theme.insert') - - " Replace mode: red - elseif a:mode == "r" - call VSCodeNotify('nvim-theme.replace') - endif - endfunction - - augroup CursorLineNrColorSwap - autocmd! - autocmd ModeChanged *:[vV\x16]* call VSCodeNotify('nvim-theme.visual') - autocmd ModeChanged *:[R]* call VSCodeNotify('nvim-theme.replace') - autocmd InsertEnter * call SetCursorLineNrColorInsert(v:insertmode) - autocmd InsertLeave * call VSCodeNotify('nvim-theme.normal') - autocmd CursorHold * call VSCodeNotify('nvim-theme.normal') - autocmd ModeChanged [vV\x16]*:* call VSCodeNotify('nvim-theme.normal') - augroup END -]], false)