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