Comments (14)
vim.pretty_print as that is deprecated
Yeah, pretty printing is the old way of doing that. :=
and vim.print
are the new ways
I tried making a file foo.text rather that .txt the icon shows properly
My present ideas as to a cause are:
- It might due to an update (devicons, font, etc);
- Devicons allows icon overrides during
setup
(could either be causing it or fix it); ftdetect
issue (since since you said .text works)
Does this line show in Neovim properly? If so, that eliminates the notion that this is a font issue and makes it more likely to be a filetype error.
from barbar.nvim.
It seems this is an issue with nvim-web-devicons and not barbar.
I should have read this notice on its GitHub page:
Notice
Nerd fonts moved some symbols with version 3.0. Version 2.3 is meant for transition, supporting both version 2 and version 3 icons.
Nvim-web-devicons requires version 2.3 or above to work properly. If you are unable to update please use your plugin manager to pin version of nvim-web-dev icons to nerd-v2-compat tag.
Plug 'kyazdani42/nvim-web-devicons', { 'tag': 'nerd-v2-compat' }
solves the issue.
One way or another, you helped me track down where the issue lies. Thank you.
from barbar.nvim.
I wasn't able to reproduce. Does this icon appear when using nvim-web-devicons in other plugins?
from barbar.nvim.
I don't think I have any other plugins that use nvim-web-devicons.
I have NERDTree which uses another devicon plugin.
I tried removing that plugin to see if there is a conflict but that was not the issue.
from barbar.nvim.
Can you run this from a txt file and share the result?
require('nvim-web-devicons').get_icon_by_filetype(vim.api.nvim_get_option_value('filetype', {}))
(I'm on a phone so the syntax might not be 100% accurate, if it doesn't work I'll post a working version tomorrow)
from barbar.nvim.
Can you run this from a txt file and share the result?
require('nvim-web-devicons').get_icon_by_filetype(vim.api.nvim_get_option_value('filetype', {}))(I'm on a phone so the syntax might not be 100% accurate, if it doesn't work I'll post a working version tomorrow)
You mean open a text file and run the above as a vim commad?
from barbar.nvim.
Can you run this from a txt file and share the result?
require('nvim-web-devicons').get_icon_by_filetype(vim.api.nvim_get_option_value('filetype', {}))(I'm on a phone so the syntax might not be 100% accurate, if it doesn't work I'll post a working version tomorrow)
You mean open a text file and run the above as a vim commad?
Yeah; whenever a file is currently focused that has the bug from the screenshot.
You can do := some_lua_code_here
in recent Neovim versions for that.
Sorry for any confusion!
from barbar.nvim.
No worries, I hadn't included the = when running the command.
This doesn't do anything that I can see.
from barbar.nvim.
No worries, I hadn't included the = when running the command.
This doesn't do anything that I can see.
What version are you on? It might be necessary to do :lua vim.pretty_print(expression_goes_here)
instead.
Alternatively, checking :messages
might reveal the output
from barbar.nvim.
Version:
NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1702233742
I tried the above, first it warned me to use vim.print instead of vim.pretty_print as that is deprecated. The output was
from barbar.nvim.
I tried making a file foo.text rather that .txt the icon shows properly.
Not sure why it doesn't work with .txt.
Also, I'm quite sure this is recent. I don't remember seeing this before.
from barbar.nvim.
It does not. Shows the same box as in barbar
from barbar.nvim.
I'm able to get the icon working properly with:
require'nvim-web-devicons'.setup { override_by_extension = { ["txt"] = { icon = "", color = "#81e043", name = "txt" } }; }
in init.vim
from barbar.nvim.
Happy to help!
from barbar.nvim.
Related Issues (20)
- Closing a term buffer with BufferClose errors requiring a ! to override HOT 3
- Support centering & coloring the offset text HOT 2
- Add highlight for the pin icon HOT 4
- Hiding the tabline on my start screen HOT 4
- Quit when calling BufferClose for single tab HOT 5
- Error: notfound key underdouble HOT 1
- [QUESTION]: Group windows inside a single tab? HOT 2
- Closing buffers very quicky causes consistent UI glitch for barbar.nvim HOT 6
- Highlight colors inconsistent between buffers HOT 3
- Can't get BufferPickDelete working HOT 4
- Buffer ordering not preserved neither in sessions nor with tabs HOT 5
- Buffer order lost when using tiagovla/scope.nvim HOT 2
- A new tab created when opening terminal HOT 5
- Feature "Unique names when filenames match" only works for the second file (repeatable) HOT 3
- Separators missing after opening sidebar HOT 1
- Feature request: order by buffer name HOT 4
- Sidebar filetype not working properly with Neotree HOT 4
- vim.tbl_add_reverse_lookup is deprecated :help deprecated. This feature will be removed in Nvim version 0.12 HOT 2
- Inactive buffer separator still visualize when disable separator HOT 5
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 barbar.nvim.