added a mapping for automatic curly bracket expansion
This commit is contained in:
parent
2b04ed80ec
commit
ec7601c7b7
2
after/ftplugin/c.vim
Normal file
2
after/ftplugin/c.vim
Normal file
|
@ -0,0 +1,2 @@
|
|||
" This enables the fancy automatic curly brackets.
|
||||
let g:AutoInsertBracket_enable = 1
|
2
after/ftplugin/cpp.vim
Normal file
2
after/ftplugin/cpp.vim
Normal file
|
@ -0,0 +1,2 @@
|
|||
" This enables the fancy automatic curly brackets.
|
||||
let g:AutoInsertBracket_enable = 1
|
37
init.vim
37
init.vim
|
@ -85,10 +85,16 @@ Plug 'chrisbra/unicode.vim'
|
|||
" Color schemes.
|
||||
Plug 'tomasr/molokai'
|
||||
Plug 'bluz71/vim-moonfly-colors'
|
||||
Plug 'bluz71/vim-nightfly-guicolors'
|
||||
Plug 'sainnhe/sonokai'
|
||||
|
||||
" This is for snippets.
|
||||
Plug 'SirVer/ultisnips'
|
||||
|
||||
" Treesitter seems to be a reall nice
|
||||
" plugin for code highlighting.
|
||||
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
||||
|
||||
call plug#end()
|
||||
|
||||
"===================== Language Server Configuration ===========================
|
||||
|
@ -159,6 +165,22 @@ let g:completion_enable_snippet = 'UltiSnips'
|
|||
" Use completion-nvim in every buffer
|
||||
autocmd BufEnter * lua require'completion'.on_attach()
|
||||
|
||||
" This function and mapping is basically related
|
||||
" to autocompletion as well.
|
||||
" It automatically maps a single bracket to the
|
||||
" GNU-style formatted bracket.
|
||||
let g:AutoInsertBracket_enable = 0
|
||||
|
||||
function! AutoInsertBracket()
|
||||
if g:AutoInsertBracket_enable
|
||||
return "{\n}\<Esc>O"
|
||||
else
|
||||
return "{"
|
||||
endif
|
||||
endfunction
|
||||
inoremap <expr> { AutoInsertBracket()
|
||||
|
||||
|
||||
|
||||
"========================== A Nice Color Scheme ================================
|
||||
"===============================================================================
|
||||
|
@ -167,9 +189,24 @@ autocmd BufEnter * lua require'completion'.on_attach()
|
|||
"let g:airline_theme='one'
|
||||
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
|
||||
set termguicolors
|
||||
" This is for sonokai, a rather nice
|
||||
" color scheme.
|
||||
"let g:sonokai_style = 'atlantis'
|
||||
"let g:sonokai_enable_italic = 0
|
||||
"let g:sonokai_disable_italic_comment = 0
|
||||
colorscheme molokai
|
||||
|
||||
"=================== Settings Related to Highlighting ==========================
|
||||
"===============================================================================
|
||||
|
||||
let g:vimsyn_embed= 'l'
|
||||
|
||||
|
||||
"==================== Settings Related to Treesitter ===========================
|
||||
"===============================================================================
|
||||
|
||||
" Install the language parsers.
|
||||
"TSInstall python
|
||||
"TSInstall c
|
||||
"TSInstall cpp
|
||||
"TSInstall bash
|
||||
|
|
Loading…
Reference in New Issue
Block a user