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

Comment broke the indentation #463

Open
GNITOAHC opened this issue May 18, 2024 · 0 comments
Open

Comment broke the indentation #463

GNITOAHC opened this issue May 18, 2024 · 0 comments

Comments

@GNITOAHC
Copy link

neovim version:

NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1713773202

Just find out after upgrading to neovim version v0.10.0, the visual mode comment will break the indentation.

Original code:

type MyType struct {
    Name string
    Id   int
}

Before upgrading to v0.10.0, after visual mode select and gc

// type MyType struct {
//     Name string
//     Id   int
// }

But now it became as following, which won't push back the other line of code.

// type MyType struct {
//  Name string
//  Id   int
// }

I've tested on lua, too.
Before:

{
    "numToStr/Comment.nvim",
    config = function()
      require("Comment").setup({
        pre_hook = require("ts_context_commentstring.integrations.comment_nvim").create_pre_hook(), 
      })
    end,
    dependencies = { "JoosepAlviste/nvim-ts-context-commentstring" },
},

After commenting:

-- {
--  "numToStr/Comment.nvim",
--  config = function()
--      require("Comment").setup({
--      pre_hook = require("ts_context_commentstring.integrations.comment_nvim").create_pre_hook(), 
--  })
--  end,
--  dependencies = { "JoosepAlviste/nvim-ts-context-commentstring" },
-- },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant