Skip to content

Commit

Permalink
diagnostics fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fedemengo committed Feb 1, 2024
1 parent 74ba876 commit 2d3dda8
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
7 changes: 6 additions & 1 deletion fnl/core.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
{:group g
:pattern "fennel,lisp"
:command "setlocal lisp iskeyword-=_ iskeyword-=."})
(vim.api.nvim_create_autocmd :FileType
{:group g
:pattern "make"
:command "setlocal iskeyword+=-"})

;; <cr> enters command mode everywhere except in quickfix
(vim.api.nvim_create_autocmd :BufEnter
{:group g
Expand Down Expand Up @@ -105,7 +110,7 @@
(set vim.o.incsearch true)
(set vim.o.ignorecase true)
(set vim.o.smartcase true)
(set vim.o.cmdheight 0)
;(set vim.o.cmdheight 0)

(let [indent 4]
(set vim.o.shiftwidth indent)
Expand Down
24 changes: 16 additions & 8 deletions fnl/mods/tools/telescope.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
:case_mode :smart_case}}})

(telescope.load_extension :fzf)
(telescope.load_extension :make)

(local fuzzy_search_opts {:shorten_path true
:only_sort_text true
Expand All @@ -81,9 +82,10 @@
(themes.get_ivy {:borderchars {:prompt ["─" "" "" "" "─" "─" "" ""]
:results [""]
:preview ["" "" "" "" "" "" "" ""]}
:preview_width 0.65
:layout_config {:height height}
:preview_title ""}))
:shorten_path true
:preview_width 0.65
:layout_config {:height height}}))
;:preview_title ""}))

(local ivy_config (gen_ivy_config 0.7))
(local small_ivy_config (gen_ivy_config 0.3))
Expand Down Expand Up @@ -157,11 +159,17 @@
(map [:n] :gd themed_bufnr_lsp_defs {:desc "Definitions [LSP]"})
(map [:n] :fd (bindf builtin.diagnostics (merge-table {:sort_by :severity :line_width 10}
(deep-copy ivy_config))) {:desc :Diagnostics})
(map [:n] :fe (bindf builtin.diagnostics (merge-table {:sort_by :severity
:severity :error
:line_width 10
:prompt_title "Workspace Errors"}
(deep-copy ivy_config))) {:desc "Diagnostics [ERR]"})

(fn diagnostics-opts []
{:sort_by :severity
:severity :error
:line_width 10
:path_display {:shorten 3}
:dynamic_preview_title true
:prompt_title "Workspace Errors"})

(map [:n] :fe (bindf builtin.diagnostics (merge-table (diagnostics-opts)
ivy_config)) {:desc "Diagnostics [ERR]"})

(var pickers (require :telescope.pickers))
(var finders (require :telescope.finders))
Expand Down
2 changes: 2 additions & 0 deletions fnl/plugins.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@
:stevearc/profile.nvim {:mod :dev.profile}
:ruifm/gitlinker.nvim {:requires [[:nvim-lua/plenary.nvim]] :mod :dev.gitlinker}
:RRethy/vim-illuminate {}
:sopa0/telescope-makefile {:requires [[:akinsho/toggleterm.nvim]]}
;; utils
;:nvim-tree/nvim-tree.lua {:mod :tools.nvim-tree}
:wellle/targets.vim {}
:folke/which-key.nvim {:mod :tools.which-key}
:folke/trouble.nvim {:mod :tools.trouble}
:nvim-telescope/telescope-fzf-native.nvim {:run :make}
:nvim-telescope/telescope.nvim {:requires [[:nvim-lua/popup.nvim] [:nvim-lua/plenary.nvim]] :mod :tools.telescope}
:kevinhwang91/nvim-hlslens {:mod :ui.hlslens}
Expand Down

0 comments on commit 2d3dda8

Please sign in to comment.