Add lua, change shortcuts

This commit is contained in:
Devon Tingley 2022-03-24 21:27:32 -04:00
parent 12c5a4d2b5
commit 9ce46ee396
2 changed files with 23 additions and 9 deletions

View file

@ -1,3 +1,8 @@
{
"coc.preferences.formatOnSaveFiletypes": ["go"]
"coc.preferences.formatOnSaveFiletypes": ["go"],
"Lua.diagnostics.globals": [
"vim"
],
"Lua.telemetry.enable": true,
"sumneko-lua.enableNvimLuaDev": true
}

View file

@ -2,6 +2,7 @@ call plug#begin('~/.local/share/nvim/plugged')
Plug 'vim-airline/vim-airline'
Plug 'morhetz/gruvbox'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'mattn/emmet-vim'
call plug#end()
"Theme
@ -15,6 +16,8 @@ set scrolloff=10
tnoremap <Esc> <C-\><C-n>
command TMK w | call system("latexmk -pdf && latexmk -c")
command SHH set nonu norelativenumber scl=no
command NOSHH set nu relativenumber scl=auto
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm()
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
@ -31,19 +34,25 @@ let g:coc_global_extensions = [
\'coc-html',
\'coc-css',
\'coc-tsserver',
\'coc-flutter'
\'coc-flutter',
\'coc-sumneko-lua'
\]
" GoTo code navigation.
nmap <leader>def <Plug>(coc-definition)
nmap <leader>typedef <Plug>(coc-type-definition)
nmap <leader>impl <Plug>(coc-implementation)
nmap <leader>ref <Plug>(coc-references)
nmap <leader>gd <Plug>(coc-definition)
nmap <leader>gt <Plug>(coc-type-definition)
nmap <leader>gi <Plug>(coc-implementation)
nmap <leader>gr <Plug>(coc-references)
" Misc coc-commands
nmap <leader>rename <Plug>(coc-rename)
nmap <leader>help :CocDiagnostics<CR>
nmap <leader>git <Plug>(coc-git-commit)
nmap <leader>r <Plug>(coc-rename)
nmap <leader>R <Plug>(coc-refactor)
nmap <leader>h call CocActionAsync('definitionHover')
command Imports call CocActionAsync('organizeImport')
command GitDiff call CocActionAsync('runCommand', 'git.chunkInfo')
command GitUndo call CocActionASync('runCommand', 'git.chunkUndo')
command GitShow call CocActionAsync('runCommand', 'git.showCommit')
" Language Specific Settings
function! Golang_settings()