Cleaned up code made orgmode work better

This commit is contained in:
Warwick 2023-12-14 16:24:01 +00:00
parent 6b25442329
commit f0db7a9095
4 changed files with 45 additions and 15 deletions

View file

@ -23,6 +23,9 @@ vim.wo.wrap = true
vim.wo.linebreak = true
vim.wo.list = false
-- I want neovim to know I want british spellings
vim.cmd('language en_GB.utf8')
-- Use LSP to format bufer automatically just before write
--vim.api.nvim_create_autocmd("BufWritePre", {
-- buffer = buffer,

View file

@ -8,3 +8,4 @@ require("core.plugin_config.completions")
require("core.plugin_config.terminal")
require("core.plugin_config.whichkey")
require("core.plugin_config.indent-blankline")
require("core.plugin_config.org")

View file

@ -0,0 +1,26 @@
-- Load custom treesitter grammar for org filetype
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 = {'~/.vimwiki/**.org'},
org_default_notes_file = '~/.vimwiki/refile.org',
})
require('cmp').setup({
sources = {
{ name = 'orgmode' }
}
})

View file

@ -69,12 +69,12 @@ local plugins = {
dependencies = {
{ 'nvim-treesitter/nvim-treesitter', lazy = true },
},
event = 'VeryLazy',
config = function()
-- Load treesitter grammar for org
require('orgmode').setup_ts_grammar()
--event = 'VeryLazy',
--config = function()
---- Load treesitter grammar for org
--require('orgmode').setup_ts_grammar()
-- Setup treesitter
---- Setup treesitter
--require('nvim-treesitter.configs').setup({
-- highlight = {
-- enable = true,
@ -83,16 +83,16 @@ local plugins = {
-- ensure_installed = { 'org' },
--})
-- Setup orgmode
require('orgmode').setup({
org_agenda_files = '~/.vimwiki/**/*',
org_default_notes_file = '~/.vimwiki/refile.org',
})
-- Setup nvim-cmp
require('cmp').setup({
sources = { { name = 'orgmode' } }
})
end,
---- Setup orgmode
--require('orgmode').setup({
-- org_agenda_files = '~/.vimwiki/**/*',
-- org_default_notes_file = '~/.vimwiki/refile.org',
--})
---- Setup nvim-cmp
--require('cmp').setup({
-- sources = { { name = 'orgmode' } }
--})
--end,
}
}