Add nvim-orgmode (Lazy) with ~/organizer
This commit is contained in:
36
home/sam/nvim/lua/sam/plugins/orgmode.lua
Normal file
36
home/sam/nvim/lua/sam/plugins/orgmode.lua
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"nvim-orgmode/orgmode",
|
||||||
|
ft = { "org" },
|
||||||
|
dependencies = {
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
-- Ensure *.org files are treated as "org" filetype
|
||||||
|
vim.filetype.add({
|
||||||
|
extension = {
|
||||||
|
org = "org",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Treesitter grammar for org (required for good highlighting)
|
||||||
|
local ok, parsers = pcall(require, "nvim-treesitter.parsers")
|
||||||
|
if ok then
|
||||||
|
local parser_config = parsers.get_parser_configs()
|
||||||
|
parser_config.org = {
|
||||||
|
install_info = {
|
||||||
|
url = "https://github.com/milisims/tree-sitter-org",
|
||||||
|
revision = "main",
|
||||||
|
files = { "src/parser.c", "src/scanner.c" },
|
||||||
|
},
|
||||||
|
filetype = "org",
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
require("orgmode").setup({
|
||||||
|
org_agenda_files = { "~/organizer/agenda/**/*", "~/organizer/*.org" },
|
||||||
|
org_default_notes_file = "~/organizer/inbox.org",
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user