Skip to content

Conversation

@YaroSpace
Copy link
Owner

  • fix: remove local for top-level variable declarations only
  • fix: assignment form virtual text

@YaroSpace YaroSpace requested a review from Copilot June 4, 2025 15:01
@YaroSpace YaroSpace merged commit 90c81c4 into main Jun 4, 2025
5 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_local function in utils.lua for precise removal of only top-level local keywords.
  • Updated test specs to use the new strip_local handling 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 applying trim_empty_lines here to filter out empty entries before evaluation.
lines = lines or vim.api.nvim_buf_get_lines(buf, v_start - 1, v_end, false)

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