nvim: Load plugins lazily based on file type
This commit is contained in:
parent
47e71f7f16
commit
212cbed679
6 changed files with 12 additions and 0 deletions
|
|
@ -1,5 +1,7 @@
|
||||||
return {
|
return {
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
|
lazy = true,
|
||||||
|
ft = { "java", "go", "python", "html" },
|
||||||
event = "InsertEnter",
|
event = "InsertEnter",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"hrsh7th/cmp-buffer",
|
"hrsh7th/cmp-buffer",
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@ return {
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
},
|
},
|
||||||
|
lazy = true,
|
||||||
|
ft = { "go" },
|
||||||
config = function()
|
config = function()
|
||||||
require('dap-go').setup()
|
require('dap-go').setup()
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@ return {
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
},
|
},
|
||||||
|
lazy = true,
|
||||||
|
ft = { "python" },
|
||||||
config = function()
|
config = function()
|
||||||
require('dap-python').setup()
|
require('dap-python').setup()
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@ return {
|
||||||
opts = {},
|
opts = {},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
lazy = true,
|
||||||
|
ft = { "java", "go", "python" },
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>du", function() require("dapui").toggle({ }) end, desc = "Dap UI" },
|
{ "<leader>du", function() require("dapui").toggle({ }) end, desc = "Dap UI" },
|
||||||
{ "<leader>de", function() require("dapui").eval() end, desc = "Eval", mode = {"n", "v"} },
|
{ "<leader>de", function() require("dapui").eval() end, desc = "Eval", mode = {"n", "v"} },
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
return {
|
return {
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
|
lazy = true,
|
||||||
|
ft = { "java", "go", "python" },
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"rcarriga/nvim-dap-ui",
|
"rcarriga/nvim-dap-ui",
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@ return {
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"williamboman/mason.nvim"
|
"williamboman/mason.nvim"
|
||||||
},
|
},
|
||||||
|
lazy = true,
|
||||||
|
ft = { "java" },
|
||||||
config = function()
|
config = function()
|
||||||
local dap = require('dap')
|
local dap = require('dap')
|
||||||
dap.configurations.java = {{
|
dap.configurations.java = {{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue