【问题标题】:NeoVim vim-devicons are not loaded in Windows Terminal (PowerShell)NeoVim vim-devicons 未在 Windows 终端 (PowerShell) 中加载
【发布时间】:2020-08-10 22:27:43
【问题描述】:

我正在从 Windows Terminal Powershell 运行 Neovim (nvim),最近通过 vim-plug 安装了 vim-devicons。我注意到图标没有显示。在我的 Windows 终端配置中,我使用 Cascadia Code PL 显示 Oh-my-posh 和 posh-my-git 所需的字体,但是即使有明显有能力的字体 neovim 也不会显示它。但是,如果我打开 nvim-qt 它确实可以工作(也许它不包括自己的终端仿真器)。 有什么方法可以调整 neovim 中的配置以在 windows 终端中正确显示 vim-devicons?

这是我的 profile.json:

{
      // Make changes here to the powershell.exe profile
      "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
      "name": "Windows PowerShell",
      "commandline": "powershell.exe",
      "fontFace": "Cascadia Code PL",
      "fontSize": 9,
      "useAcrylic": true,
      "acrylicOpacity": 0.7,
      "backgroundImage": "ms-appdata:///roaming/midnight_smuggler_1280x720.jpg",
      "backgroundImageOpacity": 0.4,
      "colorScheme": "cyberpunk",
      "hidden": false
    },

还有我的本地 nvim 配置:

"Plugin Section
call plug#begin('~/.vim/plugged')
   Plug 'scrooloose/nerdtree'
   Plug 'ryanoasis/vim-devicons'
call plug#end()


"Config
set encoding=UTF-8
"set guifont=
let g:NERDTreeShowHidden = 1
let g:NERDTreeMinimalUI = 1
let g:NERDTreeIgnore = []
let g:NERDTreeStatusline = ''
" Automaticaly close nvim if NERDTree is only thing left open
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
" Toggle
 nnoremap <silent> <C-b> :NERDTreeToggle<CR>

【问题讨论】:

    标签: powershell neovim nerdtree


    【解决方案1】:

    刚刚发现我使用的是 Cascadia Code PL,它的字形刚好够 Oh-my-posh 使用,只是配置了 Delugia Nerd Font 和 Windows 终端显示图标。

    【讨论】:

      猜你喜欢
      • 2021-11-06
      • 2022-01-14
      • 2023-02-03
      • 2020-10-16
      • 1970-01-01
      • 1970-01-01
      • 2020-11-22
      • 2013-06-04
      • 1970-01-01
      相关资源
      最近更新 更多