mirror of https://github.com/sgoudham/dotfiles.git
refactor(nvim): correctly start java lsp when switching projects
parent
b401dbb587
commit
83924bfa13
@ -1,2 +1,6 @@
|
|||||||
local config = require("lsp.java").make_jdtls_config()
|
local root_markers = { "gradlew", "mvnw", ".git", "pom.xml", "build.gradle" }
|
||||||
|
local root_dir = require("jdtls.setup").find_root(root_markers)
|
||||||
|
local workspace_folder = os.getenv("HOME") .. "/.local/share/eclipse/" .. vim.fn.fnamemodify(root_dir, ":p:h:t")
|
||||||
|
|
||||||
|
local config = require("lsp.java").make_jdtls_config(root_dir, workspace_folder)
|
||||||
require("jdtls").start_or_attach(config)
|
require("jdtls").start_or_attach(config)
|
||||||
|
Loading…
Reference in New Issue