Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSInstall norg seems to act a bit wierd (macOS) #46

Closed
molleweide opened this issue Jan 19, 2023 · 1 comment
Closed

TSInstall norg seems to act a bit wierd (macOS) #46

molleweide opened this issue Jan 19, 2023 · 1 comment

Comments

@molleweide
Copy link

molleweide commented Jan 19, 2023

machine info

macOS 13 Ventura
nvim version 8
gcc-12

body

The following are messages related to neorg after starting up nvim.

I have followed instructions from #45 and any links within the issue.
Now I am not sure what to do now because now I believe that I have followed all issues I could find pertaining to this issue.

After starting vim I run TSInstall norg

[nvim-treesitter] [0/1] Downloading tree-sitter-norg...
[nvim-treesitter] [0/1] Creating temporary directory
[nvim-treesitter] [0/1] Extracting tree-sitter-norg...
[nvim-treesitter] [0/1] Compiling...
[nvim-treesitter] [1/1] Treesitter parser for norg has been installed

Then I enter an index.norg file:

[nvim-treesitter] [2/5] Downloading tree-sitter-norg...
[nvim-treesitter] [2/5] Downloading tree-sitter-norg_meta...
[nvim-treesitter] [2/5] Downloading tree-sitter-norg_table...
[nvim-treesitter] [2/5] Creating temporary directory
[nvim-treesitter] [2/5] Extracting tree-sitter-norg...
[nvim-treesitter] [2/5] Creating temporary directory
[nvim-treesitter] [2/5] Extracting tree-sitter-norg_table...
[nvim-treesitter] [2/5] Creating temporary directory
[nvim-treesitter] [2/5] Extracting tree-sitter-norg_meta...
[nvim-treesitter] [2/5] Compiling...
[nvim-treesitter] [2/5] Compiling...
[nvim-treesitter] [2/5] Compiling...
[nvim-treesitter] [3/5] Treesitter parser for norg_table has been installed
[nvim-treesitter] [4/5] Treesitter parser for norg_meta has been installed
[nvim-treesitter] [5/5] Treesitter parser for norg has been installed

I switch to another NON-NORG file and then switch back to norg index.norg.
Then I get these messages:

"index.norg" 323L, 10058B
[nvim-treesitter] [5/11] Downloading tree-sitter-norg...
[nvim-treesitter] [5/11] Downloading tree-sitter-norg_meta...
[nvim-treesitter] [5/11] Downloading tree-sitter-norg_table...
[nvim-treesitter] [5/11] Downloading tree-sitter-norg...
[nvim-treesitter] [5/11] Downloading tree-sitter-norg_meta...
[nvim-treesitter] [5/11] Downloading tree-sitter-norg_table...
[nvim-treesitter] [5/11] Creating temporary directory
[nvim-treesitter] [5/11] Creating temporary directory
[nvim-treesitter] [5/11] Extracting tree-sitter-norg_table...
[nvim-treesitter] [5/11] Extracting tree-sitter-norg_meta...
[nvim-treesitter] [5/11] Creating temporary directory
nvim-treesitter[norg_meta]: Could not create tree-sitter-norg_meta-tmp
mkdir: tree-sitter-norg_meta-tmp: File exists
[nvim-treesitter] [6/11, failed: 1] Creating temporary directory
[nvim-treesitter] [6/11, failed: 1] Creating temporary directory
[nvim-treesitter] [6/11, failed: 1] Creating temporary directory
nvim-treesitter[norg_table]: Could not create tree-sitter-norg_table-tmp
mkdir: tree-sitter-norg_table-tmp: File exists
[nvim-treesitter] [7/11, failed: 2] Extracting tree-sitter-norg...
nvim-treesitter[norg]: Could not create tree-sitter-norg-tmp
mkdir: tree-sitter-norg-tmp: File exists
[nvim-treesitter] [8/11, failed: 3] Compiling...
[nvim-treesitter] [8/11, failed: 3] Compiling...
[nvim-treesitter] [9/11, failed: 3] Treesitter parser for norg_table has been installed
[nvim-treesitter] [9/11, failed: 3] Compiling...
[nvim-treesitter] [10/11, failed: 3] Treesitter parser for norg_meta has been installed
[nvim-treesitter] [11/11, failed: 3] Treesitter parser for norg has been installed

every time I switch back to the norg file the [nvim-treesitter] [xx/yy, ...]
xx and yy numbers get increasingly larger it seems.

As you can see above some of the messages say that neorg parser has been installed but when switching back to
the norg file it seems it tries to (re)install the parser again everytime and in the end nothing seems to happen?

Here is yet another dump of :messages when switching back and forth to the index.norg file:

Error detected while processing function 14[11]..function 14[7]..BufEnter Autocommands for "*.norg":
E5108: Error executing lua ...macos/share/nvim/runtime/lua/vim/treesitter/language.lua:26: no parser for 'norg' language, see :help treesitter-parsers^@stack traceback:^@^I[C]: in function 'error'^@^I...macos/shar
e/nvim/runtime/lua/vim/treesitter/language.lua:26: in function 'require_language'^@^I...ble/nvim-macos/share/nvim/runtime/lua/vim/treesitter.lua:38: in function '_create_parser'^@^I...ble/nvim-macos/share/nvim/run
time/lua/vim/treesitter.lua:96: in function 'get_parser'^@^I...ua/neorg/modules/core/integrations/treesitter/module.lua:511: in function 'get_document_root'^@^I...nvim/lazy/neorg/lua/neorg/modules/core/syntax/modu
le.lua:105: in function 'check_code_block_type'^@^I...nvim/lazy/neorg/lua/neorg/modules/core/syntax/module.lua:479: in function 'on_event'^@^I...obsson/.local/share/nvim/lazy/neorg/lua/neorg/events.lua:153: in fun
ction 'broadcast_event'^@^I...azy/neorg/lua/neorg/modules/core/autocommands/module.lua:44: in function '_neorg_module_autocommand_triggered'^@^I[string ":lua"]:1: in main chunk
[nvim-treesitter] [24/28, failed: 8] Downloading tree-sitter-norg...
[nvim-treesitter] [24/28, failed: 8] Downloading tree-sitter-norg_meta...
[nvim-treesitter] [24/28, failed: 8] Downloading tree-sitter-norg_table...
[nvim-treesitter] [24/28, failed: 8] Creating temporary directory
[nvim-treesitter] [24/28, failed: 8] Extracting tree-sitter-norg_table...
[nvim-treesitter] [24/28, failed: 8] Compiling...
[nvim-treesitter] [24/28, failed: 8] Creating temporary directory
[nvim-treesitter] [24/28, failed: 8] Extracting tree-sitter-norg_meta...
[nvim-treesitter] [24/28, failed: 8] Compiling...
[nvim-treesitter] [24/28, failed: 8] Creating temporary directory
[nvim-treesitter] [24/28, failed: 8] Extracting tree-sitter-norg...
[nvim-treesitter] [25/28, failed: 8] Treesitter parser for norg_table has been installed
[nvim-treesitter] [25/28, failed: 8] Compiling...
[nvim-treesitter] [26/28, failed: 8] Treesitter parser for norg_meta has been installed
Could not load parser for norg: "...macos/share/nvim/runtime/lua/vim/treesitter/language.lua:26: no parser for 'norg' language, see :help treesitter-parsers"
[nvim-treesitter] [27/28, failed: 8] Treesitter parser for norg has been installed
69 lines yanked
Error detected while processing BufEnter Autocommands for "*.norg":
E5108: Error executing lua ...macos/share/nvim/runtime/lua/vim/treesitter/language.lua:26: no parser for 'norg' language, see :help treesitter-parsers
stack traceback:
        [C]: in function 'error'
        ...macos/share/nvim/runtime/lua/vim/treesitter/language.lua:26: in function 'require_language'
        ...ble/nvim-macos/share/nvim/runtime/lua/vim/treesitter.lua:38: in function '_create_parser'
        ...ble/nvim-macos/share/nvim/runtime/lua/vim/treesitter.lua:96: in function 'get_parser'
        ...ua/neorg/modules/core/integrations/treesitter/module.lua:511: in function 'get_document_root'
        ...nvim/lazy/neorg/lua/neorg/modules/core/syntax/module.lua:105: in function 'check_code_block_type'
        ...nvim/lazy/neorg/lua/neorg/modules/core/syntax/module.lua:479: in function 'on_event'
        ...obsson/.local/share/nvim/lazy/neorg/lua/neorg/events.lua:153: in function 'broadcast_event'
        ...azy/neorg/lua/neorg/modules/core/autocommands/module.lua:44: in function '_neorg_module_autocommand_triggered'
        [string ":lua"]:1: in main chunk

checkhealth info

This is checkhealh run after starting up nvim and having run TSInstall norg with it saying norg parser has been installed

nvim-treesitter

nvim-treesitter: require("nvim-treesitter.health").check()
========================================================================
## Installation
  - OK: `tree-sitter` found 0.20.6 (parser generator, only needed for :TSInstallFromGrammar)
  - OK: `node` found v19.4.0 (only needed for :TSInstallFromGrammar)
  - OK: `git` executable found.
  - OK: `gcc-12` executable found. Selected from { "gcc-12", "cc", "gcc", "clang", "cl", "zig" }
    Version: gcc-12 (Homebrew GCC 12.2.0) 12.2.0
  - OK: Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.

## OS Info:
{
  machine = "x86_64",
  release = "22.2.0",
  sysname = "Darwin",
  version = "Darwin Kernel Version 22.2.0: Fri Nov 11 02:04:44 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T8103"
}

## Parser/Features         H L F I J
  - lua                 ✓ ✓ ✓ ✓ ✓
  - c                   ✓ ✓ ✓ ✓ ✓
  - help                ✓ . . . ✓
  - vim                 x ✓ ✓ . ✓

  Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections
         +) multiple parsers found, only one will be used
         x) errors found in the query, try to run :TSUpdate {lang}

## The following errors have been detected:
  - ERROR: vim(highlights): ...im-macos/share/nvim/runtime/lua/vim/treesitter/query.lua:219: query: invalid node type at position 2765 for language vim
    vim(highlights) is concatenated from the following files:
    | [ERROR]:"/Users/hjalmarjakobsson/.local/share/nvim/lazy/nvim-treesitter/queries/vim/highlights.scm", failed to load: ...im-macos/share/nvim/runtime/lua/vim/treesitter/query.lua:219: query: invalid node type at position 2765 for language vim

vim.treesitter

vim.treesitter: require("vim.treesitter.health").check()
========================================================================
  - INFO: Runtime ABI version : 14
  - OK: Loaded parser for lua: ABI version 13
  - OK: Loaded parser for norg_meta: ABI version 14
  - OK: Loaded parser for norg_table: ABI version 13
  - OK: Loaded parser for c: ABI version 13
  - OK: Loaded parser for help: ABI version 14
  - OK: Loaded parser for lua: ABI version 13
  - OK: Loaded parser for vim: ABI version 14

edit

This morning I tried again opening a neorg file and got similar messages to the above, and now when I ran :checkhealth
I can see the following under nvim-treesitter. I should also mention that this is after having ran :Neorg sync-parsers and returning that both norg meta and norg table has been installed.

## Parser/Features         H L F I J
  - norg_meta           ✓ . . ✓ .
  - norg_table          . . . . .
  - vim                 x ✓ ✓ . ✓
  - lua                 ✓ ✓ ✓ ✓ ✓
  - c                   ✓ ✓ ✓ ✓ ✓
  - help                ✓ . . . ✓
@molleweide
Copy link
Author

There is prolly something in our doom config that messes things up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant