Describe the bug
I tested this with a minimal config with only orgmode and nvim-treesitter.
In an orgmode file without #+TITLE as the first line, hitting <CR> in insert mode indents when it should not.
If I type out the following entirely in insert mode, with zero manual indentation, each indents more than it should (especially annoying for hyphen bulleted lists where each new item indents deeper):
The output I expect:
If I comment out these 3 lines the bug dissapears:
https://github.com/nvim-orgmode/orgmode/blob/3629625199b9a45bdb41fa734bc2c6ef86d251bd/lua/orgmode/org/indent.lua#L76-L78`
checkhealth
==============================================================================
orgmode: ✅
Orgmode ~
- ✅ OK Treesitter grammar installed (version 2.0.2)
- ✅ OK Setup called
- ✅ OK
org_agenda_files configured
- ✅ OK
org_default_notes_file configured
Steps to reproduce
- Open test.org
- Type out the following outline without any manual indentations, entirely in insert mode:
Expected:
Actual:
Expected behavior
Indentation should behave the same whether #+TITLE exists or not
Emacs functionality
No response
Minimal init.lua
-- minimal_init.lua
-- Ensure you use the correct syntax for your plugin manager (e.g., Packer, lazy.nvim, etc.)
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.uv.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--branch=stable",
"https://github.com/folke/lazy.nvim.git",
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
-- Specify only the plugins you need for troubleshooting:
"nvim-treesitter/nvim-treesitter",
-- Add other specific plugins here
{
'nvim-orgmode/orgmode',
event = 'VeryLazy',
ft = { 'org' },
config = function()
-- Setup orgmode
require('orgmode').setup({
org_agenda_files = '~/orgfiles/**/*',
org_default_notes_file = '~/orgfiles/refile.org',
})
end,
},
})
Screenshots and recordings
https://asciinema.org/a/Bxa13dKwP3pIN7cIcbx9RyHp8
nvim-orgmode version
3629625
OS / Distro
MacOS 26.1
Neovim version/commit
v0.11.2
Additional context
No response
Describe the bug
I tested this with a minimal config with only orgmode and nvim-treesitter.
In an orgmode file without
#+TITLEas the first line, hitting<CR>in insert mode indents when it should not.If I type out the following entirely in insert mode, with zero manual indentation, each indents more than it should (especially annoying for hyphen bulleted lists where each new item indents deeper):
The output I expect:
If I comment out these 3 lines the bug dissapears:
https://github.com/nvim-orgmode/orgmode/blob/3629625199b9a45bdb41fa734bc2c6ef86d251bd/lua/orgmode/org/indent.lua#L76-L78`
checkhealth
==============================================================================
orgmode: ✅
Orgmode ~
org_agenda_filesconfiguredorg_default_notes_fileconfiguredSteps to reproduce
Expected:
Actual:
Expected behavior
Indentation should behave the same whether #+TITLE exists or not
Emacs functionality
No response
Minimal init.lua
Screenshots and recordings
https://asciinema.org/a/Bxa13dKwP3pIN7cIcbx9RyHp8
nvim-orgmode version
3629625
OS / Distro
MacOS 26.1
Neovim version/commit
v0.11.2
Additional context
No response