-
-
Notifications
You must be signed in to change notification settings - Fork 226
Don't include comments in the context window #361
Copy link
Copy link
Closed as not planned
Labels
bugSomething isn't workingSomething isn't working
Description
Description
At least in Ruby, I like to have larger, multi-line explanatory comments. That's great and all, but when I scroll down, the entire block is stuck with the class/function and fills up a lot of the screen.
sample.rb
class Sample
# Lorem ipsum suscipit velit reiciendis ex aliquid sed. Et qui amet aspernatur
# voluptatem iusto atque quo. Cumque itaque aut pariatur adipisci est eius et.
# Ratione laborum eos mollitia tenetur laboriosam sed. Blanditiis excepturi
# dolores magni et qui non aut doloremque. Et sequi distinctio ut et alias.
# i don't know what this code is, I just started typing things
def do_a_thing(a, b)
a.join(' ').split(/./).each do |char|
case char
when 'a'..'z'
b.upcase
when 'A'..'Z'
b.upcase
when '0'..'9'
-1 * b.to_i
else
b + b
end
end
end
endNeovim version
v0.9.4 on Arch Linux
Expected behavior
Only the class and def lines are shown, and the comment hidden from the context popup.
Actual behavior
The comment is included, in full, and obscures a large part of the editor's screen.
Minimal config
local plugins = {
ts = 'https://github.com/nvim-treesitter/nvim-treesitter',
ts_context = 'https://github.com/nvim-treesitter/nvim-treesitter-context',
-- ADD ADDITIONAL PLUGINS THAT ARE _NECESSARY_ TO REPRODUCE THE ISSUE
}
for name, url in pairs(plugins) do
local install_path = '/tmp/nvim/site/'..name
if vim.fn.isdirectory(install_path) == 0 then
vim.fn.system { 'git', 'clone', '--depth=1', url, install_path }
end
vim.o.runtimepath = install_path..','..vim.o.runtimepath
endSteps to reproduce
- Have a terminal that's shorter than usual, like only 15 or 20 lines tall.
nvim --clean -u minimal.lua sample.rb- Scroll down some
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working