Skip to content

Commit

Permalink
chore(docs): auto generate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
DNLHC authored and github-actions[bot] committed Apr 13, 2023
1 parent 1580429 commit 620ec36
Showing 1 changed file with 34 additions and 30 deletions.
64 changes: 34 additions & 30 deletions doc/glance.txt
Original file line number Diff line number Diff line change
@@ -1,30 +1,26 @@
*glance.txt* For NVIM v0.8.0 Last change: 2023 February 15
*glance.txt* For NVIM v0.8.0 Last change: 2023 April 13

==============================================================================
Table of Contents *glance-table-of-contents*

1. Glance |glance-glance|
- Features |glance-features|
- Requirements |glance-requirements|
- Install |glance-install|
- Configuration |glance-configuration|
- Hooks |glance-hooks|
- Usage |glance-usage|
- Highlights |glance-highlights|
- Alternatives |glance-alternatives|
- Features |glance-glance-features|
- Requirements |glance-glance-requirements|
- Install |glance-glance-install|
- Configuration |glance-glance-configuration|
- Hooks |glance-glance-hooks|
- Usage |glance-glance-usage|
- Highlights |glance-glance-highlights|
- Alternatives |glance-glance-alternatives|

==============================================================================
1. Glance *glance-glance*

A pretty window for previewing, navigating and editing your LSP locations in
one place, inspired by vscode’s peek preview.

<div class="figure">
<img src="https://i.imgur.com/86K5ljv.png" title="fig:"/>
<p class="caption">Glance references screenshot</p>
</div>

FEATURES *glance-features*
FEATURES *glance-glance-features*


- Supports following LSP methods: `definitions`, `type definitions`, `references`, `implementations`
Expand All @@ -33,27 +29,28 @@ FEATURES *glance-features*
- Intuitive UI


REQUIREMENTS *glance-requirements*
REQUIREMENTS *glance-glance-requirements*


- Properly configured LSP client
- Neovim >= 0.7.0


INSTALL *glance-install*
INSTALL *glance-glance-install*

Install the plugin with your preferred plugin manager.


VIM PLUG ~

>
>vim
Plug 'dnlhc/glance.nvim'
<


PACKER ~

>
>lua
use({
"dnlhc/glance.nvim",
config = function()
Expand All @@ -65,11 +62,11 @@ PACKER ~
<


CONFIGURATION *glance-configuration*
CONFIGURATION *glance-glance-configuration*

The following is the default configuration:

>
>lua
-- Lua configuration
local glance = require('glance')
local actions = glance.actions
Expand Down Expand Up @@ -126,6 +123,7 @@ The following is the default configuration:
['q'] = actions.close,
['Q'] = actions.close,
['<Esc>'] = actions.close,
["<C-q>"] = actions.quickfix,
-- ['<Esc>'] = false -- disable a mapping
},
preview = {
Expand All @@ -152,7 +150,8 @@ The following is the default configuration:
<


HOOKS *glance-hooks*
HOOKS *glance-glance-hooks*


BEFORE_OPEN ~

Expand All @@ -167,7 +166,7 @@ Examples:

Don’t open glance when there is only one result instead jump to that location

>
>lua
hooks = {
before_open = function(results, open, jump, method)
if #results == 1 then
Expand All @@ -179,11 +178,10 @@ Don’t open glance when there is only one result instead jump to that location
}
<


Don’t open glance when there is only one result and it is located in the
current buffer, open otherwise

>
>lua
hooks = {
before_open = function(results, open, jump, method)
local uri = vim.uri_from_bufnr(0)
Expand All @@ -207,11 +205,14 @@ BEFORE_CLOSE ~

Triggered right before the window is closed


AFTER_CLOSE ~

Triggered after the window is closed

USAGE *glance-usage*

USAGE *glance-glance-usage*


COMMANDS ~

Expand All @@ -224,16 +225,15 @@ COMMANDS ~

EXAMPLE KEYBINDINGS ~

>
>vim
" VimScript
nnoremap gR <CMD>Glance references<CR>
nnoremap gD <CMD>Glance definitions<CR>
nnoremap gY <CMD>Glance type_definitions<CR>
nnoremap gM <CMD>Glance implementations<CR>
<


>
>lua
-- Lua
vim.keymap.set('n', 'gD', '<CMD>Glance definitions<CR>')
vim.keymap.set('n', 'gR', '<CMD>Glance references<CR>')
Expand All @@ -242,7 +242,7 @@ EXAMPLE KEYBINDINGS ~
<


HIGHLIGHTS *glance-highlights*
HIGHLIGHTS *glance-glance-highlights*

The following list shows all the highlight groups defined for glance.nvim

Expand Down Expand Up @@ -270,14 +270,18 @@ The following list shows all the highlight groups defined for glance.nvim
- `GlanceBorderTop`


ALTERNATIVES *glance-alternatives*
ALTERNATIVES *glance-glance-alternatives*


- nvim-telescope/telescope.nvim <https://github.com/nvim-telescope/telescope.nvim>
- glepnir/lspsaga.nvim <https://github.com/glepnir/lspsaga.nvim>
- folke/trouble.nvim <https://github.com/folke/trouble.nvim>
- rmagatti/goto-preview <https://github.com/rmagatti/goto-preview>

==============================================================================
2. Links *glance-links*

1. *Glance references screenshot*: https://i.imgur.com/86K5ljv.png

Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>

Expand Down

0 comments on commit 620ec36

Please sign in to comment.