Skip to content

kristijanhusak/line-notes.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

[WIP] line-notes.nvim

Leave personal comments and notes in your files that are visible only to you. Neovim 0.5+ only.

Still in very alpha stage. Breaking changes to be expected.

line-notes-floating

Installation

" vim-packager
call packager#add('kristijanhusak/line-notes.nvim')

or

-- packer.nvim
use {'kristijanhusak/line-notes.nvim'}

Or

" vim-plug
Plug 'kristijanhusak/line-notes.nvim'
" These are the default options
lua require'line-notes'.setup({
	path = vim.fn.stdpath('data')..'/line-notes.json', -- path where to save the file
	border_style = 'rounded', // see :help nvim_open_win for more options
	preview_max_width = 80, -- maximum width of preview notes float window
	auto_preview = false -- automatically open preview notes float window
	icon = '',
	mappings = {  -- pass in false to disable all. Pass in table to override. Partial overrides are possible
		add = '<leader>lna', -- pass null to disable the mapping
		edit = '<leader>lne',
		preview = '<leader>lnp',
		delete = '<leader>lnd',
	}
})

Use commands:

  • LineNotesAdd
  • LineNotesEdit
  • LineNotesPreview
  • LineNotesDelete

Or if you use telescope.nvim:

  • Telescope line_notes - All line notes
  • Telescope line_notes_project - Notes in files that are part of current working directory

Limitations

Notes are currently tied to the line number and content in the file. If line content is changed notes stay on the same place, even if moved around. This can cause confusion if notes are left in places that are changed a lot. Currently there is no easy way to keep track of these changes in a simple way, but if anyone has any idea how to solve that issue, please let me know.

If line content is just moved to another line number, line-notes syncs that change and follows the line for the notes. If that's unexpected behaviour, open an issue.

TODO:

  • Add option to leave comment per line and column
  • Add option to show bubble icon in floating window and sign (currently available only as virtual text)
  • Improve preview window (borders, positioning)
  • Add finder for notes (Telescope)
  • Add ability to set up mappings

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages