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

Incorrect indentation on lua files #6472

Open
noenthu opened this issue Apr 19, 2024 · 0 comments
Open

Incorrect indentation on lua files #6472

noenthu opened this issue Apr 19, 2024 · 0 comments
Labels
bug Something isn't working indent Issues or PRs about indentation queries or module

Comments

@noenthu
Copy link

noenthu commented Apr 19, 2024

Describe the bug

In specific situations indentations are incorrect when creating a table within a table if a function block is present.

demo

To Reproduce

Please refer to attached recording.
When the function block is commented out, the indentation works correctly.

Expected behavior

No response

Output of :checkhealth nvim-treesitter

==============================================================================
nvim-treesitter: require("nvim-treesitter.health").check()

Installation ~
- WARNING `tree-sitter` executable not found (parser generator, only needed for :TSInstallFromGrammar, not required for :TSInstall)
- OK `node` found v18.18.2 (only needed for :TSInstallFromGrammar)
- OK `git` executable found.
- OK `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
  Version: cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
- OK Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.

OS Info:
{
  machine = "x86_64",
  release = "5.15.146.1-microsoft-standard-WSL2",
  sysname = "Linux",
  version = "#1 SMP Thu Jan 11 04:09:03 UTC 2024"
} ~

Parser/Features         H L F I J
  - bash                ✓ ✓ ✓ . ✓
  - c                   ✓ ✓ ✓ ✓ ✓
  - c_sharp             ✓ ✓ ✓ . ✓
  - cmake               ✓ . ✓ . .
  - css                 ✓ . ✓ ✓ ✓
  - dockerfile          ✓ . . . ✓
  - go                  ✓ ✓ ✓ ✓ ✓
  - hcl                 ✓ . ✓ ✓ ✓
  - html                ✓ ✓ ✓ ✓ ✓
  - http                ✓ . . . ✓
  - java                ✓ ✓ . ✓ ✓
  - javascript          ✓ ✓ ✓ ✓ ✓
  - json                ✓ ✓ ✓ ✓ .
  - lua                 ✓ ✓ ✓ ✓ ✓
  - markdown            ✓ . ✓ . ✓
  - markdown_inline     ✓ . . . ✓
  - python              ✓ ✓ ✓ ✓ ✓
  - query               ✓ ✓ ✓ ✓ ✓
  - rust                ✓ ✓ ✓ ✓ ✓
  - solidity            ✓ . . . .
  - typescript          ✓ ✓ ✓ ✓ ✓
  - vim                 ✓ ✓ ✓ . ✓
  - vimdoc              ✓ . . . ✓
  - yaml                ✓ ✓ ✓ ✓ ✓

  Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections
         +) multiple parsers found, only one will be used
         x) errors found in the query, try to run :TSUpdate {lang} ~

Output of nvim --version

NVIM v0.9.5
Build type: RelWithDebInfo
LuaJIT 2.1.1692716794

Additional context

No response

@noenthu noenthu added the bug Something isn't working label Apr 19, 2024
@clason clason added the indent Issues or PRs about indentation queries or module label Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working indent Issues or PRs about indentation queries or module
Projects
None yet
Development

No branches or pull requests

2 participants