if not vim.g.vscode then return {} end local enabled = { "flit.nvim", "lazy.nvim", "leap.nvim", "mini.ai", "mini.comment", "mini.pairs", "mini.surround", "nvim-treesitter", "nvim-treesitter-textobjects", "nvim-ts-context-commentstring", "vim-repeat", } local Config = require("lazy.core.config") local Plugin = require("lazy.core.plugin") Config.options.checker.enabled = false Config.options.change_detection.enabled = false local update_state = Plugin.update_state ---@diagnostic disable-next-line: duplicate-set-field Plugin.update_state = function() -- Config.spec.disabled = {} for name, plugin in pairs(Config.plugins) do if not (vim.tbl_contains(enabled, plugin.name) or plugin.vscode) then Config.plugins[name] = nil end end for _, plugin in pairs(Config.plugins) do if plugin.dependencies then plugin.dependencies = vim.tbl_filter(function(dep) return Config.plugins[dep] end, plugin.dependencies) end end update_state() Config.to_clean = {} end local map = vim.keymap.set map("n", "", "Find") map("n", "/", [[call VSCodeNotify('workbench.action.findInFiles')]]) map("n", "ss", [[call VSCodeNotify('workbench.action.gotoSymbol')]]) map("n", "", "h", { desc = "Go to left window", remap = true }) map("n", "", "j", { desc = "Go to lower window", remap = true }) map("n", "", "k", { desc = "Go to upper window", remap = true }) map("n", "", "l", { desc = "Go to right window", remap = true }) map("n", "wd", "c", { desc = "Delete window", remap = true }) map("n", "-", "s", { desc = "Split window below", remap = true }) map("n", "|", "v", { desc = "Split window right", remap = true }) return { { "nvim-treesitter/nvim-treesitter", opts = { highlight = { enable = false } }, }, }