YnwrdCreso
YnwrdCreso

Reputation: 1

disable task tag [TODO] jdtls [nvim, cmp, lua]

this is my lua config for cmp:

require('lspconfig')['jdtls'].setup {
    root_dir = function(fname)
        return vim.fn.getcwd()
    end,
    cmd = {
        'jdtls',
        '-vmargs',
        '-Dorg.eclipse.jdt.ls.taskTags=',
        '-Dorg.eclipse.jdt.ls.taskPriorities='
    },
}

but still I keep seeing the markers on //TODO

I tried doing lots and lots of configurations, even using "settings" files in the source of my project

Upvotes: 0

Views: 131

Answers (1)

alieb
alieb

Reputation: 85

According to the jdtls Java Compiler Options section you can set the value for java.settings.url to a settings file.

require('lspconfig')['jdtls'].setup {
    root_dir = function(fname)
        return vim.fn.getcwd()
    end,
    cmd = {
        'jdtls',
        '-vmargs',
    },
    settings = {
        ['java.settings.url'] = '<some path>/settings.pref',
    }
}

Then, in the settings.pref add

org.eclipse.jdt.core.compiler.taskTags=

This worked for me. There might be a way to configure it without an additional file, but I couldn't figure it out.

Upvotes: 0

Related Questions