nvim: Diagnostic updates
This commit is contained in:
parent
911b2da642
commit
3aac7457ee
7 changed files with 26 additions and 35 deletions
|
@ -5,13 +5,15 @@
|
|||
lsp-format (require :lsp-format)]
|
||||
(fn mod.setup []
|
||||
(vim.diagnostic.config {:underline true
|
||||
:virtual_text {:source false}
|
||||
:signs false
|
||||
:update_in_insert false})
|
||||
(cmd "sign define DiagnosticSignError text= texthl=DiagnosticSignError linehl= numhl=DiagnosticSignError")
|
||||
(cmd "sign define DiagnosticSignWarn text= texthl=DiagnosticSignWarn linehl= numhl=DiagnosticSignWarn")
|
||||
(cmd "sign define DiagnosticSignInfo text= texthl=DiagnosticSignInfo linehl= numhl=DiagnosticSignInfo")
|
||||
(cmd "sign define DiagnosticSignHint text= texthl=DiagnosticSignHint linehl= numhl=DiagnosticSignHint"))
|
||||
:virtual_text false
|
||||
:signs true
|
||||
:float {:border :rounded}
|
||||
:update_in_insert false
|
||||
:severity_sort true})
|
||||
(cmd "sign define DiagnosticSignError text= texthl=DiagnosticSignError linehl= numhl=DiagnosticSignError")
|
||||
(cmd "sign define DiagnosticSignWarn text= texthl=DiagnosticSignWarn linehl= numhl=DiagnosticSignWarn")
|
||||
(cmd "sign define DiagnosticSignInfo text= texthl=DiagnosticSignInfo linehl= numhl=DiagnosticSignInfo")
|
||||
(cmd "sign define DiagnosticSignHint text= texthl=DiagnosticSignHint linehl= numhl=DiagnosticSignHint"))
|
||||
|
||||
(fn mod.maybe-enable-lsp [client bufnr]
|
||||
(when (= vim.b.nifoc_lsp_enabled nil)
|
||||
|
|
|
@ -115,24 +115,22 @@
|
|||
#(telescope-builtin.lsp_document_symbols telescope-dropdown)
|
||||
{:description "LSP Document Symbols"
|
||||
:opts {:buffer bufnr}})
|
||||
(map-entry :<leader>ldd
|
||||
"<cmd>TroubleToggle document_diagnostics<CR>"
|
||||
(map-entry :<leader>ld
|
||||
#(telescope-builtin.diagnostics (vim.tbl_extend :keep
|
||||
telescope-ivy
|
||||
{:bufnr 0}))
|
||||
{:description "LSP Document Diagnostics"
|
||||
:opts {:buffer bufnr}})
|
||||
(map-entry :<leader>ldw
|
||||
"<cmd>TroubleToggle workspace_diagnostics<CR>"
|
||||
{:description "LSP Workspace Diagnostics"
|
||||
:opts {:buffer bufnr}})
|
||||
(map-entry :<leader>lca
|
||||
#(telescope-builtin.lsp_code_actions telescope-dropdown)
|
||||
{:description "LSP Code Action"
|
||||
:opts {:buffer bufnr}})
|
||||
(map-entry :<leader>lfr
|
||||
"<cmd>TroubleToggle lsp_references<CR>"
|
||||
#(telescope-builtin.lsp_references telescope-dropdown)
|
||||
{:description "Find References"
|
||||
:opts {:buffer bufnr}})
|
||||
(map-entry :<leader>lfd
|
||||
"<cmd>TroubleToggle lsp_definitions<CR>"
|
||||
#(telescope-builtin.lsp_definitions telescope-dropdown)
|
||||
{:description "Find Definitions"
|
||||
:opts {:buffer bufnr}})
|
||||
(map-entry :K vim.lsp.buf.hover
|
||||
|
|
3
config/nvim/plugins/dracula.fnl
Normal file
3
config/nvim/plugins/dracula.fnl
Normal file
|
@ -0,0 +1,3 @@
|
|||
(let [g vim.g
|
||||
cmd vim.cmd]
|
||||
(set g.dracula_show_end_of_buffer false))
|
|
@ -8,12 +8,12 @@
|
|||
:sections {; Left
|
||||
:lualine_a [:mode]
|
||||
:lualine_b ["b:gitsigns_status"
|
||||
[:diagnostics
|
||||
{:sources [:nvim_diagnostic]
|
||||
:symbols {:error " "
|
||||
:warn " "
|
||||
:info " "
|
||||
:hint " "}}]]
|
||||
{1 :diagnostics
|
||||
:sources [:nvim_diagnostic]
|
||||
:symbols {:error " "
|
||||
:warn " "
|
||||
:info " "
|
||||
:hint " "}}]
|
||||
:lualine_c [ns.current-function]
|
||||
; Right
|
||||
:lualine_x [:filetype
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
(let [trouble (require :trouble)]
|
||||
(trouble.setup {:action_keys {:previous :<Up> :next :<Down>}
|
||||
:use_diagnostic_signs true}))
|
|
@ -1,7 +1,7 @@
|
|||
(let [visual-eof (require :visual-eof)]
|
||||
(visual-eof.setup {:text_EOL "↵"
|
||||
:text_NOEOL "✗↵"
|
||||
:ft_ng [:git.* :LspTrouble :netrw :TelescopePrompt]
|
||||
:ft_ng [:git.* :netrw :TelescopePrompt]
|
||||
:buf_filter (lambda [bufnr]
|
||||
(let [disable_buftypes [:terminal :nofile]
|
||||
buftype (vim.api.nvim_buf_get_option bufnr
|
||||
|
|
|
@ -100,10 +100,7 @@ in
|
|||
# Themes
|
||||
{
|
||||
plugin = dracula-nvim;
|
||||
config = ''
|
||||
(let [g vim.g]
|
||||
(set g.dracula_show_end_of_buffer false))
|
||||
'';
|
||||
config = builtins.readFile ../../config/nvim/plugins/dracula.fnl;
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
|
@ -275,12 +272,6 @@ in
|
|||
}
|
||||
|
||||
# LSP
|
||||
{
|
||||
plugin = trouble-nvim;
|
||||
config = builtins.readFile ../../config/nvim/plugins/trouble.fnl;
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
lspkind-nvim
|
||||
lsp-status-nvim
|
||||
|
||||
|
|
Loading…
Reference in a new issue