From 42281b986481e6d17ca64e6f7a31c6d99459d68b Mon Sep 17 00:00:00 2001 From: justanothercatgirl Date: Sat, 28 Oct 2023 08:55:14 +0000 Subject: moving to NvChad --- .config/nvim.old/coc-settings.json | 13 ++++++ .config/nvim.old/init.vim | 86 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 .config/nvim.old/coc-settings.json create mode 100644 .config/nvim.old/init.vim diff --git a/.config/nvim.old/coc-settings.json b/.config/nvim.old/coc-settings.json new file mode 100644 index 0000000..e2621cd --- /dev/null +++ b/.config/nvim.old/coc-settings.json @@ -0,0 +1,13 @@ +{ + "languageserver" : { + "haskell": { + "command": "haskell-language-server-wrapper", + "args": ["--lsp"], + "rootPatterns": ["*.cabal", "stack.yaml", "cabal.project", "package.yaml", "hie.yaml"], + "filetypes": ["hs", "haskell", "lhaskell"], + "settings": { + + } + } + } +} diff --git a/.config/nvim.old/init.vim b/.config/nvim.old/init.vim new file mode 100644 index 0000000..b0f7eb4 --- /dev/null +++ b/.config/nvim.old/init.vim @@ -0,0 +1,86 @@ +set number +:set autoindent +:set tabstop=8 +:set shiftwidth=4 "this sets tabulation width! +:set smarttab +:set nowrap + +let g:python3_host_prog = '~/.config/nvim/python3/bin/python' +" let g:python_host_prog = '/usr/bin/python' + +call plug#begin() + +Plug 'https://github.com/vim-airline/vim-airline' " status bar +Plug 'https://github.com/preservim/nerdtree' " file manager +Plug 'https://github.com/tpope/vim-surround' " cs\"' (cnahge surroundings) +Plug 'https://github.com/tpope/vim-commentary' " comment and uncomment +Plug 'https://github.com/rafi/awesome-vim-colorschemes' " themes, basically +Plug 'https://github.com/ryanoasis/vim-devicons' " icons for some plugins????? +Plug 'https://github.com/terryma/vim-multiple-cursors' " this is gonna be tough to learn... +" Plug 'ycm-core/YouCompleteMe' " autocompletion (REQUIRES PYTHON3 VENV) +Plug 'neoclide/coc.nvim', {'branch': 'release'} " Language-server +call plug#end() + +set nobackup +set nowritebackup +set updatetime=420 + +cmap w!! w !sudo tee % > /dev/null + +nnoremap :NERDTreeFocus +inoremap + \ coc#pum#visible() ? coc#pum#next(1) : + \ CheckBackspace() ? "\" : + \ coc#refresh() +inoremap coc#pum#visible() ? coc#pum#confirm() + \: "u\=coc#on_enter()\" + +function! CheckBackspace() abort + let col = col('.') - 1 + return !col || getline('.')[col - 1] =~# '\s' +endfunction + +inoremap coc#refresh() +nmap [g (coc-diagnostic-prev) +nmap ]g (coc-diagnostic-next) + +nmap gd (coc-definition) +nmap gy (coc-type-definition) +nmap gi (coc-implementation) +nmap gr (coc-references) + +nnoremap K :call ShowDocumentation() + +function! ShowDocumentation() + if CocAction('hasProvider', 'hover') + call CocActionAsync('doHover') + else + call feedkeys('K', 'in') + endif +endfunction + +autocmd CursorHold * silent call CocActionAsync('highlight') +nmap rn (coc-rename) + +set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')} + +" Mappings for CoCList +" Show all diagnostics +nnoremap a :CocList diagnostics +" Manage extensions +nnoremap e :CocList extensions +" Show commands +nnoremap c :CocList commands +" Find symbol of current document +nnoremap o :CocList outline +" Search workspace symbols +nnoremap s :CocList -I symbols +" Do default action for next item +nnoremap j :CocNext +" Do default action for previous item +nnoremap k :CocPrev +" Resume latest coc list +nnoremap p :CocListResume + +:colo evening + -- cgit v1.2.3-70-g09d2