Skip to content

Docs issue with vim.pack installation #1173

Description

@colmjr

Describe the bug

In the description of the vim.pack installation in the docs, it adds an extra empty space in

   vim.pack.add({
     { src = 'https://github.com/nvim-orgmode/orgmode '} 
--                                                   ^ here
   })

Which when sourced, fails.

checkhealth

==============================================================================
orgmode: ✅

Orgmode ~

  • ✅ OK Treesitter grammar installed (version 2.0.4)
  • ✅ OK Setup called
  • ✅ OK org_agenda_files configured
  • ✅ OK org_default_notes_file configured

Steps to reproduce

  1. Go to the installation.org docs at docs/installation.org
  2. Open it, and copy and paste the vim.pack installation script
  3. Place it in your config and
:so $MYVIMRC

Source your config

Expected behavior

If installed, nothing should happen.
If not installed, it will give an error.

Emacs functionality

No response

Minimal init.lua

local tmp_dir = vim.env.TMPDIR or vim.env.TMP or vim.env.TEMP or "/tmp"
local nvim_root = tmp_dir .. "/nvim_orgmode"
local lazy_root = nvim_root .. "/lazy"
local lazypath = lazy_root .. "/lazy.nvim"

for _, name in ipairs({ "config", "data", "state", "cache" }) do
	vim.env[("XDG_%s_HOME"):format(name:upper())] = nvim_root .. "/" .. name
end

-- Install lazy.nvim if not already installed
if not vim.uv.fs_stat(lazypath) then
	vim.fn.system({
		"git",
		"clone",
		"--filter=blob:none",
		"https://github.com/folke/lazy.nvim.git",
		"--branch=stable", -- latest stable release
		lazypath,
	})
end
vim.opt.rtp:prepend(lazypath)

require("lazy").setup({
	{
		"nvim-orgmode/orgmode",
		event = "VeryLazy",
		ft = { "org" },
		config = function()
			require("orgmode").setup()
		end,
	},
}, {
	root = lazy_root,
	lockfile = nvim_root .. "/lazy.json",
	install = {
		missing = false,
	},
})

require("lazy").sync({
	wait = true,
	show = false,
})

-- directly copy and pasted from the installation.org file in docs/
vim.pack.add({
	{ src = "https://github.com/nvim-orgmode/orgmode " },
})
require("orgmode").setup({
	org_agenda_files = "~/orgfiles/**/*",
	org_default_notes_file = "~/orgfiles/refile.org",
})
-- Experimental LSP support
vim.lsp.enable("org")

Screenshots and recordings

No response

nvim-orgmode version

0.7.5

OS / Distro

macOS 27 Beta 27.0

Neovim version/commit

NVIM v0.12.0-dev-1722+g8c1327a622 Build type: RelWithDebInfo LuaJIT 2.1.1764270282

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions