Skip to content

Commit 18bb0ab

Browse files
authored
fix: error when java.setup with no table (#56)
* fix: error when java.setup with no table * chore(doc): fix typo in readme * chore(doc): correction in the readme
1 parent 340cad5 commit 18bb0ab

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,15 @@ return {
6262
},
6363
}
6464
},
65-
event = 'VeryLazy',
66-
opts = {},
6765
}
6866
```
6967

68+
- Setup nvim-java before `lspconfig`
69+
70+
```lua
71+
require('java').setup()
72+
```
73+
7074
- Setup jdtls like you would usually do
7175

7276
```lua

lua/java.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ local global_config = require('java.config')
1111
local M = {}
1212

1313
function M.setup(custom_config)
14-
local config = vim.tbl_deep_extend('force', global_config, custom_config)
14+
local config =
15+
vim.tbl_deep_extend('force', global_config, custom_config or {})
1516

1617
nvim_dep.check()
1718

0 commit comments

Comments
 (0)