added vscode support

This commit is contained in:
John O'Keefe 2024-03-27 21:01:29 -04:00
parent bd2b4414e6
commit 2bbaaff483

49
lua/plugins/vscode.lua Normal file
View File

@ -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 = {
["<Leader>ff"] = "<CMD>Find<CR>",
["<Leader>fw"] = "<CMD>call VSCodeNotify('workbench.action.findInFiles')<CR>",
["<Leader>ls"] = "<CMD>call VSCodeNotify('workbench.action.gotoSymbol')<CR>",
},
},
},
},
-- disable colorscheme setting
{ "AstroNvim/astroui", opts = { colorscheme = false } },
-- disable treesitter highlighting
{
"nvim-treesitter/nvim-treesitter",
opts = { highlight = { enable = false } },
},
}