fix: nvim: change event when orgmode is loaded

This commit is contained in:
qwjyh 2023-11-17 17:06:56 +09:00
parent d4d30aa239
commit 025f48266a

View file

@ -92,6 +92,7 @@ require('lazy').setup({
'hrsh7th/cmp-omni', -- source for omnifunc 'hrsh7th/cmp-omni', -- source for omnifunc
'hrsh7th/cmp-nvim-lua', -- nvim lua 'hrsh7th/cmp-nvim-lua', -- nvim lua
'hrsh7th/cmp-nvim-lsp-signature-help', 'hrsh7th/cmp-nvim-lsp-signature-help',
'nvim-orgmode/orgmode',
}, },
}, },
{ {
@ -135,7 +136,7 @@ require('lazy').setup({
dependencies = { dependencies = {
{ 'nvim-treesitter/nvim-treesitter', lazy = true }, { 'nvim-treesitter/nvim-treesitter', lazy = true },
}, },
event = 'VeryLazy', -- event = 'VeryLazy', -- doesn't work with existing comp and treesitter
config = function() config = function()
-- Load treesitter grammer for orgmode -- Load treesitter grammer for orgmode
require('orgmode').setup_ts_grammar() require('orgmode').setup_ts_grammar()
@ -338,11 +339,14 @@ parser_config.satysfi = {
-- setup -- setup
require 'nvim-treesitter.configs'.setup { require 'nvim-treesitter.configs'.setup {
ensure_installed = { ensure_installed = {
'julia', 'c', 'cpp', 'lua', 'julia', 'satysfi',
'satysfi',
}, },
sync_install = false,
auto_install = true, -- requires tree-sitter cli in local
ignore_install = {},
highlight = { highlight = {
enable = true, enable = true,
additional_vim_regex_highlighting = { 'org' },
}, },
incremental_selection = { incremental_selection = {
enable = true, enable = true,