powershell - NeoVim vim-devicons 未在 Windows 终端 (PowerShell) 中加载
问题描述
我正在从 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>
解决方案
刚刚发现我使用的是 Cascadia Code PL,它只有足够的字形用于 Oh-my-posh,只是配置了 Delugia Nerd Font 和 Windows 终端显示图标。
推荐阅读
- javascript - 为什么下一个以前的这个脚本不起作用?
- ios - 信息 plist 写入权限描述的问题,在构建时忽略
- swift - 为从 firebase 数据库读取的 swift 函数添加闭包
- angular - 可以使用 NgRx 存储在 Angular 2 中使用字符串参数调用 store.dispatch 方法
- vue.js - 在我的路线中使用 Vue'x getter 时“state.user 为空”
- c# - 如何使用 Fake It Easy 对假方法进行参数验证
- c - 如何在C中的函数内动态分配结构数组
- php - PHP - 一维数组中的所有排列,结果在数组中
- arrays - 如何找到 SAS 数据集中所有数值变量的均值和标准差
- python - PANDAS:在不同的 DF 中相乘时得到 NaN