diff --git a/README.md b/README.md index 76da6e0..b78c62f 100644 --- a/README.md +++ b/README.md @@ -10,12 +10,14 @@ Easy code navigation. - fzy search with Lua-JIT - Better navigation for diagnostic errors, Navigate through files that contain errors/warnings - Group references/implementation/incomming/outgoing based on file names. -- Nerdfont for LSP kind +- Nerdfont, emoji for LSP kind, # Why a new plugin After installed a handful of lsp plugins, I still got ~500 loc for lsp and still increasing. Reason is that I need -to tune the plugins to fit my requirements. +to tune the plugins to fit my requirements. The plugin help user setup lspconfig with only a few lines of codes. +Seconde reason is that lots of plugins serve as an enhance version of quickfix, lots of improvement was made by +[lspsaga](https://github.com/glepnir/lspsaga.nvim), from which, the plugin was inspired. # Similar projects / special mentions: @@ -28,7 +30,7 @@ to tune the plugins to fit my requirements. # Install You can remove your lspconfig setup and use this plugin. -The plugin depends on [guihua.lua](https://github.com/ray-x/guihua.lua), which provides gui and fzy support. +The plugin depends on [guihua.lua](https://github.com/ray-x/guihua.lua), which provides GUI and fzy support. ```vim Plug 'ray-x/guihua.lua', {'do': 'cd lua/fzy && make' } diff --git a/lua/navigator/diagnostics.lua b/lua/navigator/diagnostics.lua index 44c3ed5..410ff5d 100644 --- a/lua/navigator/diagnostics.lua +++ b/lua/navigator/diagnostics.lua @@ -75,7 +75,7 @@ M.show_diagnostic = function() end log(display_items) if #display_items > 0 then - gui.new_list_view({items = display_items, api = 'Diagnostic'}) + gui.new_list_view({items = display_items, api = 'β›‘ Diagnostic'}) end end end diff --git a/lua/navigator/gui.lua b/lua/navigator/gui.lua index 1d79eeb..2211910 100644 --- a/lua/navigator/gui.lua +++ b/lua/navigator/gui.lua @@ -40,7 +40,8 @@ function M._preview_location(opts) --location, width, pos_x, pos_y -- local range = opts.location.targetRange or opts.location.range - local contents = api.nvim_buf_get_lines(bufnr, range.start.line, range["end"].line + 10, false) + if range.start == nil then print('error invalid range') return end + local contents = api.nvim_buf_get_lines(bufnr, range.start.line, (range["end"].line or 1) + 10, false) -- local syntax = api.nvim_buf_get_option(bufnr, "syntax") diff --git a/lua/navigator/lspclient/lspkind.lua b/lua/navigator/lspclient/lspkind.lua index 9c01e9c..dbe87f9 100644 --- a/lua/navigator/lspclient/lspkind.lua +++ b/lua/navigator/lspclient/lspkind.lua @@ -29,8 +29,8 @@ local kind_symbols = { local CompletionItemKind = { "οžƒ ", - "Ζ’ ", - "ο‚š ", + "𝔉 ", + "β“• ", " ", "ο΄² ", "ξž› ", @@ -40,7 +40,7 @@ local CompletionItemKind = { " ", "ο‘΅ ", " ", - "δΊ†", + "𝕰 ", "ο … ", "﬌ ", " ",