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 {
|
||||
"hrsh7th/nvim-cmp",
|
||||
lazy = true,
|
||||
ft = { "java", "go", "python", "html" },
|
||||
event = "InsertEnter",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-buffer",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ return {
|
|||
dependencies = {
|
||||
"mfussenegger/nvim-dap",
|
||||
},
|
||||
lazy = true,
|
||||
ft = { "go" },
|
||||
config = function()
|
||||
require('dap-go').setup()
|
||||
end,
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ return {
|
|||
dependencies = {
|
||||
"mfussenegger/nvim-dap",
|
||||
},
|
||||
lazy = true,
|
||||
ft = { "python" },
|
||||
config = function()
|
||||
require('dap-python').setup()
|
||||
end,
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ return {
|
|||
opts = {},
|
||||
},
|
||||
},
|
||||
lazy = true,
|
||||
ft = { "java", "go", "python" },
|
||||
keys = {
|
||||
{ "<leader>du", function() require("dapui").toggle({ }) end, desc = "Dap UI" },
|
||||
{ "<leader>de", function() require("dapui").eval() end, desc = "Eval", mode = {"n", "v"} },
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
return {
|
||||
"mfussenegger/nvim-dap",
|
||||
lazy = true,
|
||||
ft = { "java", "go", "python" },
|
||||
dependencies = {
|
||||
"rcarriga/nvim-dap-ui",
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ return {
|
|||
dependencies = {
|
||||
"williamboman/mason.nvim"
|
||||
},
|
||||
lazy = true,
|
||||
ft = { "java" },
|
||||
config = function()
|
||||
local dap = require('dap')
|
||||
dap.configurations.java = {{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue