From 6b4cfa3d5958d4662a9e46b013b5ed5976332165 Mon Sep 17 00:00:00 2001 From: ray-x Date: Sun, 12 Jun 2022 08:39:23 +1000 Subject: [PATCH] symbol layout update --- lua/navigator.lua | 3 ++- lua/navigator/symbols.lua | 4 ++-- lua/navigator/treesitter.lua | 4 ++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lua/navigator.lua b/lua/navigator.lua index 13cd7c2..f8499f7 100755 --- a/lua/navigator.lua +++ b/lua/navigator.lua @@ -32,7 +32,7 @@ _NgConfigValues = { lsp_signature_help = true, -- if you would like to hook ray-x/lsp_signature plugin in navigator -- setup here. if it is nil, navigator will not init signature help signature_help_cfg = { debug = false }, -- if you would like to init ray-x/lsp_signature plugin in navigator, pass in signature help - ctags = {cmd='ctags', tagfile='.tags'}, + ctags = { cmd = 'ctags', tagfile = '.tags' }, lsp = { code_action = { enable = true, @@ -111,6 +111,7 @@ _NgConfigValues = { field = '🏈', }, treesitter_defult = '🌲', + doc_symbols = '', }, } diff --git a/lua/navigator/symbols.lua b/lua/navigator/symbols.lua index 92c4e35..0ea683e 100644 --- a/lua/navigator/symbols.lua +++ b/lua/navigator/symbols.lua @@ -98,7 +98,7 @@ M.document_symbol_handler = function(err, result, ctx) end end end - + local ft = vim.api.nvim_buf_get_option(bufnr, 'ft') gui.new_list_view({ items = locations, @@ -107,7 +107,7 @@ M.document_symbol_handler = function(err, result, ctx) height = 0.62, preview_height = 0.1, ft = ft, - api = ' ', + api = _NgConfigValues.icons.doc_symbol, }) end diff --git a/lua/navigator/treesitter.lua b/lua/navigator/treesitter.lua index 74e7c61..b8b2e4d 100644 --- a/lua/navigator/treesitter.lua +++ b/lua/navigator/treesitter.lua @@ -501,6 +501,8 @@ function M.buf_ts() prompt = true, ft = ft, rawdata = true, + height = 0.62, + preview_height = 0.12, width = width + 10, api = _NgConfigValues.icons.treesitter_defult, }) @@ -538,6 +540,8 @@ function M.bufs_ts() items = ts_opened, prompt = true, ft = ft, + height = 0.62, + preview_height = 0.12, width = max_length + 10, api = _NgConfigValues.icons.treesitter_defult, })