From 6bfd1591583b02e742fc3a2f43393c4ea3b6d3c7 Mon Sep 17 00:00:00 2001 From: Mathias Fussenegger Date: Wed, 10 Jul 2024 23:28:26 +0200 Subject: [PATCH] Relax client attach condition and allow any buftype again Restricting buftype to "" broke support for opening .class files --- lua/jdtls/setup.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/jdtls/setup.lua b/lua/jdtls/setup.lua index 36e2761..38767e8 100644 --- a/lua/jdtls/setup.lua +++ b/lua/jdtls/setup.lua @@ -295,7 +295,7 @@ function M.start_or_attach(config, opts, start_opts) local uri = vim.uri_from_bufnr(bufnr) -- jdtls requires files to exist on the filesystem; it doesn't play well with scratch buffers - if not vim.startswith(uri, "file://") or vim.bo[bufnr].buftype ~= "" then + if not vim.startswith(uri, "file://") then return end