2021-04-19 02:56:32 +00:00
# Navigator
2021-05-22 09:03:55 +00:00
- Easy code navigation, view diagnostic errors, see relationships of functions, variables
2021-04-19 02:56:32 +00:00
2021-06-14 09:42:50 +00:00
- A plugin combines the power of LSP and 🌲🏡 Treesitter together. Not only provids a better highlight but also help you analyse symbol context effectively.
2021-05-21 11:39:46 +00:00
2021-06-10 12:12:25 +00:00
Here are some examples
2021-05-21 11:39:46 +00:00
2021-06-10 12:12:25 +00:00
#### Example: Javascript closure
2021-05-22 05:34:46 +00:00
2021-05-22 09:03:55 +00:00
The following screenshot shows javascript call tree 🌲 of variable `browser` insides a closure. This feature is similar to incoming & outgoing calls from LSP. It is designed for the symbol analysis.
2021-07-17 02:34:07 +00:00
2021-07-17 02:41:06 +00:00
![navigator ](https://user-images.githubusercontent.com/1681295/126022829-291a7a2e-4d24-4fde-8293-5ae61562e67d.jpg )
2021-05-21 11:39:46 +00:00
2021-05-22 05:34:46 +00:00
Explanation:
- The first line of floating windows shows there are 3 references for the symbol < span style = "color:red" > *browser* </ span > in closure.js
2021-06-10 12:12:25 +00:00
- The first reference of browser is an assignment, an emoji 📝 indicates the value is changed in this line. In many
cases, we search for references to find out when the value changed.
2021-05-21 11:39:46 +00:00
- The second reference of `browser` is inside function `displayName` and `displayName` sit inside `makeFunc` , So you
will see ` displayName{} <- makeFunc{}`
- The third similar to the second, as var browser is on the right side of '=', the value not changed in this line
and emoji is not shown.
2021-08-23 12:17:47 +00:00
#### Example: C++ definition
2021-05-22 05:34:46 +00:00
2021-08-23 12:17:47 +00:00
C++ example: search reference and definition
2021-05-22 05:34:46 +00:00
![cpp_ref ](https://user-images.githubusercontent.com/1681295/119215215-8bd7a080-bb0f-11eb-82fc-8cdf1955e6e7.jpg )
2021-08-21 23:19:11 +00:00
You may find a 🦕 dinosaur(d) on the line of `Rectangle rect,` which means there is a definition (d for def) of rect in this line.
2021-08-23 12:17:47 +00:00
``< - f main ( ) ` ` means the definition is inside function main ( ) .
2021-05-22 05:34:46 +00:00
#### Golang struct type
2021-05-21 11:39:46 +00:00
Struct type references in multiple Go ﳑ files
![go_reference ](https://user-images.githubusercontent.com/1681295/119123823-54b3b180-ba73-11eb-8790-097601e10f6a.gif )
2021-06-10 12:12:25 +00:00
This feature can provide you info in which function/class/method the variable was referenced. It is handy for a large
2021-08-21 23:19:11 +00:00
project where class/function definition is too long to fit into the preview window. Also provides a bird's eye view of where the
variable is:
2021-05-22 05:34:46 +00:00
- Referenced
- Modified
- Defined
2021-06-10 12:12:25 +00:00
- Called
2021-05-10 12:17:30 +00:00
2021-04-19 02:56:32 +00:00
# Features:
2021-05-21 11:39:46 +00:00
- LSP easy setup. Support the most commonly used lsp clients setup. Dynamic lsp activation based on buffer type. This
2021-06-17 22:27:58 +00:00
also enables you to handle workspace with mixed types of codes (e.g. Go + javascript + yml). A better default setup is
included for LSP clients.
2021-05-21 11:39:46 +00:00
2021-05-05 19:58:15 +00:00
- Out of box experience. 10 lines of minimum vimrc can turn your neovim into a full-featured LSP & Treesitter powered IDE
2021-05-21 11:39:46 +00:00
2021-05-22 05:34:46 +00:00
- Unorthodox UI with floating windows, navigator provides a visual way to manage and navigate through symbols, diagnostic errors, reference etc. It covers
all features(handler) provided by LSP from commonly used search reference, to less commonly used search for interface
2021-05-21 11:39:46 +00:00
implementation.
2021-06-14 02:39:40 +00:00
- Edit your code in preview window
2021-04-26 11:45:45 +00:00
- Async request with lsp.buf_request for reference search
2021-05-21 11:39:46 +00:00
2021-06-10 12:12:25 +00:00
- Treesitter symbol search. It is handy for large files (Some of LSP e.g. sumneko_lua, there is a 100kb file size limitation?)
2021-05-21 11:39:46 +00:00
2021-05-08 04:54:37 +00:00
- FZY search with Lua-JIT
2021-05-21 11:39:46 +00:00
2021-09-01 05:25:11 +00:00
- LSP multiple symbol highlight/marker and hop between document references
2021-05-29 11:08:30 +00:00
2021-05-04 11:09:38 +00:00
- Better navigation for diagnostic errors, Navigate through all files/buffers that contain errors/warnings
2021-05-21 11:39:46 +00:00
- Grouping references/implementation/incoming/outgoing based on file names.
- Treesitter based variable/function context analysis. It is 10x times faster compared to purely rely on LSP. In most
of the case, it takes treesitter less than 4 ms to read and render all nodes for a file of 1,000 LOC.
2021-06-10 12:12:25 +00:00
- The first plugin, IMO, allows you to search in all treesitter symbols in the workspace.
2021-05-21 11:39:46 +00:00
2021-08-19 15:19:38 +00:00
- Nerdfont, emoji for LSP and treesitter kind
2021-04-19 02:56:32 +00:00
2021-05-21 11:39:46 +00:00
- Optimize display (remove trailing bracket/space), display the caller of reference, de-duplicate lsp results (e.g reference
in the same line). Using treesitter for file preview highlighter etc
2021-06-23 15:17:43 +00:00
- ccls call hierarchy (Non-standard `ccls/call` API) supports
2021-08-21 23:19:11 +00:00
- Syntax folding based on treesitter folding algorithm. (It behaves similar to vs-code)
- LSP Code Action, Code Lens, Code lens action
2021-08-19 15:19:38 +00:00
2021-08-29 07:35:46 +00:00
- LRU cache for treesitter nodes
2021-09-01 05:25:11 +00:00
- Lazy loader friendly
2021-04-19 02:56:32 +00:00
# Why a new plugin
2021-09-07 11:08:00 +00:00
I'd like to go beyond what the system is offering.
2021-04-19 02:56:32 +00:00
# Similar projects / special mentions:
- [nvim-lsputils ](https://github.com/RishabhRD/nvim-lsputils )
- [nvim-fzy ](https://github.com/mfussenegger/nvim-fzy.git )
- [fuzzy ](https://github.com/amirrezaask/fuzzy.nvim )
- [lspsaga ](https://github.com/glepnir/lspsaga.nvim )
2021-04-20 07:42:03 +00:00
- [fzf-lsp lsp with fzf as gui backend ](https://github.com/gfanto/fzf-lsp.nvim )
2021-05-21 11:39:46 +00:00
- [nvim-treesitter-textobjects ](https://github.com/nvim-treesitter/nvim-treesitter-textobjects )
2021-04-19 02:56:32 +00:00
# Install
2021-05-21 11:39:46 +00:00
Require nvim-0.5.0 (a.k.a nightly)
2021-04-19 02:56:32 +00:00
You can remove your lspconfig setup and use this plugin.
2021-05-21 11:39:46 +00:00
The plugin depends on lspconfig and [guihua.lua ](https://github.com/ray-x/guihua.lua ), which provides GUI and fzy support(migrate from [romgrk's project ](romgrk/fzy-lua-native )).
2021-04-19 02:56:32 +00:00
```vim
2021-05-09 23:58:13 +00:00
Plug 'neovim/nvim-lspconfig'
2021-04-19 02:56:32 +00:00
Plug 'ray-x/guihua.lua', {'do': 'cd lua/fzy & & make' }
Plug 'ray-x/navigator.lua'
```
2021-05-21 11:39:46 +00:00
Note: Highly recommened: 'nvim-treesitter/nvim-treesitter'
2021-04-19 02:56:32 +00:00
Packer
```lua
use {'ray-x/navigator.lua', requires = {'ray-x/guihua.lua', run = 'cd lua/fzy & & make'}}
```
## Setup
2021-06-10 12:12:25 +00:00
Easy setup **BOTH** lspconfig and navigator with one liner. Navigator covers around 20 most used LSP setup.
2021-05-02 13:54:30 +00:00
2021-04-19 02:56:32 +00:00
```lua
lua require'navigator'.setup()
```
2021-05-04 11:09:38 +00:00
## Sample vimrc turning your neovim into a full-featured IDE
2021-04-24 10:30:31 +00:00
```vim
call plug#begin('~/.vim/plugged')
Plug 'neovim/nvim-lspconfig'
Plug 'ray-x/guihua.lua', {'do': 'cd lua/fzy & & make' }
Plug 'ray-x/navigator.lua'
2021-05-04 11:09:38 +00:00
" Plug 'hrsh7th/nvim-compe' and other plugins you commenly use...
" optional, if you need treesitter symbol support
2021-04-25 10:25:53 +00:00
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
2021-04-24 10:30:31 +00:00
call plug#end()
2021-05-04 11:09:38 +00:00
" No need for rquire('lspconfig'), navigator will configure it for you
2021-04-24 10:30:31 +00:00
lua < < EOF
require'navigator'.setup()
EOF
2021-05-21 11:39:46 +00:00
```
You can remove your lspconfig.lua and use the hooks of navigator.lua. As the
navigator will bind keys and handler for you. The LSP will be loaded lazily based on filetype.
2021-06-10 12:12:25 +00:00
A treesitter only mode. In some cases LSP is buggy or not available, you can also use treesitter
2021-06-02 15:25:56 +00:00
standalone
```vim
call plug#begin('~/.vim/plugged')
Plug 'ray-x/guihua.lua', {'do': 'cd lua/fzy & & make' }
Plug 'ray-x/navigator.lua'
" Plug 'hrsh7th/nvim-compe' and other plugins you commenly use...
" optional, if you need treesitter symbol support
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
" optional:
Plug 'nvim-treesitter/nvim-treesitter-refactor' " this provides "go to def" etc
call plug#end()
lua < < EOF
require'navigator'.setup()
EOF
```
2021-05-21 11:39:46 +00:00
Nondefault configuration example:
```lua
2021-07-16 09:14:26 +00:00
require'navigator'.setup({
2021-08-18 01:25:28 +00:00
debug = false, -- log output, set to true and log path: ~/.local/share/nvim/gh.log
2021-05-21 11:39:46 +00:00
code_action_icon = " ",
2021-06-25 10:18:55 +00:00
width = 0.75, -- max width ratio (number of cols for the floating window) / (window width)
height = 0.3, -- max list window height, 0.3 by default
preview_height = 0.35, -- max height of preview windows
2021-06-15 23:51:57 +00:00
border = {"╭", "─", "╮", "│", "╯", "─", "╰", "│"}, -- border style, can be one of 'none', 'single', 'double',
-- 'shadow', or a list of chars which defines the border
2021-06-25 10:18:55 +00:00
on_attach = function(client, bufnr)
-- your hook
end,
2021-05-21 11:39:46 +00:00
-- put a on_attach of your own here, e.g
-- function(client, bufnr)
-- -- the on_attach will be called at end of navigator on_attach
-- end,
2021-05-23 04:10:49 +00:00
-- The attach code will apply to all LSP clients
2021-05-21 11:39:46 +00:00
2021-05-28 00:10:28 +00:00
default_mapping = true, -- set to false if you will remap every key
keymaps = {{key = "gK", func = "declaration()"}}, -- a list of key maps
2021-07-07 22:50:06 +00:00
-- this kepmap gK will override "gD" mapping function declaration() in default kepmap
-- please check mapping.lua for all keymaps
2021-05-22 05:34:46 +00:00
treesitter_analysis = true, -- treesitter variable context
2021-08-18 23:56:17 +00:00
transparency = 50, -- 0 ~ 100 blur the main window, 100: fully transparent, 0: opaque, set to nil or 100 to disable it
2021-05-21 11:39:46 +00:00
code_action_prompt = {enable = true, sign = true, sign_priority = 40, virtual_text = true},
2021-06-15 23:51:57 +00:00
icons = {
-- Code action
code_action_icon = " ",
-- Diagnostics
diagnostic_head = '🐛',
diagnostic_head_severity_1 = "🈲",
-- refer to lua/navigator.lua for more icons setups
2021-06-25 10:18:55 +00:00
},
2021-08-06 07:24:03 +00:00
lspinstall = false, -- set to true if you would like use the lsp installed by lspinstall
2021-05-21 11:39:46 +00:00
lsp = {
format_on_save = true, -- set to false to disasble lsp code format on save (if you are using prettier/efm/formater etc)
2021-08-21 23:19:11 +00:00
disable_format_ft = {"sqls", "sumneko_lua", "gopls"}, -- a list of lsp not enable auto-format (e.g. if you using efm or vim-codeformat etc), empty by default
disable_lsp = {'pylsd', 'sqlls'}, -- a list of lsp server disabled for your project, e.g. denols and tsserver you may
-- only want to enable one lsp server
2021-08-27 00:25:48 +00:00
-- to disable all default config and use your own lsp setup set
-- disable_lsp = 'all'
2021-08-23 23:17:20 +00:00
diagnostic_scroll_bar_sign = {'▃', '█'}, -- experimental: diagnostic status in scroll bar area; set to nil to disable the diagnostic sign,
2021-08-16 22:32:17 +00:00
-- for other style, set to {'╍', 'ﮆ'} or {'-', '='}
2021-08-23 23:17:20 +00:00
diagnostic_virtual_text = true, -- show virtual for diagnostic message
diagnostic_update_in_insert = false, -- update diagnostic message in insert mode
2021-08-12 02:25:15 +00:00
disply_diagnostic_qf = true, -- always show quickfix if there are diagnostic errors, set to false if you want to
ignore it
2021-05-21 11:39:46 +00:00
tsserver = {
filetypes = {'typescript'} -- disable javascript etc,
2021-06-17 22:50:49 +00:00
-- set to {} to disable the lspclient for all filetypes
2021-05-21 11:39:46 +00:00
},
gopls = { -- gopls setting
2021-05-23 04:10:49 +00:00
on_attach = function(client, bufnr) -- on_attach for gopls
-- your special on attach here
-- e.g. disable gopls format because a known issue https://github.com/golang/go/issues/45732
print("i am a hook, I will disable document format")
client.resolved_capabilities.document_formatting = false
end,
2021-05-21 11:39:46 +00:00
settings = {
gopls = {gofumpt = false} -- disable gofumpt etc,
}
2021-06-15 23:51:57 +00:00
},
sumneko_lua = {
sumneko_root_path = vim.fn.expand("$HOME") .. "/github/sumneko/lua-language-server",
sumneko_binary = vim.fn.expand("$HOME") .. "/github/sumneko/lua-language-server/bin/macOS/lua-language-server",
},
2021-05-21 11:39:46 +00:00
}
})
2021-05-22 05:34:46 +00:00
```
The plugin can work with multiple LSP, e.g sqls+gopls+efm. But there are cases you may need to disable some of the
servers. (Prevent loading multiple LSP for same source code.) e.g. I saw strange behaviours when I use pyls+pyright+pyls_ms
together. If you have multiple similar LSP installed and have trouble with the plugin, please enable only one at a time.
2021-07-19 23:32:09 +00:00
### Disable a lsp client loading from navigator
To disable a specific LSP, set `filetypes` to {} e.g.
2021-05-22 05:34:46 +00:00
2021-08-24 07:14:43 +00:00
```lua
2021-07-16 09:14:26 +00:00
require'navigator'.setup({
2021-05-22 05:34:46 +00:00
pyls={filetype={}}
})
2021-04-24 10:30:31 +00:00
```
2021-08-24 07:14:43 +00:00
Or:
```lua
require'navigator'.setup({
disable_lsp = {'pyls', 'sqlls'},
})
```
2021-06-10 12:12:25 +00:00
### Default keymaps
| mode | key | function |
|--- |--- |--- |
| n | gr | show reference and context |
| i | \<m-k\> | signature help |
2021-09-06 01:36:31 +00:00
| n | \<c-k\> | signature help |
2021-06-10 12:12:25 +00:00
| n | gW | workspace symbol |
| n | gD | declaration |
| n | g0 | document symbol |
2021-08-23 12:17:47 +00:00
| n | \<C-]\> | go to definition (if multiple show listview) |
| n | gp | definition |
2021-06-10 12:12:25 +00:00
| n | \<C-LeftMouse\> | definition|
| n | g\<LeftMouse\> | implementation|
| n | gT | treesitter document symbol |
2021-08-15 09:46:30 +00:00
| n | \<Leader\>gT | treesitter symbol for all open buffers |
2021-06-10 12:12:25 +00:00
| n | K | hover doc |
2021-07-08 02:30:49 +00:00
| n | \<Space\>ca | code action (when you see 💡 ) |
2021-08-30 21:38:34 +00:00
| n | \<Space\>la | code lens action (when you see a codelens indicator) |
2021-07-08 02:30:49 +00:00
| v | \<Space\>cA | range code action (when you see 💡 ) |
| n | \<Space\>rn | rename with floating window|
2021-06-17 22:27:58 +00:00
| n | \<Leader\>re | rename (lsp default)|
2021-06-10 12:12:25 +00:00
| n | \<Leader\>gi | incoming calls|
| n | \<Leader\>go | outgoing calls|
| n | gi | implementation |
2021-07-08 02:44:51 +00:00
| n | \<Sapce\> D | type definition |
2021-06-10 12:12:25 +00:00
| n | gL | show line diagnostic |
| n | gG | show diagnostic for all buffers |
| n | ]d | next diagnostic|
| n | [d | previous diagnostic|
| n | ]r | next treesitter reference/usage|
| n | [r | previous treesitter reference/usage|
2021-07-08 02:44:51 +00:00
| n | \<Sapce\> wa | add workspace folder|
| n | \<Sapce\> wr | remove workspace folder|
| n | \<Sapce\> wl | print workspace folder|
2021-06-10 12:12:25 +00:00
| n | \<Leader\>k | toggle reference highlight |
2021-06-11 11:33:22 +00:00
| i/n | \<C-p\> | previous item in list|
| i/n | \<C-n\> | next item in list|
2021-08-31 02:50:37 +00:00
| i/n | number 1~9 | move to ith row/item in the list|
2021-06-11 11:33:22 +00:00
| i/n | \<Up\> | previous item in list|
| i/n | \<Down\> | next item in list|
2021-09-01 05:25:11 +00:00
| n | \<Ctrl-w\>j | move cursor to preview (windows move to bottom view point)|
| n | \<Ctrl-w\>k | move cursor to list (windows move to up view point)|
2021-06-14 09:42:50 +00:00
| i/n | \<C-o\> | open preview file in nvim/Apply action|
| n | \<Enter\> | open preview file in nvim/Apply action|
| i/n | \<C-b\> | previous page in listview|
| i/n | \<C-f\> | next page in listview|
| i/n | \<C-s\> | save the modification to preview window to file|
2021-04-24 10:30:31 +00:00
2021-07-08 02:44:51 +00:00
2021-06-17 22:34:40 +00:00
### Colors/Highlight:
2021-05-24 10:20:28 +00:00
2021-06-17 22:34:40 +00:00
You can override default highlight GHListDark (listview) and GHTextViewDark (code view)
2021-05-24 10:20:28 +00:00
e.g.
```vim
hi default GHTextViewDark guifg=#e0d8f4 guibg=#332e55
hi default GHListDark guifg=#e0d8f4 guibg=#103234
```
2021-06-17 22:34:40 +00:00
There are other Lsp highlight been used in this plugin, e.g LspReferenceRead/Text/Write are used for document highlight,
LspDiagnosticsXXX are used for diagnostic. Please check highlight.lua and dochighlight.lua for more info.
2021-04-24 10:30:31 +00:00
2021-04-25 10:34:33 +00:00
## Dependency
2021-04-25 02:43:18 +00:00
- lspconfig
2021-04-25 10:34:33 +00:00
- guihua.lua (provides floating window, FZY)
2021-04-25 02:43:18 +00:00
- Optional:
2021-05-21 11:39:46 +00:00
- treesitter (list treesitter symbols, object analysis)
2021-05-04 11:09:38 +00:00
- lsp-signature (better signature help)
2021-04-25 02:43:18 +00:00
The plugin can be loaded lazily (packer `opt = true` ), And it will check if optional plugins existance and load those plugins only if they existed.
2021-05-22 05:34:46 +00:00
The terminal will need to be able to output nerdfont and emoji correctly. I am using Kitty with nerdfont (Victor Mono).
2021-05-05 00:23:40 +00:00
2021-08-09 15:09:53 +00:00
## Integration with lspinstall
If you'd like to only use the lsp servers installed by lspinstall. Please set
```lua
lspinstall = false
```
In the config
2021-04-19 03:09:32 +00:00
## Usage
2021-04-24 10:30:31 +00:00
Please refer to lua/navigator/lspclient/mapping.lua on key mappings. Should be able to work out-of-box.
- Use \<c-e\> or `:q!` to kill the floating window
2021-04-25 03:58:32 +00:00
- < up / down > (or \<c-n\>, \<c-p\>) to move
2021-05-22 05:34:46 +00:00
- \<c-o\> or \<CR\> to open location or apply code actions. Note: \<CR\> might be bound in insert mode by other plugins
2021-04-19 03:09:32 +00:00
2021-04-26 11:21:01 +00:00
## Configuration
2021-05-22 05:34:46 +00:00
In `navigator.lua` there is a default configuration. You can override the values by passing your own values
2021-04-26 11:21:01 +00:00
e.g
```lua
-- The attach will be call at end of navigator on_attach()
require'navigator'.setup({on_attach = function(client, bufnr) require 'illuminate'.on_attach(client)})
```
2021-06-02 15:25:56 +00:00
## Highlight
Highlight I am using:
* LspReferenceRead, LspReferenceText and LspReferenceWrite are used for `autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()`
2021-06-10 12:12:25 +00:00
That is where you saw the current symbol been highlighted.
2021-06-02 15:25:56 +00:00
* GHListDark and GHTextViewDark is used for floating listvew and TextView. They are be based on current background
(Normal) and PmenuSel
* In future, I will use NormalFloat for floating view. But ATM, most of colorscheme does not define NormalFloat
2021-06-10 12:12:25 +00:00
You can override the above highlight to fit your current colorscheme
2021-06-02 15:25:56 +00:00
2021-07-23 00:44:55 +00:00
## commands
| command | function |
|--- |--- |
| LspToggleFmt | toggle lsp auto format |
2021-04-19 02:56:32 +00:00
## Screenshots
2021-04-25 10:34:33 +00:00
colorscheme: [aurora ](https://github.com/ray-x/aurora )
2021-04-24 10:30:31 +00:00
2021-04-19 02:56:32 +00:00
### Reference
2021-05-22 05:34:46 +00:00
Pls check the first part of README
2021-05-08 04:54:37 +00:00
2021-04-20 22:25:31 +00:00
### Document Symbol
![document symbol ](https://github.com/ray-x/files/blob/master/img/navigator/doc_symbol.gif?raw=true )
2021-04-19 02:56:32 +00:00
2021-04-23 08:19:59 +00:00
### Workspace Symbol
![workspace symbol ](https://github.com/ray-x/files/blob/master/img/navigator/workspace_symbol.gif?raw=true )
2021-05-29 11:08:30 +00:00
### highlight document symbol and jump between reference
![multiple_symbol_hi3 ](https://user-images.githubusercontent.com/1681295/120067627-f9f80680-c0bf-11eb-9216-18e5c8547f59.gif )
2021-05-21 11:39:46 +00:00
# Current symbol highlight and jump backward/forward between symbols
2021-05-08 04:54:37 +00:00
Document highlight provided by LSP.
2021-06-10 12:12:25 +00:00
Jump between symbols with treesitter (with `]r` and `[r` )
2021-05-08 04:54:37 +00:00
![doc jump ](https://github.com/ray-x/files/blob/master/img/navigator/doc_hl_jump.gif?raw=true )
2021-04-19 02:56:32 +00:00
### Diagnostic
2021-08-09 16:03:51 +00:00
Visual studio code style show errors minimap in scroll bar area
2021-08-23 23:17:20 +00:00
(Check setup for `diagnostic_scrollbar_sign` )
2021-08-10 05:27:20 +00:00
2021-08-09 16:03:51 +00:00
![diagnostic_scroll_bar ](https://user-images.githubusercontent.com/1681295/128736430-e365523d-810c-4c16-a3b4-c74969f45f0b.jpg )
2021-04-25 10:34:33 +00:00
Diagnostic in single bufer
2021-04-19 02:56:32 +00:00
![diagnostic ](https://github.com/ray-x/files/blob/master/img/navigator/diag.jpg?raw=true )
2021-04-25 10:34:33 +00:00
Show diagnostic in all buffers
2021-04-24 09:55:48 +00:00
![diagnostic multi files ](https://github.com/ray-x/files/blob/master/img/navigator/diagnostic_multiplefiles.jpg?raw=true )
2021-04-19 02:56:32 +00:00
2021-06-14 02:39:40 +00:00
### Edit in preview window
2021-06-14 02:47:45 +00:00
2021-06-14 02:39:40 +00:00
You can in place edit your code in floating window
2021-06-14 02:47:45 +00:00
https://user-images.githubusercontent.com/1681295/121832919-89cbc080-cd0e-11eb-9778-11d0f356b38d.mov
2021-06-14 02:39:40 +00:00
(Note: This feature only avalible in `find reference` and `find diagnostic` , You can not add/remove lines in floating window)
2021-04-19 02:56:32 +00:00
### Implementation
2021-05-21 11:39:46 +00:00
![implementation ](https://user-images.githubusercontent.com/1681295/118735346-967e0580-b883-11eb-8c1e-88c5810f7e05.jpg?raw=true )
2021-04-19 02:56:32 +00:00
### Fzy search in reference
![fzy_reference ](https://github.com/ray-x/files/blob/master/img/navigator/fzy_reference.jpg?raw=true )
### Code actions
![code actions ](https://github.com/ray-x/files/blob/master/img/navigator/codeaction.jpg?raw=true )
2021-05-21 11:39:46 +00:00
#### Fill struct with gopls
2021-04-24 10:30:31 +00:00
![code actions fill struct ](https://github.com/ray-x/files/blob/master/img/navigator/fill_struct.gif?raw=true )
2021-04-19 02:56:32 +00:00
### Code preview with highlight
2021-05-21 11:39:46 +00:00
![treesitter_preview ](https://user-images.githubusercontent.com/1681295/118900852-4bccbe00-b955-11eb-82f6-0747b1b64e7c.jpg )
2021-04-19 02:56:32 +00:00
2021-04-24 02:38:47 +00:00
### Treesitter symbol
Treetsitter symbols in all buffers
2021-05-21 11:39:46 +00:00
![treesitter ](https://user-images.githubusercontent.com/1681295/118734953-cc6eba00-b882-11eb-9db8-0a052630d57e.jpg?raw=true )
2021-04-24 02:38:47 +00:00
2021-04-26 15:24:12 +00:00
### Signature help
Improved signature help with current parameter highlighted
![signature ](https://github.com/ray-x/files/blob/master/img/navigator/signature_with_highlight.jpg?raw=true )
2021-04-27 09:05:13 +00:00
![show_signature ](https://github.com/ray-x/files/blob/master/img/navigator/show_signnature.gif?raw=true "show_signature" )
2021-04-19 02:56:32 +00:00
### Call hierarchy (incomming/outgoing)
![incomming ](https://github.com/ray-x/files/blob/master/img/navigator/incomming.jpg?raw=true )
2021-05-21 11:39:46 +00:00
### Light bulb if codeAction available
2021-04-24 04:44:57 +00:00
![lightbulb ](https://github.com/ray-x/files/blob/master/img/navigator/lightbulb.jpg?raw=true )
### Predefined LSP symbol nerdfont/emoji
2021-04-21 02:12:48 +00:00
![nerdfont ](https://github.com/ray-x/files/blob/master/img/navigator/icon_nerd.jpg?raw=true )
2021-05-21 11:39:46 +00:00
# Break changes and known issues
[known issues I am working on ](https://github.com/ray-x/navigator.lua/issues/1 )
2021-04-19 02:56:32 +00:00
# Todo
2021-05-22 05:34:46 +00:00
- The project is in the early phase, bugs expected, PRs and suggestions are welcome
2021-04-25 02:43:18 +00:00
- Async (some of the requests is slow on large codebases and might be good to use co-rountine)
2021-05-04 11:09:38 +00:00
- More clients. I use go, python, js/ts, java, c/cpp, lua most of the time. Did not test other languages (e.g dart, swift etc)
2021-04-25 02:43:18 +00:00
- Configuration options