mirror of
https://gitlab.com/baco/dotconf.git
synced 2024-06-14 12:16:37 +00:00
Dionisio E Alonso
53a663ec59
According to the README of the project, the transparent configuration (among other settings) got migrated and this syntax is the newly adopted.
114 lines
2.8 KiB
VimL
114 lines
2.8 KiB
VimL
" Baco's Neovim init file
|
|
|
|
" Some defaults to start with
|
|
runtime! defaults.vim
|
|
if !has('vms') && has('persistent_undo')
|
|
set undofile " keep an undo file (undo changes after closing)
|
|
endif
|
|
|
|
" Essentials
|
|
set number
|
|
set relativenumber
|
|
set cursorline
|
|
set tabstop=4 shiftwidth=4
|
|
set softtabstop=4 " If not 0, must coincide with "tabstop" for tabs indentation
|
|
" and with "shiftwidth" for spaces indentation
|
|
|
|
set list listchars=tab:→ ,trail:·
|
|
let &colorcolumn = join(range(80+1, 256), ',')
|
|
|
|
set clipboard+=unnamed,unnamedplus
|
|
vmap <LeftRelease> ygv
|
|
|
|
set switchbuf+=usetab,newtab
|
|
|
|
" Coding Styles
|
|
if has('autocmd')
|
|
" Restore some :filetype defaults overrided by setting ts, sw and sts
|
|
autocmd FileType c setlocal tabstop=8 shiftwidth=8 softtabstop=0
|
|
|
|
" Ensure spelling is loaded when writting text. Also start insert
|
|
augroup GitStuff
|
|
autocmd!
|
|
autocmd FileType gitcommit setlocal spell nonumber norelativenumber
|
|
autocmd FileType gitcommit startinsert
|
|
augroup END
|
|
endif
|
|
|
|
" Extras
|
|
let g:vimsyn_embed = 'Pl'
|
|
let g:indentLine_char = '⦙'
|
|
let g:indentLine_leadingSpaceChar = '·'
|
|
let g:indentLine_leadingSpaceEnabled = v:true
|
|
|
|
runtime! lsp_client_settings.vim
|
|
|
|
if has('autocmd')
|
|
augroup TerminalStuff
|
|
autocmd!
|
|
autocmd TermOpen * startinsert
|
|
autocmd TermOpen * setlocal nonumber norelativenumber
|
|
autocmd BufEnter * if &buftype == 'terminal' | :startinsert | endif
|
|
autocmd TermClose * call feedkeys('\<cr>')
|
|
augroup END
|
|
endif
|
|
command -nargs=? Terminal rightbelow 16split +terminal\ <args>
|
|
nnoremap <silent> <leader>tt :rightbelow 16split +terminal<cr>
|
|
tnoremap <Esc> <C-\><C-n><C-w>p
|
|
|
|
" Theming
|
|
let g:aldmeris_transparent = v:true
|
|
let g:aldmeris_termcolors = 'tango'
|
|
|
|
let g:onedark_config = {'transparent': v:true}
|
|
let g:onedark_terminal_italics = v:true
|
|
|
|
" onedark.vim override: Don't set a background color when running in a
|
|
" terminal; just use the terminal's background color
|
|
if has('autocmd') && !has('gui_running')
|
|
augroup colorset
|
|
autocmd!
|
|
autocmd ColorScheme onedark silent!
|
|
\ call onedark#extend_highlight('Normal', {'bg': {'gui': 'NONE'}})
|
|
augroup END
|
|
endif
|
|
|
|
silent! colorscheme onedark
|
|
|
|
if exists('g:colors_name') && g:colors_name == 'onedark'
|
|
if has('termguicolors')
|
|
set termguicolors
|
|
endif
|
|
endif
|
|
|
|
" Misc
|
|
let g:airline#extensions#tabline#enabled = v:true
|
|
let g:airline#extensions#tabline#buffer_min_count = 2
|
|
let g:airline_mode_map = {
|
|
\ '__': '-',
|
|
\ 'n': 'N',
|
|
\ 'i': 'I',
|
|
\ 'R': 'R',
|
|
\ 'c': 'C',
|
|
\ 'v': 'V',
|
|
\ 'V': 'V-L',
|
|
\ '': 'V',
|
|
\ 's': 'S',
|
|
\ }
|
|
let g:airline#extensions#tagbar#flags = 'f' " Requires majutsushi/tagbar plugin
|
|
|
|
lua <<EOF
|
|
require'nvim-treesitter.configs'.setup {
|
|
highlight = {
|
|
enable = true
|
|
},
|
|
incremental_selection = {
|
|
enable = true
|
|
},
|
|
indent = {
|
|
enable = true,
|
|
},
|
|
ensure_installed = { "python", "rust", "go", "c", "cpp" }
|
|
}
|
|
EOF
|