Skip to content

fix: exclude list being overwritten #21

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

Merged
merged 1 commit into from
Jun 1, 2024
Merged

Conversation

AyushRawal
Copy link
Contributor

vim.tbl_extend overwrites the elements of the list

conf.exclude or {}
)
opt.exclude = { 'dashboard', 'lazy', 'help', 'markdown', 'nofile', 'terminal', 'prompt' }
vim.list_extend(opt.exclude, conf.exclude or {})
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
vim.list_extend(opt.exclude, conf.exclude or {})
vim.list_extend({ 'dashboard', 'lazy', 'help', 'markdown', 'nofile', 'terminal', 'prompt' }, conf.exclude or {})

Copy link
Member

Choose a reason for hiding this comment

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

can be inline.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

vim.list_extend mutates the first list and does not return the merged list

Copy link
Member

@glepnir glepnir Jun 1, 2024

Choose a reason for hiding this comment

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

aha sry I forge it :)

@glepnir glepnir merged commit d1ef38c into nvimdev:main Jun 1, 2024
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