Skip to content

Files inside directory not intended #1

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

Closed
meain opened this issue Mar 4, 2020 · 12 comments
Closed

Files inside directory not intended #1

meain opened this issue Mar 4, 2020 · 12 comments

Comments

@meain
Copy link

meain commented Mar 4, 2020

screenshot

If you see, the files inside lib is rendered along with lib.
I think this might only happens without icons, not sure though.

@kyazdani42
Copy link
Member

i'm gonna take a look, formatting might be badly handled without the vim-devicons package

@kyazdani42
Copy link
Member

I cannot reproduce, can you specify your environment ? (os, terminal, $TERM variable)

@meain
Copy link
Author

meain commented Mar 4, 2020

OS: macOS 10.13.6
terminal: alacritty
TERM: screen256-color
tmux: 3.0a
nvim: v0.5.0-36d1335

@kyazdani42
Copy link
Member

i use alacritty with tmux on linux. When i tested on macos with tmux and iterm it worked fine too.
Maybe your font is the culprit, i'll try something that don't support unicode and see if it happens.
Which font did you specify in your alacritty.yml ?

@meain
Copy link
Author

meain commented Mar 4, 2020

I was using CamingoCode in that screenshot. I tried it out with other fonts too.
I don't think it is because of the font because it works fine for folders.

Also I tried it with a font that has some icons, and it seems that only folders have icons assigned. I do not have WebDevIconsGetFileTypeSymbol thing. This is just my font icons, I think. If you see, there is nothing that gets displayed for files, only for folders. Maybe something related to that?

@meain
Copy link
Author

meain commented Mar 4, 2020

It seems to work fine with this, but the git highlight for files is broken

diff --git a/lua/lib/format.lua b/lua/lib/format.lua
index 9bf5ddb..7588d2f 100644
--- a/lua/lib/format.lua
+++ b/lua/lib/format.lua
@@ -19,7 +19,7 @@ local function default_icons(_, isdir, open)
         return " "
     end
 
-    return ""
+    return "  "
 end
 
 local function create_matcher(arr)

@kyazdani42
Copy link
Member

kyazdani42 commented Mar 4, 2020

Hum yes i tried to find a font that doesn't display folders but i didn't find one. Its because i display folders without the WebDevIconsGetFileTypeSymbol so if your font doesnt have it it might cause weird stuff.
The issue is that these icons takes 3/4 bytes so the UI highlighting is a little hard to do dynamically.
Would making an option for displaying glyphs solve this ?

@meain
Copy link
Author

meain commented Mar 4, 2020

Yeah, I guess having an option to disable glyphs should work.

@kyazdani42
Copy link
Member

ok it's fixed now.
You should be able to specify g:lua_tree_show_folders=0 and g:lua_tree_show_git_icons=0

@meain
Copy link
Author

meain commented Mar 4, 2020

Coo, that seems to work. Thanks for the plugin!

@meain
Copy link
Author

meain commented Mar 4, 2020

I think something like lua_tree_show_icons or lua_tree_show_glyphs might be a better a name for the variable though.

@kyazdani42
Copy link
Member

I'll think about a proper way to do this. Specifying an object should be more appropriate

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

No branches or pull requests

2 participants