Skip to content

lsp: FIx indentation inconsistency and multi-word keyword completion repetition bug #8962

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

TheBearodactyl
Copy link

This PR:

  1. Makes the formatter use 2 spaces instead of 4 to match the tree-sitter indentation
  2. Fixes completion repetition on typing past the first word in a multi-word keyword (e.g. completing in p as opposed to in results in in in property where it should result in in property)

The new function in completion.rs could probably be smaller which is why I'm opening this as a draft

@TheBearodactyl TheBearodactyl changed the title LSP Fixes lsp: FIx indentation inconsistency and multi-word keyword completion repetition bug Jul 23, 2025
@TheBearodactyl
Copy link
Author

Before:

2025-07-22.20-08-10.mp4

After:

2025-07-22.20-08-50.mp4

@TheBearodactyl
Copy link
Author

forgot to update the tests, one sec

@hunger
Copy link
Member

hunger commented Jul 23, 2025

This is vim/nvim I assume? I think VSCode and helix both work fine with 4 spaces, so we should fix the tree-sitter based indentation in vim :-) And it would unbreak many of the failing tests, too:-)

I do like your completion suggestion a lot though!

@TheBearodactyl
Copy link
Author

This is vim/nvim I assume? I think VSCode and helix both work fine with 4 spaces, so we should fix the tree-sitter based indentation in vim :-) And it would unbreak many of the failing tests, too:-)

I do like your completion suggestion a lot though!

oh i already fixed all but 3 of the tests

@TheBearodactyl
Copy link
Author

i can definitely revert them though

@TheBearodactyl
Copy link
Author

image

@TheBearodactyl
Copy link
Author

also i might fix it to not remove newlines as well since removing them makes the code too compact

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.

2 participants