Giter Club home page Giter Club logo

Comments (14)

romgrk avatar romgrk commented on May 26, 2024 1

Leave open if it's not solved, no need to close.

As for the issue, is it reproducible with no other plugins but TS and TS-context? If not, can you do a binary search to pinpoint the plugin that interacts badly with this one?

from nvim-treesitter-context.

vilari-mickopf avatar vilari-mickopf commented on May 26, 2024 1

@tex Remove syntax enable from the beginning of the config and add it after treesitter is loaded (in my case that's after dein#end() line.

from nvim-treesitter-context.

romgrk avatar romgrk commented on May 26, 2024

Can't reproduce, can you give more details?

from nvim-treesitter-context.

cwebster2 avatar cwebster2 commented on May 26, 2024

https://github.com/romgrk/nvim-treesitter-context/blob/91869ed307084836e45abcf63a4fc0aee66a2d6e/lua/treesitter-context.lua#L369-L375 are the lines causing the error. I'm not reproing in a minimum config so this might be an interaction with something but I have not identified what, yet. I'm still investigating on my end for root cause.

from nvim-treesitter-context.

romgrk avatar romgrk commented on May 26, 2024

Ok, maybe removing the silents there might give more details.

from nvim-treesitter-context.

vilari-mickopf avatar vilari-mickopf commented on May 26, 2024

Why is this closed? I have the same issue. Interestingly , if I open a file with nvim test.py it throws those errors, but if i open blank page with startify first, and then the file, it works just fine.
Removing silent haven't produced more details.

from nvim-treesitter-context.

vilari-mickopf avatar vilari-mickopf commented on May 26, 2024

Additionally, it seems that function after autogroups M.update_context() is causing errors at the startup. If I comment this line, open a file and then execute :TSContextEnable, then no error is displayed, and context works just fine.

from nvim-treesitter-context.

cwebster2 avatar cwebster2 commented on May 26, 2024

i closed it myself as i havent been able to devote time to finding root cause. I am opining it back up.

from nvim-treesitter-context.

vilari-mickopf avatar vilari-mickopf commented on May 26, 2024

Ok, so with all plugins disabled, it still throws all of those errors, but if I remove syntax on and syntax enable from the top of my init.vim, then it works again.

Also, I would like it more if plugin is disabled by default, and to open the context only when i really need it, so providing an option like context.vim:

let g:context_enabled = 0/1

seems like a natural thing to have.

from nvim-treesitter-context.

romgrk avatar romgrk commented on May 26, 2024

We should probably wait until everything is loaded before enabling the plugin, something like autocmd VimEnter * TSContextEnable, maybe nvim-treesitter isn't done loading yet.

from nvim-treesitter-context.

vilari-mickopf avatar vilari-mickopf commented on May 26, 2024

Is it reproducible for you now?

We should probably wait until everything is loaded before enabling the plugin, something like autocmd VimEnter * TSContextEnable, maybe nvim-treesitter isn't done loading yet.

This is fine with me. I've deleted syntax enable from top of my init.vim, because I
don't really need it there, so I'm currently not experiencing this issue.

from nvim-treesitter-context.

romgrk avatar romgrk commented on May 26, 2024

Not reproducible with the latest build from master, on archlinux.

from nvim-treesitter-context.

vilari-mickopf avatar vilari-mickopf commented on May 26, 2024

I am using latest neovim-nightly-bin from aur.

Output of nvim --version:

NVIM v0.5.0-dev+1177-g095f5da79
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/neovim/neovim/build/src/nvim/auto -I/home/runner/work/neovim/neovim/build/include
Compiled by runner@fv-az49-10

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

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/share/nvim"

Run :checkhealth for more info

And for me it is reproducable with this init.vim file

syntax enable

set runtimepath+=~/.cache/dein/repos/github.com/Shougo/dein.vim

call dein#begin('~/.cache/dein')
call dein#add('~/.cache/dein/repos/github.com/Shougo/dein.vim')

call dein#add('nvim-treesitter/nvim-treesitter')
call dein#add('romgrk/nvim-treesitter-context')

call dein#end()
filetype plugin indent on
syntax enable

As I said, I've removed syntax enable from my init.vim, so this is not an issue for me any more, but still, I don't think that the plugin should behave like this in such case. Maybe @cwebster2 can check if syntax enable/on is causing problems for him as well.

from nvim-treesitter-context.

tex avatar tex commented on May 26, 2024

I have the same problem. syntax enable. When removed, it doesn't show the error.

from nvim-treesitter-context.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.