Comments (3)
Hmm, yes the current binary buffer detection is not too sophisticated (the correct way would be to lookup magic bytes but that's a bit too computationally expensive and requires file streaming for it to be feasible)
As for your issue I believe your files aren't utf8 encoded which trips up hex.nvim into thinking it's binary.
You could disable the utf8 check by setting the following in the configs
is_file_binary_post_read = function() return false end
from hex.nvim.
Hi, thanks for that!
Here's what I have now, but unfortunately, it is still happening (commenting it out I can open the file as text, but with all of the below it opens up w/ xxd etc)
{
'RaafatTurki/hex.nvim',
config = true,
is_file_binary_pre_read = function() return false end,
is_file_binary_post_read = function() return false end
},
I've attached a file which exhibits the issue for me.
rebound.txt
from hex.nvim.
Ahaa, as I suspected it's not utf8.
You seem to be using lazy to manage your plugins, you should put the options in an opts
table like so:
you only need the
post_read
hook disabled since that's the one that does the utf8 check
{
'RaafatTurki/hex.nvim',
config = true,
opts = {
is_file_binary_post_read = function() return false end
}
},
I've tried it on your file and it works.
from hex.nvim.
Related Issues (16)
- media issue
- wierd string at first load HOT 2
- Hex breaks Oil HOT 1
- not seem to work HOT 5
- Writing binary is no longer executable HOT 4
- Not an editor command: LspStop HOT 5
- Add install inscructions for vim plugged HOT 2
- Trouble opening windows executables HOT 6
- vim.lsp.buf.server_ready is deprecated :help deprecated This feature will be removed in Nvim version 0.10.0 HOT 1
- Disable automatic detection for certain filetypes HOT 3
- DAP UI integration? HOT 5
- Error detected | using Blob as a String HOT 1
- Confusing editor behavior HOT 5
- Binary Executable breaks on Write Back HOT 3
- Invalid plugin spec HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hex.nvim.