Add lua, change shortcuts
This commit is contained in:
parent
12c5a4d2b5
commit
9ce46ee396
2 changed files with 23 additions and 9 deletions
|
@ -1,3 +1,8 @@
|
||||||
{
|
{
|
||||||
"coc.preferences.formatOnSaveFiletypes": ["go"]
|
"coc.preferences.formatOnSaveFiletypes": ["go"],
|
||||||
|
"Lua.diagnostics.globals": [
|
||||||
|
"vim"
|
||||||
|
],
|
||||||
|
"Lua.telemetry.enable": true,
|
||||||
|
"sumneko-lua.enableNvimLuaDev": true
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ call plug#begin('~/.local/share/nvim/plugged')
|
||||||
Plug 'vim-airline/vim-airline'
|
Plug 'vim-airline/vim-airline'
|
||||||
Plug 'morhetz/gruvbox'
|
Plug 'morhetz/gruvbox'
|
||||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||||
|
Plug 'mattn/emmet-vim'
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
"Theme
|
"Theme
|
||||||
|
@ -15,6 +16,8 @@ set scrolloff=10
|
||||||
|
|
||||||
tnoremap <Esc> <C-\><C-n>
|
tnoremap <Esc> <C-\><C-n>
|
||||||
command TMK w | call system("latexmk -pdf && latexmk -c")
|
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()
|
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm()
|
||||||
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
|
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
|
||||||
|
@ -31,19 +34,25 @@ let g:coc_global_extensions = [
|
||||||
\'coc-html',
|
\'coc-html',
|
||||||
\'coc-css',
|
\'coc-css',
|
||||||
\'coc-tsserver',
|
\'coc-tsserver',
|
||||||
\'coc-flutter'
|
\'coc-flutter',
|
||||||
|
\'coc-sumneko-lua'
|
||||||
\]
|
\]
|
||||||
|
|
||||||
" GoTo code navigation.
|
" GoTo code navigation.
|
||||||
nmap <leader>def <Plug>(coc-definition)
|
nmap <leader>gd <Plug>(coc-definition)
|
||||||
nmap <leader>typedef <Plug>(coc-type-definition)
|
nmap <leader>gt <Plug>(coc-type-definition)
|
||||||
nmap <leader>impl <Plug>(coc-implementation)
|
nmap <leader>gi <Plug>(coc-implementation)
|
||||||
nmap <leader>ref <Plug>(coc-references)
|
nmap <leader>gr <Plug>(coc-references)
|
||||||
|
|
||||||
" Misc coc-commands
|
" Misc coc-commands
|
||||||
nmap <leader>rename <Plug>(coc-rename)
|
nmap <leader>r <Plug>(coc-rename)
|
||||||
nmap <leader>help :CocDiagnostics<CR>
|
nmap <leader>R <Plug>(coc-refactor)
|
||||||
nmap <leader>git <Plug>(coc-git-commit)
|
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
|
" Language Specific Settings
|
||||||
function! Golang_settings()
|
function! Golang_settings()
|
||||||
|
|
Loading…
Reference in a new issue