An IDE layer for Neovim with sane defaults. Completely free and community driven.
Install
Configure
Troubleshooting
Contribute
Make editing big files faster 🚀
License: Apache License 2.0
An IDE layer for Neovim with sane defaults. Completely free and community driven.
Install
Configure
Troubleshooting
Contribute
I had a 800KB file that froze up nvim: https://embed.smashystream.com/pl3.js?v=0.13
Disabling TS highlight and illuminate unfroze nvim, so I think it's safe to say even files under 1 MB can be problematic
bigfile.nvim/lua/bigfile/init.lua
Lines 110 to 117 in c804ec1
is this intentional? this plugin requires treesitter cause of it
When the detected file is opened in a nvim-tree, it always shows with empty content.
But if I nvim XXX.xml
directly, it works as expectation.
I have tried to disable nvim-tree, nvim-tree probably is not the issue.
This is the view of opening single file by nvim XXX.xml
(though file in pic below is .osm, it is viewed as xml, and other xml files cannot be opened correctly as well)
and this is the view of opening from directory by nvim .
and called by nvim-tree
This is my mininal config, probably same as default.
require("bigfile").setup {
filesize = 2,
pattern = { * },
features = {
"indent_blankline",
"illuminate",
"lsp",
"treesitter",
"syntax",
"matchparen",
"vimopts",
"filetype",
},
}
Tks for viewing, this plug-in is really useful and necessary for a data-sci developer ;)
Will it be possible to add option to disable features (enable this plugin) based on number of lines?
For example, a python file with 5k lines of code will be hardly 200Kb in size yet insanely slow.
mini.indentscope is a plugin that shows the current indentation scope (i.e. it highlights the current indent guide).
This plugin is enabled by default in LazyVim and it seems to cause performance issues on large files, from my experience.
Hi. This is a feature request, not a bug.
I recently run into a weird issue with tsserver LSP not working properly in big files. It turned out this plugin forcibly detaches buffers without stopping servers.
I request to make this plugin to be verbose and explicit on which features are disabled, so users can see its actions reported. This may be configurable via silent = false
config.
E.g. of a code snippet that can do reporting:
vim.notify("bigfile.nvim: buffer: LSP servers s are forcibly detached!", vim.log.levels.WARN)
This will make it easier to troubleshoot neovim. Thanks.
Here is an example.
I got an typescript tsserver
Error: No Project.
error that misguided me on the source of the issue. The log says nothing that it has lost connection (buffer got detached) further confusing me. Because of that I run into a wrong issue.
Info 0 [12:09:24.718] Starting TS Server
Info 1 [12:09:24.719] Version: 5.2.2
Info 2 [12:09:24.719] Arguments: /home/alex/dotfiles/nvm/.nvm/versions/node/v20.5.0/bin/node ./TypeScript/node_modules/typescript/lib/tsserver.js --serverMode partialSemantic --useInferredProjectPerProjectRoot --disableAutomaticTypingAcquisition --cancellationPipeName /tmp/6eb47b130a698bb88d59be24690b11c3/tscancellation* --logVerbosity normal --logFile /tmp/tsserver/tsserver-log-as5oK1/tsserver.log --locale en --validateDefaultNpmLocation --useNodeIpc
Info 3 [12:09:24.719] Platform: linux NodeVersion: v20.5.0 CaseSensitive: true
Info 4 [12:09:24.719] ServerMode: 1 hasUnknownServerMode: undefined
Info 5 [12:09:24.727] Host information neovim
Info 6 [12:09:24.727] Format host information updated
Info 7 [12:09:26.114] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
Info 8 [12:09:27.359] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed: 1244.2914890013635ms
Info 9 [12:09:27.359] Project '/dev/null/inferredProject1*' (Inferred)
Info 10 [12:09:27.359] Files (8)
...
Info 18 [12:09:28.150] -----------------------------------------------
Info 18 [12:09:28.150] Open files:
Info 18 [12:09:28.150] After ensureProjectForOpenFiles:
Info 19 [12:09:28.150] Project '/dev/null/inferredProject1*' (Inferred)
Info 19 [12:09:28.150] Files (0)
Info 19 [12:09:28.150] -----------------------------------------------
Info 19 [12:09:28.150] Open files:
Err 19 [12:09:28.165] Exception on executing command {
"seq": 4,
"type": "request",
"command": "navtree",
"arguments": {
"file": "./TypeScript/src/compiler/checker.ts"
}
}:
No Project.
Error: No Project.
at Object.ThrowNoProject (./TypeScript/node_modules/typescript/lib/tsserver.js:174959:11)
at ScriptInfo.getDefaultProject (./TypeScript/node_modules/typescript/lib/tsserver.js:175711:23)
at _ProjectService.doEnsureDefaultProjectForFile (./TypeScript/node_modules/typescript/lib/tsserver.js:178932:36)
at _ProjectService.ensureDefaultProjectForFile (./TypeScript/node_modules/typescript/lib/tsserver.js:178927:75)
at IpcIOSession.getFileAndProjectWorker (./TypeScript/node_modules/typescript/lib/tsserver.js:183899:77)
at IpcIOSession.getFileAndProject (./TypeScript/node_modules/typescript/lib/tsserver.js:183885:17)
at IpcIOSession.getFileAndLanguageServiceForSyntacticOperation (./TypeScript/node_modules/typescript/lib/tsserver.js:183888:36)
at IpcIOSession.getNavigationTree (./TypeScript/node_modules/typescript/lib/tsserver.js:184320:44)
at navtree (./TypeScript/node_modules/typescript/lib/tsserver.js:182604:43)
at ./TypeScript/node_modules/typescript/lib/tsserver.js:184838:69
at IpcIOSession.executeWithRequestId (./TypeScript/node_modules/typescript/lib/tsserver.js:184830:14)
at IpcIOSession.executeCommand (./TypeScript/node_modules/typescript/lib/tsserver.js:184838:29)
at IpcIOSession.onMessage (./TypeScript/node_modules/typescript/lib/tsserver.js:184880:51)
at process.<anonymous> (./TypeScript/node_modules/typescript/lib/tsserver.js:186461:14)
at process.emit (node:events:514:28)
at emit (node:internal/child_process:951:14)
at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
It's easy to reproduce this behavior on any big file where LSP is attached. E.g.:
# run in shell
pushd $(mktemp -d)
git clone --no-tags --depth 1 [email protected]:microsoft/TypeScript.git
pushd TypeScript
rm /tmp/tsserver/tsserver-log-*/*.log
nvim compiler/checker.ts # 50k+ LOC
lazy.nvim
expects config to be passed to plugins via their .setup()
function. This way, we can just specify the passed config table with the plugin without any need to wrap it in a invoking function.
For non-LunarVim users of Lazy.nvim, what is the preferred event =
on which to load this plugin?
Here I see:
event = { "FileReadPre", "BufReadPre", "User FileOpened" },
What is "User FileOpened"
? I searched but... no findey.
This plugin is useful for editing files.
But the preview window of telescope in nvim is often to use, and if the first file in the oldfiles list
is just a big file, it will get blocked.
So I hope the same features can also be disabled in the telescope preview.
I don't know if it is easy to implement, I just think this is very useful then post this issue.
Thank you!
This plugin works very well for frequently accessed large files.
Whether it could support disabling different features for different patterns? For example, I wanna disable treesitter
but keep lsp
enabled when I edit a C code file with over 10,000 lines. But for a file with more than 100,000 lines, it is more suitable to disable all features.
I'm not sure if this feature would complicate this plugin.
Thank you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.