mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-22 17:03:36 +02:00
fix: add validation if dap not installed
This commit is contained in:
parent
b302971eb3
commit
f52834f1b8
1 changed files with 7 additions and 0 deletions
|
@ -115,6 +115,13 @@ local config = {
|
||||||
|
|
||||||
config["on_attach"] = function(client, bufnr)
|
config["on_attach"] = function(client, bufnr)
|
||||||
local _, _ = pcall(vim.lsp.codelens.refresh)
|
local _, _ = pcall(vim.lsp.codelens.refresh)
|
||||||
|
|
||||||
|
-- valdation if DAP not installed
|
||||||
|
local dap_status, _ = pcall(require, "nvim-dap")
|
||||||
|
if not dap_status then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
require("jdtls.dap").setup_dap_main_class_configs()
|
require("jdtls.dap").setup_dap_main_class_configs()
|
||||||
jdtls.setup_dap({ hotcodereplace = "auto" })
|
jdtls.setup_dap({ hotcodereplace = "auto" })
|
||||||
require("user.lsp.handlers").on_attach(client, bufnr)
|
require("user.lsp.handlers").on_attach(client, bufnr)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue