From 889ba2593954e8d61c9ff4f52b02e7a0bfef9e35 Mon Sep 17 00:00:00 2001 From: Peter Stuifzand Date: Mon, 26 Feb 2024 21:18:26 +0100 Subject: [PATCH] My changes --- init.lua | 16 ++++++++++++++++ lazy-lock.json | 14 +++++++++----- lua/custom/plugins/copilot.lua | 8 ++++---- lua/custom/plugins/fugitive.lua | 3 +++ lua/custom/plugins/lazygit.lua | 8 ++++++++ lua/custom/plugins/magento2-ls.lua | 6 ++++++ lua/custom/plugins/nvim-http.lua | 3 +++ 7 files changed, 49 insertions(+), 9 deletions(-) create mode 100644 lua/custom/plugins/fugitive.lua create mode 100644 lua/custom/plugins/lazygit.lua create mode 100644 lua/custom/plugins/magento2-ls.lua create mode 100644 lua/custom/plugins/nvim-http.lua diff --git a/init.lua b/init.lua index 787a12e3..80cb33c6 100644 --- a/init.lua +++ b/init.lua @@ -738,6 +738,15 @@ require('lazy').setup({ auto_install = true, highlight = { enable = true }, indent = { enable = true }, + incremental_selection = { + enable = true, + keymaps = { + init_selection = 'gnn', + node_incremental = 'grn', + scope_incremental = 'grc', + node_decremental = 'grm', + }, + }, } -- There are additional nvim-treesitter modules that you can use to interact @@ -769,5 +778,12 @@ require('lazy').setup({ { import = 'custom.plugins' }, }, {}) +local git_group = vim.api.nvim_create_augroup('Git', { clear = true }) +vim.api.nvim_create_autocmd({ 'BufNewFile', 'BufRead' }, { + command = "0r!git rev-parse --symbolic-full-name --abbrev-ref HEAD | tr '[:lower:]' '[:upper:]' | egrep -o \"^[A-Z][A-Z0-9]+-[0-9]+\"", + group = git_group, + pattern = vim.fn.expand 'COMMIT_EDITMSG', +}) + -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et diff --git a/lazy-lock.json b/lazy-lock.json index e127a43c..accf5098 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -6,23 +6,26 @@ "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "conform.nvim": { "branch": "master", "commit": "192a6d2ddace343f1840a8f72efe2315bd392243" }, + "copilot.vim": { "branch": "release", "commit": "1a284014d2e0baf367706a94b2a9ee5fd56fd457" }, "fidget.nvim": { "branch": "main", "commit": "60404ba67044c6ab01894dd5bf77bd64ea5e09aa" }, "friendly-snippets": { "branch": "main", "commit": "dbd45e9ba76d535e4cba88afa1b7aa43bb765336" }, "gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" }, "lazy.nvim": { "branch": "main", "commit": "aedcd79811d491b60d0a6577a9c1701063c2a609" }, - "llm.nvim": { "branch": "main", "commit": "51b76dac9c33c0122adfe28daf52ceaa31c4aa02" }, + "lazygit.nvim": { "branch": "main", "commit": "10a5f30536dc2d4abe36d410d83149272ea457fa" }, + "magento2-ls": { "branch": "master", "commit": "9cb52e026e9036323ac276f648902e4d82df358c" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "21d33d69a81f6351e5a5f49078b2e4f0075c8e73" }, "mason-null-ls.nvim": { "branch": "main", "commit": "bfaa24b899233385c92364f95856e6280bddef30" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "1212fb6082b7177dde17ea65e429e027835aeb40" }, "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, "mini.nvim": { "branch": "main", "commit": "0bc73241cd9c686d80ab28f4af2c04e626fb2304" }, - "neodev.nvim": { "branch": "main", "commit": "b0ccf605c952eb0d1efe3692d5b241c52ceee187" }, + "neodev.nvim": { "branch": "main", "commit": "f7f249b361e9fb245eea24cbcd9f5502e796c6ea" }, "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" }, - "nvim-lspconfig": { "branch": "master", "commit": "6b9f4bbe0aa1f351fd4845dc5fd4f3450b010f88" }, - "nvim-treesitter": { "branch": "master", "commit": "19bf991be2403c10fa379fa0fb11b7de2560ac31" }, + "nvim-http": { "branch": "main", "commit": "11de61bcdf01f4728dd8d8bbcd48901d220c28cc" }, + "nvim-lspconfig": { "branch": "master", "commit": "d5b6d4366dfd7a1071b930defd365e6d0be258de" }, + "nvim-treesitter": { "branch": "master", "commit": "f148c8a76638cb6b6a6818924f647534f4eef301" }, "nvim-web-devicons": { "branch": "master", "commit": "14ac5887110b06b89a96881d534230dac3ed134d" }, - "oil.nvim": { "branch": "master", "commit": "6953c2c17d8ae7454b28c44c8767eebede312e6f" }, + "oil.nvim": { "branch": "master", "commit": "132b4ea0740c417b9d717411cab4cf187e1fd095" }, "op.nvim": { "branch": "master", "commit": "385a84307d996864a30e52bcfcf74bc6d942f515" }, "playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" }, "plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" }, @@ -33,6 +36,7 @@ "tokyonight.nvim": { "branch": "main", "commit": "610179f7f12db3d08540b6cc61434db2eaecbcff" }, "trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" }, "vim-eunuch": { "branch": "master", "commit": "8fb3904be27b6b60d086f87c2570085902414069" }, + "vim-fugitive": { "branch": "master", "commit": "f116dcc8e21021e6fbfb6b0a9f8f7b9566d933f4" }, "vim-go": { "branch": "master", "commit": "0e975560df38be387cca1d7d33df7a4744091303" }, "vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }, "vim-unimpaired": { "branch": "master", "commit": "6d44a6dc2ec34607c41ec78acf81657248580bf1" }, diff --git a/lua/custom/plugins/copilot.lua b/lua/custom/plugins/copilot.lua index 123b3cfe..e6ddbb6d 100644 --- a/lua/custom/plugins/copilot.lua +++ b/lua/custom/plugins/copilot.lua @@ -1,6 +1,6 @@ return { - -- 'github/copilot.vim', - -- config = function () - -- vim.g.copilot_assume_mapped = true - -- end + 'github/copilot.vim', + config = function() + vim.g.copilot_assume_mapped = true + end, } diff --git a/lua/custom/plugins/fugitive.lua b/lua/custom/plugins/fugitive.lua new file mode 100644 index 00000000..b6b4c97b --- /dev/null +++ b/lua/custom/plugins/fugitive.lua @@ -0,0 +1,3 @@ +return { + 'tpope/vim-fugitive', +} diff --git a/lua/custom/plugins/lazygit.lua b/lua/custom/plugins/lazygit.lua new file mode 100644 index 00000000..7e8545d8 --- /dev/null +++ b/lua/custom/plugins/lazygit.lua @@ -0,0 +1,8 @@ +return { + 'kdheepak/lazygit.nvim', + enable = false, + -- optional for floating window border decoration + dependencies = { + 'nvim-lua/plenary.nvim', + }, +} diff --git a/lua/custom/plugins/magento2-ls.lua b/lua/custom/plugins/magento2-ls.lua new file mode 100644 index 00000000..98848634 --- /dev/null +++ b/lua/custom/plugins/magento2-ls.lua @@ -0,0 +1,6 @@ +return { + 'pbogut/magento2-ls', + build = function() + require('magento2_ls').get_server() + end, +} diff --git a/lua/custom/plugins/nvim-http.lua b/lua/custom/plugins/nvim-http.lua new file mode 100644 index 00000000..78e8c409 --- /dev/null +++ b/lua/custom/plugins/nvim-http.lua @@ -0,0 +1,3 @@ +return { + 'BlackLight/nvim-http', +}