williamboman/nvim-lsp-installer
View on GitHubconfigurable jvm_args & workspace for jdtls server
Open
#857 opened on Jul 11, 2022
enhancementhelp wanted
Repository metrics
- Stars
- (2,026 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
Is your feature request related to a problem? Please describe.
lspconfig allows jvm_args and workspace to be overridden by setting config.init_options.
nvim-lsp-installer seems to be using config.vmargs & vim.env.WORKSPACE.
Since nvim-lsp-installer allows to be setup through the regular lspconfig.setup() it would be nice to respect lspconfig config.
Describe the solution you'd like
Following config should change set -additional_arg JVM option and should change the workspace from ~/workspace to ~/.cache/jdtls.
require('lspconfig').jdtls.setup({
init_options = {
-- export DEFAULT_VMARGS so user can append additional args without
-- having to manage default args?
jvm_args = '-additional_arg',
-- I like the idea of generic workspace, but better to have it working
-- with init_options.workspace too I guess
workspace = vim.env.HOME .. '/cache/.jdtls'
}
})
Describe potential alternatives you've considered
To export DEFAULT_VMARGS, a possible solution would be, moving DEFAULT_VMARGS to nvim-lsp-installer/servers/jdtls/defaults.lua.