Created
July 24, 2022 18:39
-
-
Save Aomitsu/5b848a01039c3a03187681ee2d1fee17 to your computer and use it in GitHub Desktop.
My nvim config
This file contains 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
" yeah, very bad config file I'know | |
set nocompatible | |
filetype off | |
set encoding=utf-8 | |
call plug#begin() | |
"For fun lmao | |
Plug 'github/copilot.vim' | |
Plug 'andweeb/presence.nvim' | |
"Essentials | |
Plug 'preservim/nerdtree' | |
Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
Plug 'dense-analysis/ale' | |
Plug 'vim-airline/vim-airline' | |
Plug 'vim-airline/vim-airline-themes' | |
Plug 'Pocco81/AutoSave.nvim' | |
"Rust | |
Plug 'rust-lang/rust.vim' | |
call plug#end() | |
let g:presence_neovim_image_text = "J'aime le sexe" | |
let g:auto_save = 1 | |
let g:rustfmt_autosave = 1 | |
let g:rustfmt_emit_files = 1 | |
let g:rustfmt_fail_silently = 0 | |
inoremap <silent><expr> <TAB> | |
\ pumvisible() ? "\<C-n>" : | |
\ <SID>check_back_space() ? "\<TAB>" : | |
\ coc#refresh() | |
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>" | |
function! s:check_back_space() abort | |
let col = col('.') - 1 | |
return !col || getline('.')[col - 1] =~# '\s' | |
endfunction | |
if has('nvim') | |
inoremap <silent><expr> <c-space> coc#refresh() | |
else | |
inoremap <silent><expr> <c-@> coc#refresh() | |
endif | |
nmap <silent> gd <Plug>(coc-definition) | |
nmap <silent> gy <Plug>(coc-type-definition) | |
nmap <silent> gi <Plug>(coc-implementation) | |
nmap <silent> gr <Plug>(coc-references) | |
lua << EOF | |
local autosave = require("autosave") | |
autosave.setup( | |
{ | |
enabled = true, | |
execution_message = "AutoSave: saved at " .. vim.fn.strftime("%H:%M:%S"), | |
events = {"InsertLeave", "TextChanged"}, | |
conditions = { | |
exists = true, | |
filename_is_not = {}, | |
filetype_is_not = {}, | |
modifiable = true | |
}, | |
write_all_buffers = false, | |
on_off_commands = true, | |
clean_command_line_interval = 0, | |
debounce_delay = 135 | |
} | |
) | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment