From d8b4b6487d67c9dddac293da38f594c1c22790c4 Mon Sep 17 00:00:00 2001 From: s1n7ax Date: Fri, 8 Dec 2023 20:12:53 +0530 Subject: [PATCH 1/3] fix: error when java.setup with no table --- README.md | 8 ++++++-- lua/java.lua | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b0bf542..20e8bb2 100644 --- a/README.md +++ b/README.md @@ -62,11 +62,15 @@ return { }, } }, - event = 'VeryLazy', - opts = {}, } ``` +- Setup java-nvim before `lspconfig` and `mason-lspconfig` + +```lua +require('java').setup() +``` + - Setup jdtls like you would usually do ```lua diff --git a/lua/java.lua b/lua/java.lua index d5f3f09..febde67 100644 --- a/lua/java.lua +++ b/lua/java.lua @@ -11,7 +11,8 @@ local global_config = require('java.config') local M = {} function M.setup(custom_config) - local config = vim.tbl_deep_extend('force', global_config, custom_config) + local config = + vim.tbl_deep_extend('force', global_config, custom_config or {}) nvim_dep.check() From 5e980e1ef8a5d16e36f87c8259d99380b86df633 Mon Sep 17 00:00:00 2001 From: s1n7ax Date: Fri, 8 Dec 2023 20:15:09 +0530 Subject: [PATCH 2/3] chore(doc): fix typo in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 20e8bb2..200052a 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ return { } ``` -- Setup java-nvim before `lspconfig` and `mason-lspconfig` +- Setup nvim-java before `lspconfig` and `mason-lspconfig` ```lua require('java').setup() From d06cc15a7909360ba83187a964034f49b1cc28f8 Mon Sep 17 00:00:00 2001 From: s1n7ax Date: Fri, 8 Dec 2023 20:16:02 +0530 Subject: [PATCH 3/3] chore(doc): correction in the readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 200052a..cd050b5 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ return { } ``` -- Setup nvim-java before `lspconfig` and `mason-lspconfig` +- Setup nvim-java before `lspconfig` ```lua require('java').setup()