Split diagnostic configuration to separate file
This commit is contained in:
parent
a68558e4ae
commit
87f05c5d83
4 changed files with 15 additions and 8 deletions
|
|
@ -123,3 +123,6 @@
|
|||
|
||||
- src: 'templates/nvim/lua/formatting.lua.j2'
|
||||
dest: '{{ xdg_config_dir }}/nvim/lua/formatting.lua'
|
||||
|
||||
- src: 'templates/nvim/lua/diagnostic.lua.j2'
|
||||
dest: '{{ xdg_config_dir }}/nvim/lua/diagnostic.lua'
|
||||
|
|
|
|||
|
|
@ -12,3 +12,4 @@ require('_nvim-tree')
|
|||
require('lua-line')
|
||||
require('_source-link')
|
||||
require('formatting')
|
||||
require('diagnostic')
|
||||
|
|
|
|||
11
templates/nvim/lua/diagnostic.lua.j2
Normal file
11
templates/nvim/lua/diagnostic.lua.j2
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
-- {{ ansible_managed }}
|
||||
|
||||
vim.diagnostic.config {
|
||||
float = {
|
||||
suffix = function(diagnostic)
|
||||
return (' %s | [%s]'):format(diagnostic.code, diagnostic.source)
|
||||
end
|
||||
},
|
||||
|
||||
virtual_text = { current_line = true }
|
||||
}
|
||||
|
|
@ -186,11 +186,3 @@ cmp.setup {
|
|||
end,
|
||||
},
|
||||
}
|
||||
|
||||
vim.diagnostic.config {
|
||||
float = {
|
||||
suffix = function(diagnostic)
|
||||
return (' %s | [%s]'):format(diagnostic.code, diagnostic.source)
|
||||
end
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue