Provides some nicities for hacking on Neovim:
- Auto-detect Neovim source tree and
:cd
to the root. - Build
tags
on save.- Configured to work well with the generated sources.
- Build
cscope.out
on save.- Commands for looking up callers and callees from the current function.
- Relatively fast linting for C sources (clint.py).
- Ignored errors list can be fetched/updated via
:NvimUpdateClintErrors
. - Gutter signs reflect importance of warnings.
- Ignored errors list can be fetched/updated via
- Configures Neomake's luacheck maker to use the version from the
.deps
directory, if it is not available otherwise. - Filetype settings appropriate for Neovim's source code.
- Hook into vim-projectionist: configure alternate files for the ".vim-src" directory, and a command to diff against the same file in Vim.
- Add commands
NvimTestRun
andNvimTestClear
for running functional tests directly in the buffer.
Neovim has a pretty large code base and is full of Vim's rich and mysterious history. I have little knowledge of either and wrote a script to help me get around and automate some things. People have shown interest in using it, so it's now a plugin that will make maintenance easier.
😑
- Neomake
- Python 3
- plenary.nvim
Automatically enable when within the Neovim source tree, or one of its files are loaded.
It can be manually enabled with:
call nvimdev#init("path/to/neovim")
It should always be set to the actual Neovim root.
Automatically :cd
to the Neovim root after init.
Automatically generate tags.
For best results, use universal-ctags.
Automatically generate cscope.out
. Requires cscope.
The following commands will be added to .c
buffers:
:Callers
- displays a list of locations calling a function:Callees
- displays a list of functions called by a function
Each command takes an optional name. Without arguments, the name of the function at the cursor location is used.
If you want to display the results as quickfix items:
set cscopequickfix=s-,c-,d-,i-,t-,e-,a-
Disclaimer: I don't use cscope
much and this didn't turn out as awesome
as I hoped it would. Using the commands above, or :cscope
with quickfix
enabled will cause the current buffer to jump to the first match. Also, it
results in a bunch of duplicates since I think cscope
indexes functions with
any aliased return types it finds. I'm tempted to write a dumb script that
uses the tags
file to build a cross refrence database.
Adds nvim linter to g:neomake_c_enabled_makers
.
Set files loaded from build/
or .deps/
as readonly.
NvimTestRun [all]
: Run the test in the buffer the cursor is inside. Works for it
and describe
blocks.
NvimTestClear
: Clear test result decorations in buffer
- deoplete.nvim: Completions!
- deoplete-clang2: (Electric Boogaloo) C Completions! No configuration needed with Neovim's source.
- wstrip.vim: Strip trailing whitespace on save, but only on lines you've changed.
- helpful.vim: Displays version information for helptags.
- dyslexic.vim: Mistyping variables in giant source files suck.
- Command to run tests