项目作者: kristijanhusak

项目描述 :
Filetype icons for https://github.com/Shougo/defx.nvim
高级语言: Vim script
项目地址: git://github.com/kristijanhusak/defx-icons.git
创建时间: 2018-11-22T22:31:31Z
项目社区:https://github.com/kristijanhusak/defx-icons

开源协议:MIT License

下载


Defx icons

Custom implementation of vim-devicons for defx.nvim.

screenshot from 2018-11-22 23-39-41

Usage

  1. :Defx -columns=icons:indent:filename:type

This column is a replacement for mark column. It will properly highlight selected files.

Configuration

This is the default configuration:

  1. let g:defx_icons_enable_syntax_highlight = 1
  2. let g:defx_icons_column_length = 1
  3. let g:defx_icons_directory_icon = ''
  4. let g:defx_icons_mark_icon = '*'
  5. let g:defx_icons_copy_icon = ''
  6. let g:defx_icons_link_icon = ''
  7. let g:defx_icons_move_icon = ''
  8. let g:defx_icons_parent_icon = ''
  9. let g:defx_icons_default_icon = ''
  10. let g:defx_icons_directory_symlink_icon = ''
  11. " Options below are applicable only when using "tree" feature
  12. let g:defx_icons_root_opened_tree_icon = ''
  13. let g:defx_icons_nested_opened_tree_icon = ''
  14. let g:defx_icons_nested_closed_tree_icon = ''

Note: Syntax highlighting can cause some performance issues in defx window. Just disable it with the let g:defx_icons_enable_syntax_highlight = 0

Override colors

If you want to override some of the colors, you can do it this way:

For gui:

  1. let g:defx_icons_gui_colors = {
  2. \ 'red': 'FFFFFF'
  3. \ }

For term:

  1. let g:defx_icons_term_colors = {
  2. \ 'red': 2
  3. \ }

For directory icons these highlight groups are defined:

  1. hi default link DefxIconsMarkIcon Statement
  2. hi default link DefxIconsCopyIcon WarningMsg
  3. hi default link DefxIconsLinkIcon WarningMsg
  4. hi default link DefxIconsMoveIcon ErrorMsg
  5. hi default link DefxIconsDirectory Directory
  6. hi default link DefxIconsParentDirectory Directory
  7. hi default link DefxIconsSymlinkDirectory Directory
  8. hi default link DefxIconsOpenedTreeIcon Directory
  9. hi default link DefxIconsNestedTreeIcon Directory
  10. hi default link DefxIconsClosedTreeIcon Directory

For example, to change color of the directory icon when it’s opened in tree to red color, you would do something like this:

  1. hi DefxIconsOpenedTreeIcon guifg=#FF0000

Or link it to something else that you want:

  1. hi link DefxIconsOpenedTreeIcon Error

Thanks to