-
Notifications
You must be signed in to change notification settings - Fork 18
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
fix: fix #180 #198
base: main
Are you sure you want to change the base?
fix: fix #180 #198
Conversation
Am experiencing the same issue---I would like to take a stab at fixing this. If you get a few seconds, could you elaborate a bit more on what you mean by "related to indents, offsets and tabs vs spaces"? I should have some time to spend on this in the next couple of weeks, would help me get off to a better start. ty! |
Very cool! So https://github.com/jmbuhr/otter.nvim/blob/be6324e0987c4fab347784e602c00f17c5fc0bd7/tests/examples/07.html is a good example file to test this. If you activate otter in it and check the otter buffer created for the injected js (use Current issues: Determining the indentation level can be fickel depending on if the treesitter injection query includes e.g. the preceding newline in the html example (that's why I'm removing some blank lines in this PR when determining the indentation) Accepting a completion with blink.cmp puts it at the start of the linebor overwrites part of the word, even though I think I caught the respective position parameters in the otter.handler for completion resolve. Plus we might want to experiment with just not changing indentations for languages that are not whitespace sensitive, this would make it a lot easier for most things that are not python or Haskell. |
Either way a second person taking a stab at this with fresh eyes is always appreciated! :) |
Ah, and the tabs vs. spaces thing was an instance where I noticed some autoformat of the html language server changing between tabs and spaces, which would confuse the otter buffer indentation check, not sure if that is still relevant. |
I also may have some debugging code in this PR related to investigating #197 |
Hi there -- had some work travel come up, but I think I have made a bit of progress in debugging this issue, at least for my own understanding. To me, it looks like the distinction is that in an indented block, after the first completion on any given line is resolved, no more calls to Still investigating why this is the case, but maybe this will prompt you in a productive direction as well 🤷 |
#180 appears to be related to indents, offsets and tabs vs. spaces.