add orgmode

This commit is contained in:
Javier Pacheco 2023-08-21 06:08:13 -05:00
parent f810dc3c03
commit 387c05dc10
5 changed files with 73 additions and 8 deletions

View File

@ -78,7 +78,11 @@ require('lazy').setup({
},
-- Useful plugin to show you pending keybinds.
{ 'folke/which-key.nvim', opts = {} },
{
'folke/which-key.nvim',
opts = {}
},
{
-- Adds git releated signs to the gutter, as well as utilities for managing changes
'lewis6991/gitsigns.nvim',

View File

@ -127,7 +127,7 @@ return {
-- https://github.com/dhruvasagar/vim-table-mode
{
"dhruvasagar/vim-table-mode",
ft = { "markdown", "norg" },
ft = { "markdown", "norg", "org" },
config = function()
-- Bug: changing prefix doesn't work https://github.com/dhruvasagar/vim-table-mode/issues/222
-- :h table-mode-mappings
@ -290,6 +290,66 @@ return {
end
},
{
'nvim-orgmode/orgmode',
config = function()
require('orgmode').setup {}
require('orgmode').setup_ts_grammar()
-- Treesitter configuration
require('nvim-treesitter.configs').setup {
-- If TS highlights are not enabled at all, or disabled via `disable` prop,
-- highlighting will fallback to default Vim syntax highlighting
highlight = {
enable = true,
-- Required for spellcheck, some LaTex highlights and
-- code block highlights that do not have ts grammar
additional_vim_regex_highlighting = { 'org' },
},
ensure_installed = { 'org' }, -- Or run :TSUpdate org
}
require('orgmode').setup({
org_agenda_files = { '~/agenda/org/*', '~/my-orgs/**/*' },
org_default_notes_file = '~/my-orgs/refil/refile.org',
mappings = {
global = {
org_toggle_checkbox = '<Leader>oxx',
}
},
org_todo_keywords = { 'TODO', 'WAITING', '|', 'DONE', 'DELEGATED' },
org_todo_keyword_faces = {
WAITING = ':foreground blue :weight bold',
DELEGATED = ':background #FFFFFF :slant italic :underline on',
TODO = ':background #000000 :foreground red', -- overrides builtin color for `TODO` keyword
}
})
end
},
{
'akinsho/org-bullets.nvim',
config = function()
require('org-bullets').setup {
concealcursor = false, -- If false then when the cursor is on a line underlying characters are visible
symbols = {
-- list symbol
list = "",
headlines = { "", "", "", "", "", "" },
checkboxes = {
half = { "~", "OrgTSCheckboxHalfChecked" },
done = { "X", "OrgDone" },
todo = { " ", "OrgTODO" },
},
}
}
end
},
{
"michaelb/sniprun",
build = "sh ./install.sh"
},
-- [[ ChatGPT]]
-- {
-- "jackMort/ChatGPT.nvim",

View File

@ -52,7 +52,7 @@ vim.opt.showtabline = 1
vim.opt.conceallevel = 2
-- vim.opt.concealcursor = 'nc'
-- vim.cmd(':hi CursorLineNr gui=None ctermfg=11 guifg=foreground')
vim.opt.cursorline = false
vim.opt.cursorline = true
-- Do not load tohtml.vim
vim.g.loaded_2html_plugin = 1
@ -129,9 +129,6 @@ map("v", "<", "<gv", opts)
map("v", ">", ">gv", opts)
map("n", "<M-x>", ":!", opts) -- Meta X like emacs. This is blasphemy....
map("n", "<leder>hrr", ":so%<CR>", opts)
--
-- [[ Zettlekasten settings ]]
--
map("i", "jk", "<Esc>l", opts)
map("i", "jj", "<Esc>l", opts)
@ -147,14 +144,13 @@ map("n", "<leader><leader>e", ":Ex<CR>", opts)
map("n", "<leader>ni", ":Neorg index<CR>", opts)
map("n", "<leader>?", ":Telescope oldfiles theme=get_ivy<CR>", opts)
map("n", "<leader>,", ":Telescope buffers theme=get_ivy<CR>", opts)
map("n", "<leader>oc", ":Calendar -view=year -split=horizontal -position=below -height=12<CR>", opts)
vim.cmd([[hi tkLink ctermfg=Cyan cterm=bold,underline guifg=blue gui=bold,underline]])
vim.cmd([[hi tkBrackets ctermfg=gray guifg=gray]])
-- Keymaps for better default experience
-- See `:help vim.keymap.set()`
vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
-- vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
-- Remap for dealing with word wrap
vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })

View File

@ -6,3 +6,4 @@ snippet lk
snippet lf
{file:///${1:some/path/}:}[${2:Description}]

4
snippets/org.snippets Normal file
View File

@ -0,0 +1,4 @@
# [[ Org ]]
snippet td
- [ ] $0