Skip to content
This repository has been archived by the owner on Feb 2, 2024. It is now read-only.

adelowo/godo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Godo - Browse todos in your Go source code

Introduction

Godo is a plugin that allows you navigate through the todo messages in your Go project.

Godo in action It makes use of astitodo underneath.

Features

  • Fast browsing of todos.
  • Todos
    • View all todos in a specific file with :Godo.
    • View todos in a file sorted by assignees with :Godo assignee_name (e.g :Godo adelowo .)
    • View todos sorted by multiple assignees with :Godo assignee_name1 assignee_name2
    • Find all todos in the current folder opened.
    • Navigate to the source code line housing the todo message.
    • Show a nice warning message if there aren't any todo in the file.
  • Install astitodo binary by running :GodoInstallBinary.
  • Update astitodo binary by running :GodoUpdateBinary.

Installation

I recommend you use Vim-Plug to manage your vim plugins.

With Vim-Plug installed, put the following lines in your vimrc:

Plug 'adelowo/godo', { 'do': ':GodoInstallBinary' }

Then execute :PlugInstall in command mode.

GodoInstallBinary would fetch the astitodo library used for matching/finding todos.

Configuration

" Config for :GodoInstallBinary and :GodoUpdateBinary
" This values defaults to 0

let g:go_get_update = 1 " Make use of the -u flag when installing the astitodo library.
let g:godo_install_verbose = 1 " Make use of the -v flag when installing the astitodo library..

" The flags above are passed to `go get`. You would want to refer to the official godoc for `go get` to understand what this flags stand for

g:go_get_update is actually the same config defined by vim-go. If it doesn't exist, it is set to 0 anyways.

Todo Browsing

godo doesn't come with key mapping defaults..

To view todos in a file, open a file buffer and :Godo in command mode.. To map this to a key, you add this to your init.vim (.vimrc).

nmap <Leader>. :Godo<CR>

To filter todos in a file by assignees, you make use of :Godo assignee_name.

:Godo adelowo " Would show all todos assigned to adelowo

:Godo adelowo lanre username " Would show all todos assigned to the specificied usernames

License

MIT

About

(Neo)Vim plugin to navigate todos in Go projects with ease

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published