add notes

This commit is contained in:
hwu 2024-10-10 10:25:03 -04:00
parent b4b630245a
commit 2597126549
3 changed files with 10 additions and 3 deletions

5
doc/notes.txt Normal file
View File

@ -0,0 +1,5 @@
NOTES
:g/^$/d delete empty lines
:v/\w\+/d (skip lines with one or more words) delete empty lines
!column -t column format

View File

@ -55,10 +55,10 @@ return {
['<C-f>'] = cmp.mapping.scroll_docs(4), ['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-j>'] = cmp.mapping(function(fallback) ['<C-j>'] = cmp.mapping(function(fallback)
if luasnip.expand_or_locally_jumpable() then if cmp.visible() then
luasnip.expand_or_jump()
elseif cmp.visible() then
cmp.confirm { select = true } cmp.confirm { select = true }
elseif luasnip.expand_or_locally_jumpable() then
luasnip.expand_or_jump()
else else
cmp.complete() cmp.complete()
end end

View File

@ -59,3 +59,5 @@ function _G.toggle_diagnostics()
end end
vim.api.nvim_set_keymap('n', '<leader>uv', ':call v:lua.toggle_diagnostics()<CR>', { noremap = true, silent = true, desc = 'Toggle diagnostic text' }) vim.api.nvim_set_keymap('n', '<leader>uv', ':call v:lua.toggle_diagnostics()<CR>', { noremap = true, silent = true, desc = 'Toggle diagnostic text' })
vim.api.nvim_create_user_command('Notes', 'edit' .. vim.fn.stdpath 'config' .. '/doc/notes.txt', {})