call plug#begin('C:\nvim-win64\nvim-win64\share\nvim\plugged')
Plug 'navarasu/onedark.nvim'
Plug 'pablopunk/native-sidebar.vim'
Plug 'ncm2/ncm2'
Plug 'roxma/nvim-yarp'
Plug 'ncm2/ncm2-bufword'
Plug 'ncm2/ncm2-path'
Plug 'ncm2/ncm2-jedi'
call plug#end()
let g:onedark_config = {
\ 'style': 'warm',
\}
colorscheme onedark
autocmd BufEnter * call ncm2#enable_for_buffer()
" IMPORTANT: :help Ncm2PopupOpen for more information
set completeopt=noinsert,menuone,noselect
let g:native_sidebar_shortcut = '<c-t>'
set clipboard^=unnamed,unnamedplus
syntax on "syntax highlighting, see :help syntax
filetype plugin indent on "file type detection, see :help filetype
set number "display line number
set path+=** "improves searching, see :help path
set noswapfile "disable use of swap files
set wildmenu "completion menu
set backspace=indent,eol,start "ensure proper backspace functionality
set undodir=~/.cache/nvim/undo "undo ability will persist after exiting file
set undofile "see :help undodir and :help undofile
set incsearch "see results while search is being typed, see :help incsearch
set smartindent "auto indent on new lines, see :help smartindent
set ic "ignore case when searching
set expandtab "expanding tab to spaces
set tabstop=4 "setting tab to 4 columns
set shiftwidth=4 "setting tab to 4 columns
set softtabstop=4 "setting tab to 4 columns
set showmatch "display matching bracket or parenthesis
set hlsearch incsearch "highlight all pervious search pattern with incsearch
highlight ColorColumn ctermbg=9 "display ugly bright red bar at color column number
" Keybind Ctrl+l to clear search
nnoremap <C-l> :nohl<CR><C-l>:echo "Search Cleared"<CR>
" When python filetype is detected, F5 can be used to execute script
" autocmd FileType python nnoremap <buffer> <c-b> :<cr>:exec '!python' shellescape(expand('%:p'), 1)<cr>
nnoremap <C-B> :sp <CR> :term python % <CR>
nnoremap <C-W> :bd!<CR>
各位帮忙看看 这个是我抄的init.vim
原文链接:https://blog.csdn.net/zcxey2911/article/details/128777983
但是一直显示这个是怎么回事 而且不会自动补全代码 搞了两天了整不明白
【以下回答由 GPT 生成】
根据你提供的插件配置文件,一些可能导致安装失败的问题和解决方案如下:
插件管理器未正确安装: 检查是否已正确安装了插件管理器。您可以按照以下步骤安装并设置Vim-Plug作为插件管理器:
在你的终端或shell中输入以下命令来获取安装脚本:
curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
~/.config/nvim/init.vim
),添加以下内容:call plug#begin('~/.config/nvim/plugged')
call plug#end()
保存并关闭配置文件,然后重新启动nvim并再次尝试安装插件。
插件源地址无效或不可访问: 检查您的插件源地址是否正确,并确保您能够访问这些地址。您可以尝试在浏览器中打开插件地址,查看是否可以获取到插件文件。
nvim配置文件错误: 检查您的nvim配置文件中的语法错误或其他不符合nvim规范的问题。您可以尝试暂时取消所有插件的安装,只保留最基本的配置,并确保nvim可以正确启动。如果nvim可以正常启动,尝试逐个添加和安装插件,以确定是哪个插件导致了安装失败。
插件依赖问题: 插件可能依赖于其他软件或库。检查插件文档或说明,确认是否有必要的依赖项,并按照说明进行安装。例如,某些插件可能需要Python支持,因此您需要确保已正确安装Python,并且它与nvim兼容。
请注意,这些解决方案基于您提供的信息,可能不适用于所有情况。如果您仍然遇到问题,建议您查看nvim的错误日志以获取更多详细信息,或在相关论坛或社区中寻求帮助。