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

feature: configure bigfile based on max column length or path #372

Open
1 task done
cngu opened this issue Dec 22, 2024 · 0 comments
Open
1 task done

feature: configure bigfile based on max column length or path #372

cngu opened this issue Dec 22, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@cngu
Copy link

cngu commented Dec 22, 2024

Did you check the docs?

  • I have read all the snacks.nvim docs

Is your feature request related to a problem? Please describe.

Consider minified JS/CSS files that consist of a few lines, but each line is hundreds to thousands of lines long, amounting to 100KB. Loading these minified files (with LSP, highlighting, and more enabled) take much longer than a regular 100 KB file split into a hundred lines. Therefore enabling bigfile based solely on file size is insufficient - it needs to consider line length.

Describe the solution you'd like

Enable the bigfile filetype if the max column length exceeds a configurable number. It may be slow to find and count the max line length, in which case we could also allow configuring the maximum number of lines to search. Note that we can't always assume the first line will be long (e.g. it could be a license comment).

Describe alternatives you've considered

Another option is to enable this based on a match on the absolute file path. It'd be up to the user to find a common pattern match for their minified files (e.g. everything under a "dist/" directory, or file names that match "*.min.js").

Additional context

No response

@cngu cngu added the enhancement New feature or request label Dec 22, 2024
@cngu cngu changed the title feature: configure bigfile based on max column length feature: configure bigfile based on max column length or path Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant