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