diff options
| author | Robert Günzler <r@gnzler.io> | 2021-02-20 21:27:26 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2021-04-26 02:09:43 +0200 |
| commit | 1996ef15613f2d4773017128bba1a719a1b63a19 (patch) | |
| tree | aa291b56947f0f710c96c62758990de3b2939bba /.vim/lua/conf/diagnostic.lua | |
| parent | 30451238df36d238fea816f01ca987853c6562a5 (diff) | |
Move to lua based vimrc
Diffstat (limited to '.vim/lua/conf/diagnostic.lua')
| -rw-r--r-- | .vim/lua/conf/diagnostic.lua | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/.vim/lua/conf/diagnostic.lua b/.vim/lua/conf/diagnostic.lua index 4fd5047..fe80fff 100644 --- a/.vim/lua/conf/diagnostic.lua +++ b/.vim/lua/conf/diagnostic.lua @@ -1,9 +1,12 @@ -vim.g.diagnostic_enable_virtual_text = 1 -vim.g.diagnostic_trimmed_virtual_text = '40' -vim.g.diagnostic_insert_delay = 1 -vim.api.nvim_command('nnoremap <silent> c[ <cmd>PrevDiagnosticCycle<cr>') -vim.api.nvim_command('nnoremap <silent> c] <cmd>NextDiagnosticCycle<cr>') +local g = vim.g +local cmd = vim.api.nvim_command + +g.diagnostic_enable_virtual_text = 1 +g.diagnostic_trimmed_virtual_text = '40' +g.diagnostic_insert_delay = 1 +cmd('nnoremap <silent> c[ <cmd>PrevDiagnosticCycle<cr>') +cmd('nnoremap <silent> c] <cmd>NextDiagnosticCycle<cr>') vim.fn.sign_define("LspDiagnosticsErrorSign", {text="✘", texthl="LspDiagnosticsError"}) @@ -11,7 +14,7 @@ vim.fn.sign_define("LspDiagnosticsWarningSign", {text="‼", texthl="LspDiagnost vim.fn.sign_define("LspDiagnosticsInformationSign", {text="i", texthl="LspDiagnosticsInformation"}) vim.fn.sign_define("LspDiagnosticsHintSign", {text="☛",texthl="LspDiagnosticsHint"}) -vim.api.nvim_command('highlight link LspDiagnosticsError Error') -vim.api.nvim_command('highlight link LspDiagnosticsWarning WarningMsg') -vim.api.nvim_command('highlight link LspDiagnosticsInformation Todo') -vim.api.nvim_command('highlight link LspDiagnosticsHint Question') +cmd('highlight link LspDiagnosticsError Error') +cmd('highlight link LspDiagnosticsWarning WarningMsg') +cmd('highlight link LspDiagnosticsInformation Todo') +cmd('highlight link LspDiagnosticsHint Question') |