Move lsp/diagnostic UI config to separate file
This commit is contained in:
parent
e11b4d54a2
commit
e5e2453efb
@ -128,20 +128,6 @@ return {
|
||||
})
|
||||
require("cmp_git").setup({})
|
||||
|
||||
-- Customise LSP UI
|
||||
vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(
|
||||
vim.lsp.handlers.hover, {
|
||||
border = 'rounded',
|
||||
title = 'Hover',
|
||||
}
|
||||
)
|
||||
vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(
|
||||
vim.lsp.handlers.signature_help, {
|
||||
border = 'rounded',
|
||||
title = 'Signature Help',
|
||||
}
|
||||
)
|
||||
|
||||
-- Mappings created when LSP is attached to a buffer
|
||||
local augroup = vim.api.nvim_create_augroup('lsp', { clear = true })
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
|
@ -11,13 +11,6 @@ return {
|
||||
require('trouble').toggle()
|
||||
end, { remap = false })
|
||||
|
||||
vim.diagnostic.config({
|
||||
float = {
|
||||
border = 'rounded', -- Enable rounded border on floats
|
||||
},
|
||||
virtual_text = false, -- Disable trailing virtual text
|
||||
})
|
||||
|
||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { remap = false })
|
||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { remap = false })
|
||||
vim.keymap.set('n', '<leader>sd', vim.diagnostic.open_float, { remap = false })
|
||||
|
21
lua/ui.lua
Normal file
21
lua/ui.lua
Normal file
@ -0,0 +1,21 @@
|
||||
-- Customise LSP UI
|
||||
vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(
|
||||
vim.lsp.handlers.hover, {
|
||||
border = 'rounded',
|
||||
title = 'Hover',
|
||||
}
|
||||
)
|
||||
vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(
|
||||
vim.lsp.handlers.signature_help, {
|
||||
border = 'rounded',
|
||||
title = 'Signature Help',
|
||||
}
|
||||
)
|
||||
|
||||
-- Customise diagnostic UI
|
||||
vim.diagnostic.config({
|
||||
float = {
|
||||
border = 'rounded',
|
||||
},
|
||||
virtual_text = false,
|
||||
})
|
Loading…
x
Reference in New Issue
Block a user