Add condition to not load most plugins if running in vscode mode
This commit is contained in:
parent
3acdc1ff73
commit
664f70c857
8
init.lua
8
init.lua
|
@ -60,5 +60,9 @@ vim.g.loaded_perl_provider = 0
|
||||||
vim.keymap.set("i", "jk", "<esc>")
|
vim.keymap.set("i", "jk", "<esc>")
|
||||||
vim.keymap.set("n", "<leader>l", "<cmd>Lazy<CR>")
|
vim.keymap.set("n", "<leader>l", "<cmd>Lazy<CR>")
|
||||||
|
|
||||||
-- neovide
|
-- GUI settings
|
||||||
if vim.g.neovide then require "ui.neovide" end
|
if vim.g.neovide then
|
||||||
|
require "ui.neovide"
|
||||||
|
elseif vim.g.vscode then
|
||||||
|
require "ui.vscode"
|
||||||
|
end
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"goolord/alpha-nvim",
|
"goolord/alpha-nvim",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
event = "VimEnter",
|
event = "VimEnter",
|
||||||
opts = function()
|
opts = function()
|
||||||
local dashboard = require "alpha.themes.dashboard"
|
local dashboard = require "alpha.themes.dashboard"
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"romgrk/barbar.nvim",
|
"romgrk/barbar.nvim",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
version = "^1.0.0", -- optional: only update when a new 1.x version is released
|
version = "^1.0.0", -- optional: only update when a new 1.x version is released
|
||||||
dependencies = { "lewis6991/gitsigns.nvim", "nvim-tree/nvim-web-devicons" },
|
dependencies = { "lewis6991/gitsigns.nvim", "nvim-tree/nvim-web-devicons" },
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"utilyre/barbecue.nvim",
|
"utilyre/barbecue.nvim",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
name = "barbecue",
|
name = "barbecue",
|
||||||
version = "*",
|
version = "*",
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"catppuccin/nvim",
|
"catppuccin/nvim",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
name = "catppuccin",
|
name = "catppuccin",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
config = true,
|
config = true,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"numToStr/Comment.nvim",
|
"numToStr/Comment.nvim",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
config = true,
|
config = true,
|
||||||
opts = { ignore = "^$" },
|
opts = { ignore = "^$" },
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"sindrets/diffview.nvim",
|
"sindrets/diffview.nvim",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
dependencies = { "nvim-lua/plenary.nvim", "nvim-tree/nvim-web-devicons" },
|
dependencies = { "nvim-lua/plenary.nvim", "nvim-tree/nvim-web-devicons" },
|
||||||
cmd = {
|
cmd = {
|
||||||
"DiffviewFileHistory",
|
"DiffviewFileHistory",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"https://github.com/direnv/direnv.vim.git",
|
"https://github.com/direnv/direnv.vim.git",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
name = "direnv.vim",
|
name = "direnv.vim",
|
||||||
event = { "DirChangedPre" },
|
event = { "DirChangedPre" },
|
||||||
config = function()
|
config = function()
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
config = true,
|
config = true,
|
||||||
opts = {
|
opts = {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"phaazon/hop.nvim",
|
"phaazon/hop.nvim",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
cmd = { "HopWord", "HopLine" },
|
cmd = { "HopWord", "HopLine" },
|
||||||
init = function()
|
init = function()
|
||||||
vim.keymap.set("n", "<leader>hw", "<cmd>HopWord<cr>")
|
vim.keymap.set("n", "<leader>hw", "<cmd>HopWord<cr>")
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
config = true,
|
config = true,
|
||||||
opts = {
|
opts = {
|
||||||
|
|
|
@ -87,6 +87,7 @@ end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
dependencies = { "cmp-nvim-lsp", "folke/neodev.nvim", "jose-elias-alvarez/null-ls.nvim" },
|
dependencies = { "cmp-nvim-lsp", "folke/neodev.nvim", "jose-elias-alvarez/null-ls.nvim" },
|
||||||
config = config,
|
config = config,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons", "folke/noice.nvim", "folke/tokyonight.nvim" },
|
dependencies = { "nvim-tree/nvim-web-devicons", "folke/noice.nvim", "folke/tokyonight.nvim" },
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
config = true,
|
config = true,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"L3MON4D3/LuaSnip",
|
"L3MON4D3/LuaSnip",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
lazy = true,
|
lazy = true,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"rafamadriz/friendly-snippets",
|
"rafamadriz/friendly-snippets",
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
return {
|
return {
|
||||||
"dccsillag/magma-nvim",
|
"dccsillag/magma-nvim",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
event = { "FileType python" },
|
event = { "FileType python" },
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"TimUntersberger/neogit",
|
"TimUntersberger/neogit",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
"sindrets/diffview.nvim",
|
"sindrets/diffview.nvim",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"nvim-neo-tree/neo-tree.nvim",
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
branch = "v2.x",
|
branch = "v2.x",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"folke/noice.nvim",
|
"folke/noice.nvim",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
event = { "VeryLazy" },
|
event = { "VeryLazy" },
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"MunifTanjim/nui.nvim",
|
"MunifTanjim/nui.nvim",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"rcarriga/nvim-notify",
|
"rcarriga/nvim-notify",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
lazy = true,
|
lazy = true,
|
||||||
config = true,
|
config = true,
|
||||||
opts = {
|
opts = {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"windwp/nvim-autopairs",
|
"windwp/nvim-autopairs",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
lazy = true,
|
lazy = true,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
|
|
@ -52,6 +52,7 @@ end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
event = { "InsertEnter", "CmdlineEnter" },
|
event = { "InsertEnter", "CmdlineEnter" },
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"SmiteshP/nvim-navbuddy",
|
"SmiteshP/nvim-navbuddy",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
dependencies = { "SmiteshP/nvim-navic", "MunifTanjim/nui.nvim", "neovim/nvim-lspconfig" },
|
dependencies = { "SmiteshP/nvim-navic", "MunifTanjim/nui.nvim", "neovim/nvim-lspconfig" },
|
||||||
cmd = { "Navbuddy" },
|
cmd = { "Navbuddy" },
|
||||||
init = function() vim.keymap.set("n", "<leader>na", "<cmd>Navbuddy<cr>") end,
|
init = function() vim.keymap.set("n", "<leader>na", "<cmd>Navbuddy<cr>") end,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"SmiteshP/nvim-navic",
|
"SmiteshP/nvim-navic",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
dependencies = "neovim/nvim-lspconfig",
|
dependencies = "neovim/nvim-lspconfig",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
config = true,
|
config = true,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"nvim-neorg/neorg",
|
"nvim-neorg/neorg",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
build = ":Neorg sync-parsers",
|
build = ":Neorg sync-parsers",
|
||||||
event = { "FileType norg" },
|
event = { "FileType norg" },
|
||||||
cmd = "Neorg",
|
cmd = "Neorg",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"nvim-neotest/neotest",
|
"nvim-neotest/neotest",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
lazy = true,
|
lazy = true,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"stevearc/oil.nvim",
|
"stevearc/oil.nvim",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
cmd = "Oil",
|
cmd = "Oil",
|
||||||
init = function()
|
init = function()
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"ahmedkhalf/project.nvim",
|
"ahmedkhalf/project.nvim",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
name = "project_nvim",
|
name = "project_nvim",
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
config = true,
|
config = true,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
branch = "0.1.x",
|
branch = "0.1.x",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"akinsho/toggleterm.nvim",
|
"akinsho/toggleterm.nvim",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
version = "*",
|
version = "*",
|
||||||
cmd = { "ToggleTerm" },
|
cmd = { "ToggleTerm" },
|
||||||
init = function() vim.keymap.set("n", "<leader>tt", "<cmd>ToggleTerm direction=tab<CR>") end,
|
init = function() vim.keymap.set("n", "<leader>tt", "<cmd>ToggleTerm direction=tab<CR>") end,
|
||||||
|
|
|
@ -1,9 +1,16 @@
|
||||||
|
local dependencies
|
||||||
|
if vim.g.vscode then
|
||||||
|
dependencies = { "nvim-treesitter/nvim-treesitter-refactor" }
|
||||||
|
else
|
||||||
|
dependencies = { "nvim-treesitter/nvim-treesitter-refactor", "nvim-neorg/neorg" }
|
||||||
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
version = false,
|
version = false,
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
dependencies = { "nvim-treesitter/nvim-treesitter-refactor", "nvim-neorg/neorg" },
|
dependencies = dependencies,
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
if type(opts.ensure_installed) == "table" then
|
if type(opts.ensure_installed) == "table" then
|
||||||
-- @type table<string, boolean>
|
-- @type table<string, boolean>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"folke/trouble.nvim",
|
"folke/trouble.nvim",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
dependencies = "nvim-tree/nvim-web-devicons",
|
dependencies = "nvim-tree/nvim-web-devicons",
|
||||||
cmd = "TroubleToggle",
|
cmd = "TroubleToggle",
|
||||||
init = function()
|
init = function()
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"folke/twilight.nvim",
|
"folke/twilight.nvim",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
dependencies = { "nvim-treesitter" },
|
dependencies = { "nvim-treesitter" },
|
||||||
cmd = "Twilight",
|
cmd = "Twilight",
|
||||||
config = true,
|
config = true,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
keys = { "<leader>" },
|
keys = { "<leader>" },
|
||||||
init = function()
|
init = function()
|
||||||
vim.o.timeout = true
|
vim.o.timeout = true
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"folke/zen-mode.nvim",
|
"folke/zen-mode.nvim",
|
||||||
|
cond = not vim.g.vscode,
|
||||||
dependencies = { "folke/twilight.nvim" },
|
dependencies = { "folke/twilight.nvim" },
|
||||||
cmd = { "ZenMode" },
|
cmd = { "ZenMode" },
|
||||||
init = function() vim.keymap.set("n", "<leader>z", "<cmd>ZenMode<CR>") end,
|
init = function() vim.keymap.set("n", "<leader>z", "<cmd>ZenMode<CR>") end,
|
||||||
|
|
1
lua/ui/vscode.lua
Normal file
1
lua/ui/vscode.lua
Normal file
|
@ -0,0 +1 @@
|
||||||
|
require "nvim-treesitter"
|
Loading…
Reference in a new issue