Browse Source

Flesh out documentation on features

master
Adam Pippin 2 years ago
parent
commit
17dbdb4eff
  1. 194
      doc/nukevim.txt

194
doc/nukevim.txt

@ -194,58 +194,252 @@ See: https://php.org/
3. Features *NukeVimFeature*
This section outlines several features included in the NukeVim distribution,
references back to the relevant projects, and quick information on their use.
--------------------------------------------------------------------------------
3.1 Development *NukeVimFeatureDev*
Tools for working with code.
--------------------------------------------------------------------------------
3.1.1 Debugger *NukeVimFeatureDebugger*
NukeVim includes the Vdebug plugin to provide a DBGP protocol debugger within
vim. It can be used for PHP (xdebug), Python, Ruby, Perl, Tcl, NodeJS and more.
Further Help: `:h Vdebug`
URL: https://github.com/vim-vdebug/vdebug
In normal mode:
* `<F5>` starts the debugger; the UI will only appear once a client connects
* `<F10>` toggle breakpoint
Within the debugger:
* `<F2>` step over
* `<F3>` step into
* `<F4>` step out
* `<F6>` stops the debugged code; a second time closes the debugger
* `<F9>` run to cursor
* `<F12>` evaluate variable under cursor
NukeVim provides some additionally functionality and mappings for working with
the debugger under the `<leader> d(evelopment) d(ebug)` prefix:
* `b` toggle breakpoint
* `c` set a conditional breakpoint
* `e` evaluate code; if you have a visual selection it will evaluate that,
otherwise it will prompt for code
* `t` set a trace expression to be evaluated on each stepping; if you have a
visual selection it will trace that, otherwise it will prompt for code
* `w` show breakpoint window listing all breakpoints
--------------------------------------------------------------------------------
3.1.2 Code Completion *NukeVimFeatureCodeCompletion*
NukeVim provides the coc plugin to provide completion.
Further Help: `:h coc-nvim`
URL: https://github.com/neoclide/coc.nvim
You can install various coc extensions with the `:CocInstall` command. Some
useful ones:
* `coc-css`: css completion
* `coc-html`: html completion
* `coc-json`: json completion
* `coc-markdownlint`: markdown linting rules
* `coc-marketplace`: run `:CocList marketplace` to fuzzy find and interactively
install new extensions
* `coc-phpls`: php language server using intelephense
* `coc-sql`: sql completion
* `coc-yaml`: yaml completion
When completion windows pop up, you can either:
* Scroll with the arrow keys, commit with <CR>
* Scroll with Ctrl+J/K and have the changes reflected immediately.
--------------------------------------------------------------------------------
3.1.3 Tag Bar *NukeVimFeatureTagBar*
NukeVim uses the tagbar plugin to provide overview and navigation of your
code's structure.
Further Help: `:h tagbar`
URL: https://github.com/preservim/tagbar
At any point in a source file, you can press `Alt+;` to open a sidebar which
shows all of the "tags" in your source file--classes and functions. You can
scroll with j/k and select any tag with <CR> to move the cursor there. The
window automatically closes.
--------------------------------------------------------------------------------
3.1.4 Todos *NukeVimFeatureTodos*
NukeVim uses trouble and todo-comments to provide highlighting and a project-level
overview of // TODO, // FIXME, etc style comments.
Further Help: none
URL: https://github.com/folke/todo-comments.nvim
todo-comments will search your cwd for relevant tags. Generally this will be
your project's directory thanks to vim-rooter.
You can trigger the quickfix interface with `<leader> w(orkspace) t(odos)`.
This will open the quickfix window with a list of todos broken down by file.
Scroll with j/k, select with <CR> to jump to the file and line, or close the
quickfix window with `q`. It will auto-close when you select a todo to view.
Alternatively, you can use `<leader> w(orkspace) T(odos)` to open the todos
in Telescope. This provides a fuzzy find interface with shows a preview of the
selected todo in the right pane.
--------------------------------------------------------------------------------
3.1.5 Git *NukeVimFeatureGit*
NukeVim uses several plugins to provide a whole bunch of relevant
git functionality.
All of the functionality can be found under the `<leader> g(it)` prefix.
--------------------------------------------------------------------------------
3.1.6 Docker *NukevimFeatureDocker*
NukeVim provides two docker interfaces out of the box, though one is disabled
by default.
| The default plugin requires deno be available (see |NukeVimDependencies|).
| If you do not want to install deno, you may instead enable
| the `vim-docker-tools plugin in `lua/config/plugins/development.lua`. This
| section only discusses the default denops-docker plugin.
Further Help: `:h docker.txt`
URL: https://github.com/skanehira/denops-docker.vim
denops-docker provides basic container and image management from within vim.
You can trigger container management with `<leader> d(evelopment) c(ontainers)`
and image management with `<leader> d(evelopment) i(mages)`.
All key bindings available in both interfaces are registered in the keymap so
live help can be found by pressing `???` with either window open. Windows can
be scrolled with j/k and closed with `q`.
Containers:
* `u` start container
* `d` stop container
* `r` restart container
* `<C-k>` kill container
* `<CR>` inspect container
* `a` attach terminal to container
* `t` tail log of container
* `<C-d>` delete container
Images:
* `r` run image
* `<C-d>` delete image
* `<CR>` inspect image
--------------------------------------------------------------------------------
3.2 PHP *NukeVimFeaturePhp*
NukeVim provides some PHP-specific functionality.
--------------------------------------------------------------------------------
3.2.1 Debugger *NukeVimFeaturePhpDebugger*
In order to debug PHP with Vdebug (see |NukeVimFeatureDebugger|), you must first
set up PHP correctly.
Ensure you have the xdebug extension (https://xdebug.org/) installed first. It's
likely available in your package manager.
I won't fully replicate the Xdebug documentation here, but you _will_ need to
properly configure xdebug in your php.ini file. Some core options you'll
likely need would be:
[xdebug]
zend_extension=xdebug.so
xdebug.mode=debug
xdebug.client_host=127.0.0.1
xdebug.client_port=9000
xdebug.discover_client_host=true
xdebug.start_with_request=true
--------------------------------------------------------------------------------
3.2.2 Composer *NukeVimFeaturePhpComposer*
NukeVim provides an extremely basic composer interface thanks to vim-composer.
Further Help: `:h composer.txt`
URL: https://github.com/vim-php/vim-composer
The functionality is only available when you have a PHP file open and it is
all under the `<leader> l(anguage) c(omposer)` prefix:
* `i` run composer install
* `j` open composer.json in a new buffer
* `u` run composer update
// TODO: Add some more composer commands using :ComposerRun -- something generic
// but also probably some shortcuts for my common stuff like format/validate.
--------------------------------------------------------------------------------
3.3 UI *NukeVimFeatureUi*
Most of the UI stuff just... is, but there are a couple of things that aren't
very discoverable.
--------------------------------------------------------------------------------
3.3.1 Fuzzy Find *NukeVimFeatureUiFuzzyFind*
NukeVim uses CtrlP for fuzzy finding files.
Further Help: `:h ctrlp`
URL: https://github.com/ctrlpvim/ctrlp.vim
You can trigger the fuzzy find by pressing `<C-p>` in normal mode. This will
try and fuzzily match any files in the cwd (which should follow your project
root thanks to vim-rooter).
--------------------------------------------------------------------------------
3.3.2 Terminal *NukeVimFeatureUiTerminal*
NukeVim uses toggleterm to provide a persistent, toggleable terminal.
Further Help: `:h toggleterm`
URL: https://github.com/akinsho/toggleterm.nvim
In normal mode, press `<C-t>` to show/hide a terminal at the bottom of your
screen.
================================================================================
4. Architecture *NukeVimArch*

Loading…
Cancel
Save