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

Don't hang local x = function assignments #512

Closed
wants to merge 3 commits into from

Conversation

JohnnyMorganz
Copy link
Owner

Fixes #508

@codecov
Copy link

codecov bot commented Jul 26, 2022

Codecov Report

Merging #512 (2704951) into master (51fdff4) will increase coverage by 97.64%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           master     #512       +/-   ##
===========================================
+ Coverage        0   97.64%   +97.64%     
===========================================
  Files           0       14       +14     
  Lines           0     5354     +5354     
===========================================
+ Hits            0     5228     +5228     
- Misses          0      126      +126     
Impacted Files Coverage Δ
src/formatters/assignment.rs 97.88% <100.00%> (ø)
src/formatters/block.rs 97.69% <0.00%> (ø)
src/formatters/stmt.rs 98.77% <0.00%> (ø)
src/lib.rs 96.29% <0.00%> (ø)
src/formatters/table.rs 98.69% <0.00%> (ø)
src/formatters/trivia.rs 100.00% <0.00%> (ø)
src/formatters/general.rs 96.66% <0.00%> (ø)
src/formatters/mod.rs 100.00% <0.00%> (ø)
src/formatters/functions.rs 98.61% <0.00%> (ø)
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 51fdff4...2704951. Read the comment docs.

@github-actions
Copy link
Contributor

Repo Comparison Test

diff --git ORI/neovim/runtime/lua/vim/lsp.lua ALT/neovim/runtime/lua/vim/lsp.lua
index 61586ca..5ffb1ab 100644
--- ORI/neovim/runtime/lua/vim/lsp.lua
+++ ALT/neovim/runtime/lua/vim/lsp.lua
@@ -1385,17 +1385,16 @@ end
 --- Notify all attached clients that a buffer has changed.
 local text_document_did_change_handler
 do
-  text_document_did_change_handler =
-    function(_, bufnr, changedtick, firstline, lastline, new_lastline)
-      -- Detach (nvim_buf_attach) via returning True to on_lines if no clients are attached
-      if tbl_isempty(all_buffer_active_clients[bufnr] or {}) then
-        return true
-      end
-      util.buf_versions[bufnr] = changedtick
-      local compute_change_and_notify =
-        changetracking.prepare(bufnr, firstline, lastline, new_lastline)
-      for_each_buffer_client(bufnr, compute_change_and_notify)
+  text_document_did_change_handler = function(_, bufnr, changedtick, firstline, lastline, new_lastline)
+    -- Detach (nvim_buf_attach) via returning True to on_lines if no clients are attached
+    if tbl_isempty(all_buffer_active_clients[bufnr] or {}) then
+      return true
     end
+    util.buf_versions[bufnr] = changedtick
+    local compute_change_and_notify =
+      changetracking.prepare(bufnr, firstline, lastline, new_lastline)
+    for_each_buffer_client(bufnr, compute_change_and_notify)
+  end
 end
 
 ---@private

@JohnnyMorganz
Copy link
Owner Author

JohnnyMorganz commented Jul 26, 2022

Not the right fix - luau regression test shows we will make something worse, and the neovim test now goes over neovim's 100 char budget

@JohnnyMorganz
Copy link
Owner Author

Will revisit later. This isn't correct fix and the problem is looking a lot more involved.

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.

incorrect line break on assignment of function
1 participant