From 3612557cb114df0808592ac0c431e4e4ad20974d Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Tue, 30 Jan 2024 05:37:20 +0545 Subject: [PATCH] fix(nvim): delete py-requirements extra from the lazvim extras spec table --- config/nvim/lazy-lock.json | 6 ++-- config/nvim/lazyvim.json | 4 +-- .../plugins/extras/editor/py-requirements.lua | 24 ------------- .../plugins/extras/lang/python-extended.lua | 25 +++++++++++++ .../nvim/lua/plugins/extras/util/vscode.lua | 36 ++++++++++--------- 5 files changed, 50 insertions(+), 45 deletions(-) delete mode 100644 config/nvim/lua/plugins/extras/editor/py-requirements.lua diff --git a/config/nvim/lazy-lock.json b/config/nvim/lazy-lock.json index 9b400511..f9e38281 100644 --- a/config/nvim/lazy-lock.json +++ b/config/nvim/lazy-lock.json @@ -45,7 +45,7 @@ "import-cost.nvim": { "branch": "main", "commit": "39ef36f438574db0b26e9c957316eb1cb22e970f" }, "inc-rename.nvim": { "branch": "main", "commit": "6f9b5f9cb237e12935144cdc535322b8c93c1b25" }, "indent-blankline.nvim": { "branch": "master", "commit": "12e92044d313c54c438bd786d11684c88f6f78cd" }, - "kitty-scrollback.nvim": { "branch": "main", "commit": "f5fb79107d9fb6eae145bb1a692121965d818270" }, + "kitty-scrollback.nvim": { "branch": "main", "commit": "bb5332b8ec0763b9e611f8cabf4165ed8c3893f5" }, "lazy.nvim": { "branch": "main", "commit": "28126922c9b54e35a192ac415788f202c3944c9f" }, "live-server.nvim": { "branch": "main", "commit": "f6f00a3f541251f0320910bb0d03c4ae14ee6d10" }, "lsp-lens.nvim": { "branch": "main", "commit": "48bb1a7e271424c15f3d588d54adc9b7c319d977" }, @@ -99,7 +99,7 @@ "nvim-regexplainer": { "branch": "main", "commit": "78fff711edcb986a05a03253c28a90e32c4ce31f" }, "nvim-scissors": { "branch": "main", "commit": "6f928de59253c270d7f6b58bb49c9322cebfcdbe" }, "nvim-spectre": { "branch": "master", "commit": "d958cc3ea8b3fb2f0922dff6177630a40751a3a9" }, - "nvim-treesitter": { "branch": "master", "commit": "4ea1a4ffa841acd8f1d51a7003f0cc9596ad8b64" }, + "nvim-treesitter": { "branch": "master", "commit": "e24dab6696aa2a6682a117e241adc32c38e93d53" }, "nvim-treesitter-context": { "branch": "master", "commit": "9c06b115abc57c99cf0aa81dc29490f5001f57a1" }, "nvim-treesitter-endwise": { "branch": "master", "commit": "4c344ffc8d54d7e1ba2cefaaa2c10ea93aa1cc2d" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "19a91a38b02c1c28c14e0ba468d20ae1423c39b2" }, @@ -120,7 +120,7 @@ "plenary.nvim": { "branch": "master", "commit": "663246936325062427597964d81d30eaa42ab1e4" }, "presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" }, "promise-async": { "branch": "main", "commit": "94f6f03c6c1e2aab551aacdf0c1e597a7269abb6" }, - "py-requirements.nvim": { "branch": "main", "commit": "826f21563d63123cfb068e39b74ed73b6aa3256c" }, + "py-requirements.nvim": { "branch": "main", "commit": "1ee4f12fdbf336cfefa92659ecf9d87adbe0b026" }, "rainbow-delimiters.nvim": { "branch": "master", "commit": "c84eeb689e4cc86808e823c11eac4239c75292ce" }, "refactoring.nvim": { "branch": "master", "commit": "aff2e21e2f1a19d302adceb4e7d0fafbb3ae59a9" }, "rest.nvim": { "branch": "main", "commit": "2d7bd3d398940ce2692941e6cd052c072207b9f9" }, diff --git a/config/nvim/lazyvim.json b/config/nvim/lazyvim.json index 51be1f7b..b0eb3374 100644 --- a/config/nvim/lazyvim.json +++ b/config/nvim/lazyvim.json @@ -41,7 +41,6 @@ "plugins.extras.editor.oil", "plugins.extras.editor.outline", "plugins.extras.editor.package-info", - "plugins.extras.editor.py-requirements", "plugins.extras.editor.regex", "plugins.extras.editor.rest-client", "plugins.extras.editor.search-replace", @@ -108,4 +107,5 @@ "NEWS.md": "2123" }, "version": 2 -} \ No newline at end of file +} + diff --git a/config/nvim/lua/plugins/extras/editor/py-requirements.lua b/config/nvim/lua/plugins/extras/editor/py-requirements.lua deleted file mode 100644 index 958fde6b..00000000 --- a/config/nvim/lua/plugins/extras/editor/py-requirements.lua +++ /dev/null @@ -1,24 +0,0 @@ -return { - "MeanderingProgrammer/py-requirements.nvim", - event = { - "BufRead requirements.txt", - }, - dependencies = { - { "nvim-lua/plenary.nvim" }, - { - "hrsh7th/nvim-cmp", - dependencies = {}, - opts = function(_, opts) - table.insert(opts.sources, { name = "py-requirements" }) - end, - }, - }, - opts = function() - require("py-requirements").setup({}) - require("nvim-treesitter.configs").setup({ - ensure_installed = { - "requirements", - }, - }) - end, -} diff --git a/config/nvim/lua/plugins/extras/lang/python-extended.lua b/config/nvim/lua/plugins/extras/lang/python-extended.lua index f275bb78..2cdf1fd8 100644 --- a/config/nvim/lua/plugins/extras/lang/python-extended.lua +++ b/config/nvim/lua/plugins/extras/lang/python-extended.lua @@ -8,6 +8,31 @@ return { return opts end, }, + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "requirements" }) + end + end, + }, + { + "MeanderingProgrammer/py-requirements.nvim", + event = { + "BufRead requirements.txt", + }, + dependencies = { + { "nvim-lua/plenary.nvim" }, + { + "hrsh7th/nvim-cmp", + dependencies = {}, + opts = function(_, opts) + table.insert(opts.sources, { name = "py-requirements" }) + end, + }, + }, + opts = {}, + }, { "luckasRanarison/nvim-devdocs", optional = true, diff --git a/config/nvim/lua/plugins/extras/util/vscode.lua b/config/nvim/lua/plugins/extras/util/vscode.lua index e8c6f3be..d288085f 100644 --- a/config/nvim/lua/plugins/extras/util/vscode.lua +++ b/config/nvim/lua/plugins/extras/util/vscode.lua @@ -65,11 +65,22 @@ vim.api.nvim_create_autocmd("User", { map("n", "fts", vscode_action("workbench.action.terminal.newWithCwd")) -- working with editors (buffers) map("n", "bo", vscode_action("workbench.action.closeOtherEditors")) + map("n", "bb", function() + vscode_action("workbench.action.quickOpenPreviousRecentlyUsedEditorInGroup") + vscode_action("list.select") + end) + map("n", "bn", vscode_action("workbench.action.nextEditor")) + map("n", "bu", vscode_action("workbench.action.reopenClosedEditor")) + map("n", "bh", vscode_action("workbench.action.moveEditorToLeftGroup")) + map("n", "bj", vscode_action("workbench.action.moveEditorToBelowGroup")) + map("n", "bk", vscode_action("workbench.action.moveEditorToAboveGroup")) + map("n", "bl", vscode_action("workbench.action.moveEditorToRightGroup")) + map("n", ",", vscode_action("workbench.action.showAllEditors")) map("n", "bA", vscode_action("workbench.action.closeAllEditors")) map("n", "ba", vscode_action("workbench.action.lastEditorInGroup")) map("n", "bf", vscode_action("workbench.action.firstEditorInGroup")) - map("n", "bl", vscode_action("workbench.action.closeEditorsToTheLeft")) - map("n", "br", vscode_action("workbench.action.closeEditorsToTheRight")) + map("n", "bL", vscode_action("workbench.action.closeEditorsToTheLeft")) + map("n", "bR", vscode_action("workbench.action.closeEditorsToTheRight")) map("n", "H", vscode_action("workbench.action.previousEditorInGroup")) map("n", "L", vscode_action("workbench.action.nextEditorInGroup")) map("n", "bd", vscode_action("workbench.action.closeActiveEditor")) @@ -87,7 +98,7 @@ vim.api.nvim_create_autocmd("User", { map("n", "gi", vscode_action("editor.action.goToImplementation")) map("n", "K", vscode_action("editor.action.showHover")) map("n", "cr", vscode_action("editor.action.rename")) - map("n", "co", vscode_action("editor.action.organizeImport")) + map("n", "co", vscode_action("editor.action.organizeImports")) map("n", "cf", vscode_action("editor.action.formatDocument")) map("n", "ss", vscode_action("workbench.action.gotoSymbol")) map("n", "sS", vscode_action("workbench.action.showAllSymbols")) @@ -97,11 +108,6 @@ vim.api.nvim_create_autocmd("User", { map("n", "cp", vscode_action("markdown.showPreviewToSide")) -- project manager map("n", "fp", vscode_action("projectManager.listProjects")) - -- zoxide - -- stylua: ignore - map("n", "fz", vscode_action("terminalCommandKeys.run", - { args = { cmd = "cdzc", newTerminal = false, saveAllFiles = false, showTerminal = true, focus = true } } - )) -- zen mode map("n", "z", vscode_action("workbench.action.toggleZenMode")) -- cspell @@ -113,17 +119,15 @@ vim.api.nvim_create_autocmd("User", { map("n", "gg", vscode_action("gitlens.views.home.focus")) map("n", "ub", vscode_action("gitlens.toggleFileBlame")) map("n", "]h", function() - vscode.action("workbench.action.editor.nextChange") - vscode.action("workbench.action.compareEditor.nextChange") + vscode_action("workbench.action.editor.nextChange") + vscode_action("workbench.action.compareEditor.nextChange") end) map("n", "[h", function() - vscode.action("workbench.action.editor.previousChange") - vscode.action("workbench.action.compareEditor.previousChange") + vscode_action("workbench.action.editor.previousChange") + vscode_action("workbench.action.compareEditor.previousChange") end) -- statusline map("n", "uS", vscode_action("workbench.action.toggleStatusbarVisibility")) - -- markdown preview - map("n", "cp", vscode_action("markdown.showPreviewToSide")) -- codeium map("n", "cI", vscode_action("codeium.toggleEnable")) map({ "n", "v" }, "id", vscode_action("codeium.generateFunctionDocstring")) @@ -135,6 +139,8 @@ vim.api.nvim_create_autocmd("User", { -- diagnostics map("n", "]d", vscode_action("editor.action.marker.next")) map("n", "[d", vscode_action("editor.action.marker.prev")) + -- zoxide + map("n", "fz", vscode_action("autojump.openFolder")) -- whichkey map("n", "", vscode_action("whichkey.show")) -- search @@ -143,8 +149,6 @@ vim.api.nvim_create_autocmd("User", { map("n", "/", vscode_action("workbench.action.findInFiles")) map("n", "sg", vscode_action("workbench.action.findInFiles")) map("n", "sc", vscode_action("workbench.action.showCommands")) - -- format - map("n", "cf", vscode_action("editor.action.formatDocument")) -- ui map("n", "uC", vscode_action("workbench.action.selectTheme")) end,