Olical / aniseed

Neovim configuration and plugins in Fennel (Lisp compiled to Lua)
https://discord.gg/wXAMr8F
The Unlicense
606 stars 28 forks source link

Error in syntax highlighting #39

Closed aareman closed 3 years ago

aareman commented 3 years ago

Hey, trying out using a init.fnl file. Running in to syntax highlighting not working. If I run :e! I get

Error detected while processing /home/<home>/.config/nvim/plugged/aniseed/syntax/fennel.vim:
line  258:
E945: Range too large in character class
E475: Invalid argument: FennelSymbol "\v<%([\!\$%\&\#\*\+\-./:<=>?A-Z^_a-z|\x80-\U10FFFF])%([0-9\!\$%\&\#\*\+\-./:<=>?A-Z^_a-z|\x80
-\U10FFFF])*>"
line  259:
E945: Range too large in character class
E475: Invalid argument: FennelKeyword "\v<:%([0-9\!\$%\&\#\*\+\-./:<=>?A-Z^_a-z|\x80-\U10FFFF])*>"

and then the syntax highlighting works.

aniseedbug1

I thought the error might be in https://github.com/bakpakin/fennel.vim, but it says its in ../plugged/aniseed/syntax/fennel.vim

Checkhealth


health#nvim_treesitter#check
========================================================================
## Installation
  - WARNING: `tree-sitter` executable not found (parser generator, only needed for :TSInstallFromGrammar, not required for :TSInstall)
  - OK: `node` found v12.18.0 (only needed for :TSInstallFromGrammar)
  - OK: `git` executable found.
  - OK: `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl" }
  - OK: Neovim was compiled with tree-sitter runtime ABI version 13 (required >=13). Parsers must be compatible with runtime ABI.

## Parser/Features H L F I
  - ocaml_interface✓ ✓ ✓ . 
  - cpp            ✓ ✓ ✓ ✓ 
  - regex          ✓ . . . 
  - sparql         ✓ ✓ ✓ ✓ 
  - rust           ✓ ✓ ✓ ✓ 
  - lua            ✓ ✓ ✓ ✓ 
  - typescript     ✓ ✓ ✓ ✓ 
  - python         ✓ ✓ ✓ ✓ 
  - tsx            ✓ ✓ ✓ ✓ 
  - css            ✓ . ✓ ✓ 
  - go             ✓ ✓ ✓ ✓ 
  - svelte         ✓ . ✓ ✓ 
  - gomod          ✓ . . . 
  - zig            ✓ ✓ ✓ ✓ 
  - bibtex         ✓ . ✓ ✓ 
  - graphql        ✓ . . ✓ 
  - toml           ✓ ✓ ✓ ✓ 
  - latex          ✓ . ✓ . 
  - ruby           ✓ ✓ ✓ ✓ 
  - beancount      ✓ . ✓ . 
  - r              ✓ ✓ . . 
  - bash           ✓ ✓ ✓ . 
  - c              ✓ ✓ ✓ ✓ 
  - vue            ✓ . ✓ . 
  - turtle         ✓ ✓ ✓ ✓ 
  - php            ✓ ✓ ✓ ✓ 
  - jsonc          ✓ ✓ ✓ ✓ 
  - java           ✓ ✓ . ✓ 
  - query          ✓ ✓ ✓ ✓ 
  - kotlin         ✓ . . . 
  - fennel         ✓ ✓ . . 
  - nix            ✓ ✓ ✓ . 
  - html           ✓ ✓ ✓ ✓ 
  - jsdoc          ✓ . . . 
  - julia          ✓ ✓ . . 
  - comment        ✓ . . . 
  - glimmer        ✓ . . . 
  - json           ✓ ✓ ✓ ✓ 
  - ql             ✓ ✓ . ✓ 
  - javascript     ✓ ✓ ✓ ✓ 
  - teal           ✓ ✓ ✓ ✓ 
  - rst            ✓ ✓ . . 
  - dart           ✓ ✓ . ✓ 
  - yaml           ✓ ✓ ✓ ✓ 
  - verilog        ✓ ✓ ✓ . 
  - ocaml          ✓ ✓ ✓ . 
  - ledger         ✓ . ✓ ✓ 
  - clojure        ✓ ✓ . . 
  - c_sharp        ✓ . . . 

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

health#mkdp#check
========================================================================
  - INFO: Platform: linux
  - INFO: Nvim Version: NVIM v0.5.0-dev+1293-ga0da4c3a4
  - INFO: Pre build: /home/avraham/.config/nvim/plugged/markdown-preview.nvim/app/bin/markdown-preview-linux
  - INFO: Pre build version: 0.0.9
  - OK: Using pre build

health#coc#check
========================================================================
  - OK: Environment check passed

  - OK: Javascript bundle build/index.js found
  - OK: Service started

health#targets#check
========================================================================
  - OK: No conflicting mappings found

health#nvim#check
========================================================================
## Configuration
  - OK: no issues found

## Performance
  - OK: Build type: RelWithDebInfo
    LuaJIT

## Remote Plugins
  - OK: Up to date

## terminal
  - INFO: key_backspace (kbs) terminfo entry: key_backspace=\177
  - INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~
  - INFO: $COLORTERM='truecolor'

## tmux
  - OK: escape-time: 0
  - INFO: Checking stuff
  - OK: focus-events: on
  - INFO: $TERM: xterm-256color
  - INFO: default-terminal: tmux-256color
  - ERROR: $TERM differs from the tmux `default-terminal` setting. Colors might look wrong.
    - ADVICE:
      - $TERM may have been set by some rc (.bashrc, .zshrc, ...).

health#provider#check
========================================================================
## Clipboard (optional)
  - OK: Clipboard tool found: xclip

## Python 2 provider (optional)
  - INFO: `g:python_host_prog` is not set.  Searching for python2 in the environment.
  - INFO: Executable: /usr/bin/python2
  - INFO: Python version: 2.7.18
  - INFO: pynvim version: 0.4.1 (outdated; from ~/.local/lib/python2.7/site-packages/neovim)
  - WARNING: Latest pynvim is NOT installed: 0.4.3

## Python 3 provider (optional)
  - INFO: `g:python3_host_prog` is not set.  Searching for python3 in the environment.
  - INFO: Executable: /usr/bin/python3
  - INFO: Python version: 3.8.5
  - INFO: pynvim version: 0.4.3
  - OK: Latest pynvim is installed.

## Python virtualenv
  - OK: no $VIRTUAL_ENV

## Ruby provider (optional)
  - INFO: Ruby: ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]
  - WARNING: `neovim-ruby-host` not found.
    - ADVICE:
      - Run `gem install neovim` to ensure the neovim RubyGem is installed.
      - Run `gem environment` to ensure the gem bin directory is in $PATH.
      - If you are using rvm/rbenv/chruby, try "rehashing".
      - See :help |g:ruby_host_prog| for non-standard gem installations.

## Node.js provider (optional)
  - INFO: Node.js: v12.18.0
  - INFO: Nvim node.js host: /home/avraham/.config/yarn/global//node_modules/neovim/bin/cli.js
  - WARNING: Package "neovim" is out-of-date. Installed: 4.8.0, latest: 4.10.0
    - ADVICE:
      - Run in shell: npm install -g neovim
      - Run in shell (if you use yarn): yarn global add neovim

## Perl provider (optional)
  - ERROR: perl provider error:
    - ADVICE:
      - "Neovim::Ext" cpan module is not installed

health#treesitter#check
========================================================================
## Checking treesitter configuration
  - INFO: Runtime ABI version : 13
  - OK: Loaded parser for bash: ABI version 13
  - OK: Loaded parser for beancount: ABI version 13
  - OK: Loaded parser for bibtex: ABI version 13
  - OK: Loaded parser for c: ABI version 13
  - OK: Loaded parser for c_sharp: ABI version 13
  - OK: Loaded parser for clojure: ABI version 13
  - OK: Loaded parser for comment: ABI version 13
  - OK: Loaded parser for cpp: ABI version 13
  - OK: Loaded parser for css: ABI version 13
  - OK: Loaded parser for dart: ABI version 13
  - ERROR: Impossible to load parser for devicetree: ...s/usr/share/nvim/runtime/lua/vim/treesitter/language.lua:33: ABI version mismatch for /home/avraham/.config/nvim/plugged/nvim-treesitter/parser/devicetree.so: supported between 13 and 13, found 12
  - ERROR: Impossible to load parser for erlang: ...s/usr/share/nvim/runtime/lua/vim/treesitter/language.lua:33: ABI version mismatch for /home/avraham/.config/nvim/plugged/nvim-treesitter/parser/erlang.so: supported between 13 and 13, found 12
  - OK: Loaded parser for fennel: ABI version 13
  - ERROR: Impossible to load parser for gdscript: ...s/usr/share/nvim/runtime/lua/vim/treesitter/language.lua:33: ABI version mismatch for /home/avraham/.config/nvim/plugged/nvim-treesitter/parser/gdscript.so: supported between 13 and 13, found 12
  - OK: Loaded parser for glimmer: ABI version 13
  - OK: Loaded parser for go: ABI version 13
  - OK: Loaded parser for gomod: ABI version 13
  - OK: Loaded parser for graphql: ABI version 13
  - OK: Loaded parser for html: ABI version 13
  - OK: Loaded parser for java: ABI version 13
  - OK: Loaded parser for javascript: ABI version 13
  - OK: Loaded parser for jsdoc: ABI version 13
  - OK: Loaded parser for json: ABI version 13
  - OK: Loaded parser for jsonc: ABI version 13
  - OK: Loaded parser for julia: ABI version 13
  - OK: Loaded parser for kotlin: ABI version 13
  - OK: Loaded parser for latex: ABI version 13
  - OK: Loaded parser for ledger: ABI version 13
  - OK: Loaded parser for lua: ABI version 13
  - OK: Loaded parser for nix: ABI version 13
  - OK: Loaded parser for ocaml: ABI version 13
  - OK: Loaded parser for ocaml_interface: ABI version 13
  - ERROR: Impossible to load parser for ocamllex: ...s/usr/share/nvim/runtime/lua/vim/treesitter/language.lua:33: ABI version mismatch for /home/avraham/.config/nvim/plugged/nvim-treesitter/parser/ocamllex.so: supported between 13 and 13, found 11
  - OK: Loaded parser for php: ABI version 13
  - OK: Loaded parser for python: ABI version 13
  - OK: Loaded parser for ql: ABI version 13
  - OK: Loaded parser for query: ABI version 13
  - OK: Loaded parser for r: ABI version 13
  - OK: Loaded parser for regex: ABI version 13
  - OK: Loaded parser for rst: ABI version 13
  - OK: Loaded parser for ruby: ABI version 13
  - OK: Loaded parser for rust: ABI version 13
  - OK: Loaded parser for sparql: ABI version 13
  - ERROR: Impossible to load parser for supercollider: ...s/usr/share/nvim/runtime/lua/vim/treesitter/language.lua:33: ABI version mismatch for /home/avraham/.config/nvim/plugged/nvim-treesitter/parser/supercollider.so: supported between 13 and 13, found 12
  - OK: Loaded parser for svelte: ABI version 13
  - OK: Loaded parser for teal: ABI version 13
  - OK: Loaded parser for toml: ABI version 13
  - OK: Loaded parser for tsx: ABI version 13
  - OK: Loaded parser for turtle: ABI version 13
  - OK: Loaded parser for typescript: ABI version 13
  - OK: Loaded parser for verilog: ABI version 13
  - OK: Loaded parser for vue: ABI version 13
  - OK: Loaded parser for yaml: ABI version 13
  - OK: Loaded parser for zig: ABI version 13
  - OK: Loaded parser for c: ABI version 13
Olical commented 3 years ago

So Aniseed actually includes it's own copy of Fennel syntax highlighting now that probably takes precedence? It's basically this repo that I integrated into Aniseed: https://github.com/Olical/fennel.vim which is just a fork of the one you mentioned with some Aniseed specific things added.

I get the impression that this might depend on your OS, Neovim build and version 🤔 feels like it's hitting some rule limit in your setup?

Would you be able to share your nvim --version and OS / architecture information? Just to narrow things down? I suspect we can just tweak one of the highlighting regexes to get around this for you without breaking things.

Oh other thing to note, my fork of fennel.vim (which is included with Aniseed) includes the outstanding PRs from the fennel.vim repo, so I'm trying to integrate work others have done, maybe one of those changes introduced this issue.

For the record, I've never seen this, so I think it's a very system dependent error.

aareman commented 3 years ago

Sure.

:version

NVIM v0.5.0-dev+1293-ga0da4c3a4
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-
prototypes -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN
_LOG_LEVEL=3 -I/home/runner/work/neovim/neovim/build/config -I/home/runner/work/neovim/neovim/src -I/home/runner/work/neovim/neovim/.deps/usr/include -I/usr/include -I/home/runner/work/n
eovim/neovim/build/src/nvim/auto -I/home/runner/work/neovim/neovim/build/include
Compiled by runner@fv-az84-827

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/home/runner/work/neovim/neovim/build/nvim.AppDir/usr/share/nvim"

Run :checkhealth for more info
Press ENTER or type command to continue

cat /etc/*-release

image

Olical commented 3 years ago

Do you have bakpakin/fennel.vim installed as well as Aniseed? Because they're probably conflicting if so 🤔 I still have no hunches about this, I can only imagine it's to do with available RAM or even processor architecture (32bit?). All of those are long shots, but all I can think of right now.

Unless there's a vim option that can chance some limit that you have lower than others 🤔

aareman commented 3 years ago

I adjusted the setting set regexpengine = 0​ and now the error is not showing up. I had it set to 1​ before from a long time ago for performance reasons. Seems to work fine now though.


From: Oliver Caldwell @.> Sent: Saturday, May 22, 2021 6:22 AM To: Olical/aniseed @.> Cc: Avraham Areman @.>; Author @.> Subject: Re: [Olical/aniseed] Error in syntax highlighting (#39)

Do you have bakpakin/fennel.vim installed as well as Aniseed? Because they're probably conflicting if so 🤔 I still have no hunches about this, I can only imagine it's to do with available RAM or even processor architecture (32bit?). All of those are long shots, but all I can think of right now.

Unless there's a vim option that can chance some limit that you have lower than others 🤔

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Olical/aniseed/issues/39#issuecomment-846387809, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACQDVV2Y5SUQGAM3MC74LB3TO6AWXANCNFSM44BCIDXQ.

Olical commented 3 years ago

Oh cool! Glad to hear that! I'll close this for now since I have no idea what I can do about it other than simplifying the regexp that I've decided to sort of inherit / fork into this repo 😅