aboutsummaryrefslogtreecommitdiffstats
path: root/vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim')
-rw-r--r--vim/vimrc-sept24128
1 files changed, 108 insertions, 20 deletions
diff --git a/vim/vimrc-sept24 b/vim/vimrc-sept24
index d202f0e..e0706b6 100644
--- a/vim/vimrc-sept24
+++ b/vim/vimrc-sept24
@@ -106,6 +106,7 @@ set ttyfast
set exrc
set nocuc
set secure
+set updatetime=300 " https://github.com/neoclide/coc.nvim
set scrolloff=1
set history=799
set encoding=utf-8
@@ -147,7 +148,8 @@ set shortmess+=c
set tags+=./tags
set background=dark
set completeopt=menuone,longest
-set omnifunc=syntaxcomplete#Complete
+"set omnifunc=syntaxcomplete#Complete
+set omnifunc=ale#completion#OmniFunc
"
" Folding
if has('folding')
@@ -175,10 +177,7 @@ nnoremap <C-n> :Fern -drawer .<CR> <C-w>l
call plug#begin()
"Plug 'vim-scripts/AutoComplPop'
Plug 'mattn/emmet-vim',
-Plug 'lambdalisue/fern.vim',
-Plug 'tpope/vim-rails',
" Plug 'ycm-core/YouCompleteMe'
-Plug 'vim-ruby/vim-ruby',
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'ayu-theme/ayu-vim'
@@ -186,7 +185,7 @@ Plug 'airblade/vim-tailwind'
Plug 'vim-perl/vim-perl', { 'for': 'perl', 'do': 'make clean carp dancer highlight-all-pragmas moose test-more try-tiny' }
Plug 'morhetz/gruvbox'
Plug 'eemed/sitruuna.vim'
-" Plug 'sheerun/vim-polyglot'
+Plug 'sheerun/vim-polyglot'
Plug 'preservim/vim-markdown'
Plug 'mhinz/vim-signify'
Plug 'vim-test/vim-test'
@@ -200,20 +199,109 @@ Plug 'tpope/vim-fugitive'
Plug 'SirVer/UltiSnips'
Plug 'honza/vim-snippets'
Plug 'dense-analysis/ale'
+" Plug 'neoclide/coc.nvim', {'branch': 'release'}
+"Plug 'gergap/vim-ollama'
call plug#end()
-"
-" Snippets
-" Trigger configuration. You need to change this to something other than
-"<tab> if you use one of the following:
-" - https://github.com/Valloric/YouCompleteMe
-" - https://github.com/nvim-lua/completion-nvim
-let g:UltiSnipsExpandTrigger="<C-y>"
-"let g:UltiSnipsExpandTrigger="<S-t>"
-let g:UltiSnipsJumpForwardTrigger="<S-f>"
-let g:UltiSnipsJumpBackwardTrigger="<S-b>"
-let g:ycm_key_list_select_completion=[]
-let g:ycm_key_list_previous_completion=[]
+
+" " New CoC stuff.... https://github.com/neoclide/coc.nvim
+
+" " Use `[g` and `]g` to navigate diagnostics
+" " Use `:CocDiagnostics` to get all diagnostics of current buffer in location list
+" nmap <silent> [g <Plug>(coc-diagnostic-prev)
+" nmap <silent> ]g <Plug>(coc-diagnostic-next)
+
+" " GoTo code navigation
+" 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)
+
+" " Use K to show documentation in preview window
+" nnoremap <silent> K :call ShowDocumentation()<CR>
+
+" function! ShowDocumentation()
+" if CocAction('hasProvider', 'hover')
+" call CocActionAsync('doHover')
+" else
+" call feedkeys('K', 'in')
+" endif
+" endfunction
+
+" " Highlight the symbol and its references when holding the cursor
+" autocmd CursorHold * silent call CocActionAsync('highlight')
+
+" " Formatting selected code
+" xmap <leader>f <Plug>(coc-format-selected)
+" nmap <leader>f <Plug>(coc-format-selected)
+
+" " Remap keys for applying code actions at the cursor position
+" nmap <leader>ac <Plug>(coc-codeaction-cursor)
+" " Remap keys for apply code actions affect whole buffer
+" nmap <leader>as <Plug>(coc-codeaction-source)
+" " Apply the most preferred quickfix action to fix diagnostic on the current line
+" nmap <leader>qf <Plug>(coc-fix-current)
+
+" " Remap keys for applying refactor code actions
+" nmap <silent> <leader>re <Plug>(coc-codeaction-refactor)
+" xmap <silent> <leader>r <Plug>(coc-codeaction-refactor-selected)
+" nmap <silent> <leader>r <Plug>(coc-codeaction-refactor-selected)
+
+" " Run the Code Lens action on the current line
+" nmap <leader>cl <Plug>(coc-codelens-action)
+
+" " Remap <C-f> and <C-b> to scroll float windows/popups
+" if has('nvim-0.4.0') || has('patch-8.2.0750')
+" nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
+" nnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
+" inoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>"
+" inoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>"
+" vnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
+" vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
+" endif
+
+" " Add `:Format` command to format current buffer
+" command! -nargs=0 Format :call CocActionAsync('format')
+
+" " Add `:OR` command for organize imports of the current buffer
+" command! -nargs=0 OR :call CocActionAsync('runCommand', 'editor.action.organizeImport')
+
+" " END OF COC
+"
+"" vim-ollama
+"" Default chat model
+"let g:ollama_chat_model = 'llama3.1'
"
+"" Codellama models
+""let g:ollama_model = 'codellama:13b-code'
+"" let g:ollama_model = 'codellama:7b-code'
+"" let g:ollama_model = 'codellama:code'
+"
+"" Codegemma (small and fast)
+"let g:ollama_model = 'codegemma:latest'
+"" let g:ollama_model = 'codegemma:2b'
+"let g:ollama_fim_prefix = '<|fim_prefix|>'
+"let g:ollama_fim_middle = '<|fim_middle|>'
+"let g:ollama_fim_suffix = '<|fim_suffix|>'
+"
+"" Deepseek-coder-v2
+""let g:ollama_model = 'deepseek-coder-v2:16b-lite-base-q4_0'
+"" let g:ollama_fim_prefix = '<|fim▁begin|>'
+"" let g:ollama_fim_suffix = '<|fim▁hole|>'
+"" let g:ollama_fim_middle = '<|fim▁end|>'
+"
+""
+"" Snippets
+"" Trigger configuration. You need to change this to something other than
+""<tab> if you use one of the following:
+"" - https://github.com/Valloric/YouCompleteMe
+"" - https://github.com/nvim-lua/completion-nvim
+"let g:UltiSnipsExpandTrigger="<C-y>"
+""let g:UltiSnipsExpandTrigger="<S-t>"
+"let g:UltiSnipsJumpForwardTrigger="<S-f>"
+"let g:UltiSnipsJumpBackwardTrigger="<S-b>"
+"let g:ycm_key_list_select_completion=[]
+"let g:ycm_key_list_previous_completion=[]
+""
"
" emmet
" being very explicit, which is not required
@@ -261,7 +349,7 @@ let g:ale_open_list = 0
let g:ale_set_highlights = 1
let g:ale_set_signs = 1
let g:ale_set_loclist = 1
-let g:ale_set_quickfix = 1
+let g:ale_set_quickfix = 0
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'ALE Error'
let g:ale_echo_msg_format = 'ALE: %linter% - %code: %%s'
@@ -407,9 +495,9 @@ let g:gruvbox_invert_signs = 0
let g:gruvbox_italic = 0
"colorscheme evening
-"colorscheme sitruuna
+colorscheme sitruuna
"colorscheme ayu
-colorscheme evening
+"colorscheme evening
"colorscheme gruvbox
"
" GPG files