Skip to content

rocks.nvim install: #946

Open
Open
@teto

Description

@teto

I had treesitter errors for orgmode (installed via nix) but I noticed that orgmode had both its plugin and the grammar on luarocks.org so I thought I would install it via Rocks instead.

I take notes here before adding rocks command to https://github.com/nvim-orgmode/orgmode/blob/master/docs/installation.org

I've got those 2 installed in :Rocks edit

tree-sitter-orgmode = "2.0.0"
orgmode = "0.5.2"

Apparently I would not need to use tree-sitter-orgmode since it's already a dependency:
https://luarocks.org/manifests/kristijanhusak/orgmode-0.5.2-1.rockspec

checkhealth rocks-config complained about

Checking for errors while loading configs ~
- ERROR Error while loading config 'orgmode.lua' for 'orgmode'.
  - ADVICE:
    - Error was: ...rocks/rocks_rtp/lua/orgmode/utils/treesitter/install.lua:18: [orgmode] Failed to copy generated tree-sitter parser to runtime folder: ENOENT: no such file or directory: /home/teto/.cache/nvim/tree-sitter-org/parser.so -> /home/teto/.local/share/nvim/rocks/rocks_rtp/parser/org.so

So in this case orgmode wrongly tries to install tree-sitter-org instead of tree-sitter-orgmode ?

Fixed by adding vim.opt.runtimepath:append(vim.fs.joinpath(vim.fn.stdpath("data"), "rocks", "lib", "luarocks", "rocks-5.1", "tree-sitter-", "")) in init.lua.

I stumbled upon this message #804 (comment) . is it sill valid ?

The advantage of rocks.nvim is that it should install all dependencies including the parser but in this cade I also had orgmode trying to compile the grammar while it should already be available ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions