nvim: add orgmode

This commit is contained in:
Moritz Böhme 2023-02-18 16:24:38 +01:00
parent 819590103d
commit eb77aa8823
Signed by: moritz
GPG key ID: 970C6E89EB0547A9
2 changed files with 21 additions and 0 deletions

View file

@ -70,6 +70,7 @@ in
nvim-treesitter.withAllGrammars nvim-treesitter.withAllGrammars
nvim-ts-context-commentstring nvim-ts-context-commentstring
nvim-web-devicons # for dashboard-nvim nvim-web-devicons # for dashboard-nvim
orgmode
plenary-nvim # for telescope, neogit plenary-nvim # for telescope, neogit
telescope-nvim telescope-nvim
which-key-nvim which-key-nvim

View file

@ -145,6 +145,7 @@ cmp.setup({
{ name = "copilot", priority = 8 }, { name = "copilot", priority = 8 },
{ name = "luasnip", priority = 7 }, { name = "luasnip", priority = 7 },
{ name = "nvim_lsp", priority = 9 }, { name = "nvim_lsp", priority = 9 },
{ name = "orgmode", priority = 9 },
}, },
}) })
@ -393,3 +394,22 @@ require("copilot").setup({
panel = { enabled = false }, panel = { enabled = false },
}) })
require("copilot_cmp").setup() require("copilot_cmp").setup()
local orgmode = require("orgmode")
-- Load custom treesitter grammar for org filetype
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" },
},
})
orgmode.setup({
org_agenda_files = { "~/Notes/org" },
org_default_notes_file = "~/Notes/org/refile.org",
})