浏览代码

fix java on attach

Chris 4 年之前
父节点
当前提交
2279cb3e65
共有 1 个文件被更改,包括 1 次插入6 次删除
  1. 1 6
      ftplugin/java.lua

+ 1 - 6
ftplugin/java.lua

@@ -23,13 +23,8 @@ local util = require "lspconfig/util"
 --         CONFIG_PATH.."/.debuggers/java-debug/com.microsoft.java.debug.plugin/target/com.microsoft.java.debug.plugin-*.jar")
 -- };
 
-local on_attach = function(client, bufr)
-  -- require('jdtls').setup_dap()
-  require("lsp").common_on_attach(client, bufr)
-end
-
 require("lspconfig").jdtls.setup {
-  on_attach = on_attach,
+  on_attach = require("lsp").common_on_attach,
   cmd = { DATA_PATH .. "/lspinstall/java/jdtls.sh" },
   filetypes = { "java" },
   root_dir = util.root_pattern { ".git", "build.gradle", "pom.xml" },