Skip to content

function need attr table if is nil add empty table #105

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

KamiALK
Copy link

@KamiALK KamiALK commented Aug 26, 2024

While working with the jdtls configuration in Neovim, I noticed that in certain cases, the opts.jdtls field might not be defined, leading to an error when trying to merge configurations using vim.tbl_deep_extend. To avoid this issue, I added a check that passes an empty table {} if opts.jdtls is nil.
I modified the attach_jdtls function so that when constructing the language server configuration, opts.jdtls or {} is passed to the vim.tbl_deep_extend call. This ensures that a valid table is always passed, preventing unexpected errors and improving the robustness of the code.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant