Skip to content
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

nvim-java uses tabulator for code inserted via code action #1342

Open
4 tasks done
Jaffex opened this issue Jan 30, 2025 · 1 comment
Open
4 tasks done

nvim-java uses tabulator for code inserted via code action #1342

Jaffex opened this issue Jan 30, 2025 · 1 comment
Labels
bug Something isn't working upstream Issues that apply to upstream plugins and not AstroNvim directly.

Comments

@Jaffex
Copy link

Jaffex commented Jan 30, 2025

Checklist

  • I have searched through the AstroNvim documentation
  • I have searched through the existing issues of this project
  • I have searched the existing issues of plugins related to this issue
  • I can replicate the bug with the minimal repro.lua provided below

Neovim version (nvim -v)

0.10.3

Operating system/version

Fedora 41

Terminal/GUI

alacritty

Describe the bug

When using nvim-java's code actions, for example to create a non existing method, the added method will use tabulators as indentation instead of the configured default or recognized indentation character (4 spaces in my case).

Steps to Reproduce

Install nvim-java via the community plugins, then open a java file and create a new method via code action.

Expected behavior

I would expect nvim-java to use the same indentation settings as neovim uses for example when I write the code by hand.

Screenshots

No response

Additional Context

No response

Minimal configuration

-- save as repro.lua
-- run with nvim -u repro.lua
-- DO NOT change the paths
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "runtime", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  -- stylua: ignore
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)

-- install plugins
local plugins = {
  { "AstroNvim/AstroNvim", import = "astronvim.plugins" },
  { "AstroNvim/astrocommunity", import = "astrocommunity.lsp.nvim-java" },

  -- add any other plugins/customizations here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

-- add anything else here (autocommands, vim.filetype, etc.)
@Jaffex Jaffex added the bug Something isn't working label Jan 30, 2025
@Uzaaft
Copy link
Member

Uzaaft commented Jan 30, 2025

This seems like an upstream bug tbf.

@Uzaaft Uzaaft added the upstream Issues that apply to upstream plugins and not AstroNvim directly. label Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream Issues that apply to upstream plugins and not AstroNvim directly.
Projects
None yet
Development

No branches or pull requests

2 participants