Conversation
Owner
YaroSpace
commented
Jun 4, 2025
- fix: remove local for top-level variable declarations only
- fix: assignment form virtual text
There was a problem hiding this comment.
Pull Request Overview
This PR refines how local declarations are stripped—now only top-level variables are affected—and updates tests and documentation to reflect the new behavior. Key changes include:
- Implemented a Tree-sitter–based
strip_localfunction inutils.luafor precise removal of only top-levellocalkeywords. - Updated test specs to use the new
strip_localhandling and refreshed setup/teardown helpers. - Revised docs, configuration defaults, Makefile, and CI workflow names to align with the updated feature behavior.
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| lua/lua-console/utils.lua | Added strip_local function, tightened local stripping logic |
| lua/lua-console/config.lua | Clarified strip_local option description |
| tests/unit/utils_spec.lua | Adjusted tests for new strip_local and console setup flows |
| tests/unit/mappings_spec.lua | Updated mapping expectations and added buffer cleanup in after_each |
| tests/unit/lua-console_spec.lua | Changed attach mapping key in tests |
| tests/spec_helper.lua | Added delete_all_bufs helper for cleaning up buffers |
| tests/minit.lua | Introduced headless test runner setup |
| spec/utfTerminal.lua | Removed outdated custom output handler |
| spec/nvim-shim.sh | Removed shim for Neovim headless testing |
| spec/minimal_init.lua | Deleted minimal init; now handled in tests/minit.lua |
| spec/log.lua | Dropped legacy logging shim |
| README.md | Updated documentation for strip_local and cleaned up sections |
| Makefile | Updated test commands and watchers |
| .github/workflows/test_main.yml | Renamed workflow to “Tests” |
| .github/workflows/test_develop.yml | Renamed workflow to “Tests” |
| .busted | Removed outdated Busted configuration |
Comments suppressed due to low confidence (1)
lua/lua-console/utils.lua:573
- [nitpick] After removing
remove_empty_lines, blank lines can slip through. Consider applyingtrim_empty_lineshere to filter out empty entries before evaluation.
lines = lines or vim.api.nvim_buf_get_lines(buf, v_start - 1, v_end, false)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.