Created
October 8, 2021 20:52
-
-
Save lexaone/6cd17b2eb97b707f98943d3054e0b3c2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set nocompatible " disable compatibility to old-time vi | |
| set showmatch " show matching brackets. | |
| "set ignorecase " case insensitive matching | |
| set mouse=v " middle-click paste with mouse | |
| set hlsearch " highlight search results | |
| set tabstop=4 " number of columns occupied by a tab character | |
| set softtabstop=4 " see multiple spaces as tabstops so <BS> does the right thing | |
| set expandtab " converts tabs to white space | |
| set shiftwidth=4 " width for autoindents | |
| set autoindent " indent a new line the same amount as the line just typed | |
| set number " add line numbers | |
| set wildmode=longest,list " get bash-like tab completions | |
| set cc=80 " set an 80 column border for good coding style | |
| filetype plugin indent on " allows auto-indenting depending on file type | |
| syntax on " syntax highlighting | |
| " *****vim-plug config | |
| " !!!! please don't forget to use :PlugInstall or :PlugUpdate command!!! | |
| "vim-plug autoinstall | |
| let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim' | |
| if empty(glob(data_dir . '/autoload/plug.vim')) | |
| silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' | |
| autocmd VimEnter * PlugInstall --sync | source $MYVIMRC | |
| endif | |
| " Specify a directory for plugins | |
| " - For Neovim: stdpath('data') . '/plugged' | |
| " - Avoid using standard Vim directory names like 'plugin' | |
| call plug#begin('~/.vim/plugged') | |
| "this is the directory, where all plugins are located | |
| " Make sure you use single quotes | |
| Plug 'vim-airline/vim-airline' | |
| Plug 'vim-airline/vim-airline-themes' | |
| Plug 'ziglang/zig.vim' | |
| Plug 'mattn/vim-gist' | |
| Plug 'mattn/webapi-vim' | |
| Plug 'neovim/nvim-lspconfig' | |
| Plug 'hrsh7th/cmp-nvim-lsp' | |
| Plug 'hrsh7th/cmp-buffer' | |
| Plug 'hrsh7th/nvim-cmp' | |
| Plug 'hrsh7th/nvim-cmp' | |
| Plug 'yamatsum/nvim-cursorline' | |
| Plug 'lukas-reineke/indent-blankline.nvim' | |
| " Initialize plugin system | |
| call plug#end() | |
| "don't forget to use PlugInstall to download all plugins! | |
| " ******airline config | |
| let g:airline_theme='angr' | |
| let g:airline#extensions#tabline#formatter = 'unique_tail' | |
| "let g:airline#extensions#tagbar#enabled = 0 | |
| let g:cursorline_timeout=2000 | |
| " ****** nvim-lspconfig config | |
| "lua << EOF | |
| "--require'lspconfig'.zls.setup{}" | |
| "EOF | |
| " **** cmp config | |
| set completeopt=menu,menuone,noselect | |
| lua <<EOF | |
| -- Setup nvim-cmp. | |
| local cmp = require'cmp' | |
| cmp.setup{ | |
| mapping = { | |
| ['<Tab>'] = cmp.mapping.select_next_item(), | |
| ['<S-Tab>'] = cmp.mapping.select_prev_item(), | |
| ['<CR>'] = cmp.mapping.confirm({ | |
| behavior = cmp.ConfirmBehavior.Replace, | |
| select = true, | |
| }) | |
| }, | |
| sources = { | |
| name = 'nvim_lsp' , | |
| } | |
| } | |
| -- Setup lspconfig. | |
| require('lspconfig').zls.setup { | |
| capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()) | |
| } | |
| --indent-blankline.nvim' setup: | |
| vim.opt.list = true | |
| -- vim.opt.listchars:append("space:⋅") | |
| require("indent_blankline").setup { | |
| buftype_exclude = {"terminal"}, | |
| } | |
| EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
my init.vim - initial config for nvim