From 2bbaaff483c0ce7c5ff736ee47cfca3bfba10315 Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Wed, 27 Mar 2024 21:01:29 -0400 Subject: [PATCH] added vscode support --- lua/plugins/vscode.lua | 49 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 lua/plugins/vscode.lua diff --git a/lua/plugins/vscode.lua b/lua/plugins/vscode.lua new file mode 100644 index 0000000..32f6e20 --- /dev/null +++ b/lua/plugins/vscode.lua @@ -0,0 +1,49 @@ +-- don't do anything in non-vscode instances +if not vim.g.vscode then return {} end + +-- a list of known working plugins with vscode-neovim, update with your own plugins +local plugins = { + "lazy.nvim", + "AstroNvim", + "astrocore", + "astroui", + "Comment.nvim", + "nvim-autopairs", + "nvim-treesitter", + "nvim-ts-autotag", + "nvim-treesitter-textobjects", + "nvim-ts-context-commentstring", + "nvim-surround", +} + +local Config = require "lazy.core.config" +-- disable plugin update checking +Config.options.checker.enabled = false +Config.options.change_detection.enabled = false +-- replace the default `cond` +Config.options.defaults.cond = function(plugin) return vim.tbl_contains(plugins, plugin.name) end + +---@type LazySpec +return { + -- add a few keybindings + { + "AstroNvim/astrocore", + ---@type AstroCoreOpts + opts = { + mappings = { + n = { + ["ff"] = "Find", + ["fw"] = "call VSCodeNotify('workbench.action.findInFiles')", + ["ls"] = "call VSCodeNotify('workbench.action.gotoSymbol')", + }, + }, + }, + }, + -- disable colorscheme setting + { "AstroNvim/astroui", opts = { colorscheme = false } }, + -- disable treesitter highlighting + { + "nvim-treesitter/nvim-treesitter", + opts = { highlight = { enable = false } }, + }, +}