diff --git a/lua/kickstart/plugins/lspconfig.lua b/lua/kickstart/plugins/lspconfig.lua index b885082..d7ee82d 100644 --- a/lua/kickstart/plugins/lspconfig.lua +++ b/lua/kickstart/plugins/lspconfig.lua @@ -262,7 +262,12 @@ return { bundles = {}, }, } - require('jdtls').start_or_attach(config) + vim.api.nvim_create_autocmd('FileType', { + pattern = 'java', + callback = function() + require('jdtls').start_or_attach(config) + end, + }) end -- Ensure the servers and tools above are installed