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 indents #378

Merged
merged 1 commit into from
Aug 18, 2024
Merged

Nvim indents #378

merged 1 commit into from
Aug 18, 2024

Conversation

susliko
Copy link
Collaborator

@susliko susliko commented Mar 10, 2024

Sharing queries for proper indents (also fixes problem descirbed in #173).
I'm going to use them for a while and polish before merging

cc @keynmol

@susliko susliko force-pushed the nvim-indents branch 2 times, most recently from 4730b5b to ac04e8b Compare March 25, 2024 20:35
@susliko
Copy link
Collaborator Author

susliko commented Mar 25, 2024

TODO list:

  • Nested definitions with no braces
object Foo:
  class Bar:<cr>

  • Ending indents on "end"
object Foo:
  en<d>

  • Match expression with no braces
def foo(x: Int) = 
  x match <cr>

P.S. I don't think it's possible to automatically dedent end markers in Neovim by means of tree-sitter

@farnoy
Copy link

farnoy commented Jul 19, 2024

Hey @susliko , how is your experience so far with this change? If it's not regressing anything else, maybe it may be worth merging to have an incremental improvement?

@susliko susliko force-pushed the nvim-indents branch 2 times, most recently from 79a6fc3 to a5d1016 Compare August 18, 2024 12:07
@susliko susliko marked this pull request as ready for review August 18, 2024 12:08
@susliko susliko changed the title WIP: nvim indents Nvim indents Aug 18, 2024
@susliko
Copy link
Collaborator Author

susliko commented Aug 18, 2024

I've been using these indentation queries for neovim for a while now and I find them to be more or less satisfactory.

Copy link
Collaborator

@eed3si9n eed3si9n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@eed3si9n eed3si9n merged commit dd7fe4d into tree-sitter:master Aug 18, 2024
4 checks passed
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

Successfully merging this pull request may close these issues.

3 participants