Skip to content
This repository has been archived by the owner on Nov 12, 2022. It is now read-only.

configurable jvm_args & workspace for jdtls server #857

Open
s1n7ax opened this issue Jul 11, 2022 · 2 comments
Open

configurable jvm_args & workspace for jdtls server #857

s1n7ax opened this issue Jul 11, 2022 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@s1n7ax
Copy link
Contributor

s1n7ax commented Jul 11, 2022

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.

@s1n7ax s1n7ax added the enhancement New feature or request label Jul 11, 2022
@williamboman
Copy link
Owner

Hello! I believe the nvim-lsp-installer settings were added before jdtls introduced the jdtls wrapper script. In order to avoid breaking changes for people using jdtls via nvim-lsp-installer I'm not too sure about completely removing the current behaviour. I'd be happy to accept a PR that makes nvim-lsp-installer behave a bit better with jdtls (while not changing default behaviour)! (also as a sidenote, going forward I'll be concentrating my efforts on https://github.com/williamboman/mason.nvim which will be stabilized soon)

@williamboman williamboman added the help wanted Extra attention is needed label Jul 12, 2022
@s1n7ax
Copy link
Contributor Author

s1n7ax commented Jul 19, 2022

@williamboman mason will replace this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants