-
-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add code action to generate doc comments #91
Comments
See #76 - it is possible via snippet. There is no dedicated code action for it as far as I'm aware. |
Could be that the indentation settings of the editor weren't picked up because of a missing Could you try again with #92 being merged? |
Hmm #92 does not seem to fix it. |
Which eclipse.jdt.ls version are you using? eclipse-jdtls/eclipse.jdt.ls#1657 is required for it to pick up indentation/tab settings. |
I'm using |
You could try setting the format options explicitly in your config:
These options are automatically added by nvim-jdtls if they are absent. Not sure why it isn't working for you. Maybe your neovim expandtab/tabstop settings don't match the indentation style of your java file? |
When I hit TAB, indentation is correct so I guess the neovim settings are fine. The explicit config does not fix it still. Am I doing this correctly? local config = {
cmd = {'java-lsp', workspace_folder},
settings = {
java = {
format = {
insertSpaces = vim.api.nvim_buf_get_option(bufnr, 'expandtab'),
tabSize = vim.lsp.util.get_effective_tabstop(bufnr)
}
}
}
}
require('jdtls').start_or_attach(config) |
Try setting the snippetSupport option after settings in your config: local config = {
settings = {
java = {...}
},
capabilities = {
textDocument = {
completion = {
completionItem = {
snippetSupport = true
}
},
}, |
Hi, is it possible to add a code action for generating Java doc comments like this?
The text was updated successfully, but these errors were encountered: