🚀 perf(nvim): import lazyvim vscode extra to avoid duplicate code

This commit is contained in:
Sergio Laín 2024-05-29 21:16:53 +02:00
parent c27e479cd2
commit 71ea7a60bc
No known key found for this signature in database
GPG key ID: FB00AF7015FFE76B

View file

@ -2,43 +2,9 @@ if not vim.g.vscode then
return {} return {}
end end
local config = require("lazy.core.config")
local vscode = require("vscode-neovim") local vscode = require("vscode-neovim")
local map = vim.keymap.set local map = vim.keymap.set
-- Add any additional plugins in vscode, you can set vscode=true on a plugin spec.
local enabled = {
"flash.nvim",
"lazy.nvim",
"dial.nvim",
"mini.align",
"nvim-recorder",
"comment-box.nvim",
"text-case.nvim",
"mini.ai",
"mini.comment",
"mini.pairs",
"mini.surround",
"nvim-treesitter",
"wildfire.nvim",
"nvim-treesitter-textobjects",
"nvim-various-textobjs",
"nvim-ts-context-commentstring",
"vim-repeat",
"vim-carbon-now-sh",
"highlight-undo.nvim",
"ts-node-action",
"ts.comments",
"LazyVim",
}
config.options.checker.enabled = false
config.options.change_detection.enabled = false
config.options.defaults.cond = function(plugin)
return vim.tbl_contains(enabled, plugin.name) or plugin.vscode
end
-- Options -- Options
vim.o.spell = false vim.o.spell = false
vim.opt.timeoutlen = 150 -- To show whichkey without delay vim.opt.timeoutlen = 150 -- To show whichkey without delay
@ -154,6 +120,7 @@ vim.api.nvim_create_autocmd("User", {
}) })
return { return {
{ import = "lazyvim.plugins.extras.vscode" },
{ {
"LazyVim/LazyVim", "LazyVim/LazyVim",
config = function(_, opts) config = function(_, opts)
@ -163,14 +130,6 @@ return {
require("lazyvim").setup(opts) require("lazyvim").setup(opts)
end, end,
}, },
{
"nvim-treesitter/nvim-treesitter",
opts = {
highlight = {
enable = false,
},
},
},
{ {
"folke/flash.nvim", "folke/flash.nvim",
init = function() init = function()