A collection of Vim configurations for Weka developers.
If you want to add things to this repository, Please read CONTRIBUTING.md first.
-
ALE linter that uses Weka's LDC fork and sets Weka's import paths. It is set automatically to replace the default DMD-based linter when editing D files in the Weka project directory.
Requirements & configurations:
- ALE(obviously) - https://github.com/w0rp/ale
- Build Weka's LDC fork - https://github.com/weka-io/ldc
- On Mac with Homebrew,
brew tap weka-io/homebrew-ldc && brew install ldc-weka
- On Mac with Homebrew,
- In your vimrc, set
g:weka_ldcPath
to the path of LDC2 binary you built
-
Setting Python paths so that JEDI can perform autocompletion correctly.
- This takes way to long, so it's in functions.
- Use
:call config_python_path#configForPythonInVim()
to configure the paths for the Python environment that runs inside Vim. scripts/pyls-for-weka
does similar things for Python Language Server, and if you have configured LanguageClient-neovim to use PyLS use:call config_python_path#configForLanguageClient()
set it to use this version when you open Vim in the Weka project directory.
-
:WekaBuildErrors
command: fills the quickfix list with compilation errors fetched from the build server. -
:WekaTestErrors
command: fills the quickfix list with Python exceptions fromtestlight.log
.- Set
g:weka_logsDir
to the dir containing the log files. The default is~/tmp/weka/logs
. - Provide a job key as argument to fetch logs from a Bamboo/Reggie build.
- If the wekaticet feature is set, and you are editing a ticket, running without arguments will fetch the logs of the ticket you are editing.
- Set
-
:WekaTekaErrors
command: does the same thing forteka.log
. -
scripts/viewer-nvim.py
- a script for opening Neovim from the trace viewer(when pressingV
).Requirements & configurations:
pip install plumbum
pip install neovim
- When running the viewer, set the
WEKA_SRC_VIEWER
to the path of the script.
The script can run with both Python2 and Python3, but you'll need to install the
plumbum
andneovim
packages for the version you use. To force the script to run with the specific version, setWEKA_SRC_VIEWER
to launch the specific Python interpreter:export WEKA_SRC_VIEWER='python3 /path/to/viewer-nvim.py'
-
The
wekaticket
filetype - need to setg:weka_ticketFiletype
Activated when opening Vim to edit a comment in a JIRA ticket with a plugin that can open Vim from the browser. Currently supported plugins:
Note that this filetype is only useful if you have the
$WEKAPP_PATH
environment path set to path of the Weka project root. Without it, it won't be able to run./teka
.If you set
g:weka_ticketFiletype_changeDir
and have the environment variable$WEKAPP_PATH
set to the path of the project root, entering thewekaticket
filetype will automatically move you to the weka project root. This is useful for copying pieces of code from the project to the comment.The
:WekaPasteTraces
command will paste to then next line the last trace dump fromviewer.output
.The following Terminalogy templates will be added:
testlight
- read thetestlight.log
, with anawk
filter to remove the clutter columns.testlight-chain
- chaintestlight.log.#
up to the number specified as the parameter.teka
- same thing forteka.log
.jrpc
- same thing forjrpc.log
.objects-log
- same thing forobjects.log
, where the changes in configuration are logged.objects-chain
- chainobjects.log.#
up to the number specified as the parameter.objects-yaml
- same thing forobjects.yaml.log
, where the final configuration is dumped.objects-yq
- pipeobjects.yaml.log
throughyq
(which is likejq
but for YAML)artifacts
- generic template for reading artifacts. Supports completion for the artifacts in S3.
-
WekaTerminalogyArtifacts
to run FZF (you needfzf
installed) and pick an artifact toteka log
with Terminalogy -
:WekaInvestigate
command: opensteka investigate
terminal.- Requires Neovim or Vim8 with the terminal feature(
:echo has('terminal')
) - Provide a job key as argument to investigate Bamboo/Reggie build.
- If the wekaticet feature is set, and you are editing a ticket, running without arguments will investigate the ticket you are editing.
- Requires Neovim or Vim8 with the terminal feature(