Giter Club home page Giter Club logo

Comments (11)

romgrk avatar romgrk commented on June 6, 2024

The plugin isn't touching any window except its own floating window. @liuchengxu, do you know if this is something that could be caused by vim-which-key?

from nvim-treesitter-context.

liuchengxu avatar liuchengxu commented on June 6, 2024

Have no idea. The strange thing is when g:which_key_use_floating_win is 1, s:show_old_win should not be called, https://github.com/liuchengxu/vim-which-key/blob/794e18deb5e58d261047a774b7d5c0c78d81e9ef/autoload/which_key/window.vim#L161-L164 . What is the value of g:which_key_use_floating_win? @SandWoodJones

from nvim-treesitter-context.

SandWoodJones avatar SandWoodJones commented on June 6, 2024

I've tested with g:which_key_use_floating_win=0 and there is no problem since which-key uses its own popup window, but I currently use g:which_key_use_floating_win=1.

from nvim-treesitter-context.

liuchengxu avatar liuchengxu commented on June 6, 2024

What I mean is s:show_old_win() should not be invoked when g:which_key_use_floating_win is 1, so the error message does not make sense to me. I can take a look if you provide a minimal vimrc, I don't use tree-sitter, so please make the minimal vimrc really simple to reproduce.

from nvim-treesitter-context.

SandWoodJones avatar SandWoodJones commented on June 6, 2024

minimal rc:

require('nvim-treesitter.configs').setup {
        highlight = {
                enable = true
        }
}

vim.wo.number = true
vim.g.mapleader = ' '   -- Map leader to spacebar
vim.api.nvim_set_keymap('n', '<leader>', ':<c-u>WhichKey "<Space>"<CR>', {noremap = true, silent = true})
vim.g.which_key_use_floating_win = 0

steps to reproduce:

  1. Enter a treesitter context (A function for instance)
  2. Have nvim-treesitter-context display the current context
  3. Invoke which-key
  4. exit which-key

from nvim-treesitter-context.

liuchengxu avatar liuchengxu commented on June 6, 2024

Don't know how to set this up as I don't use Lua config either :).

from nvim-treesitter-context.

SandWoodJones avatar SandWoodJones commented on June 6, 2024

Well in neovim it would be the same as loading any regular init.vim, but here is the vimscript version

lua << EOF
    require'nvim-treesitter.configs'.setup {
        highlight = {
            enable = true
         }
    }
EOF

set number
let g:mapleader=' '
nnoremap <silent> <Leader> :<c-u>WhichKey "<Space>"<CR>
let g:which_key_use_floating_win=0

from nvim-treesitter-context.

liuchengxu avatar liuchengxu commented on June 6, 2024

I'm using this minimal vimrc:

call plug#begin('~/.vim/plugged')
Plug 'romgrk/nvim-treesitter-context'
Plug 'nvim-treesitter/nvim-treesitter'
Plug 'liuchengxu/vim-which-key'
call plug#end()

lua << EOF
    require'nvim-treesitter.configs'.setup {
        highlight = {
            enable = true
         }
    }
EOF

set number
let g:mapleader=' '
nnoremap <silent> <Leader> :<c-u>WhichKey "<Space>"<CR>
let g:which_key_use_floating_win=0

But runs into this error and I'm too lazy to resolve it.

Error detected while processing FileType Autocommands for "*":
E5108: Error executing lua ...496b9/share/nvim/runtime/lua/vim/treesitter/language.lua:33: ABI version mismatch for /Users/xuliucheng/.vim/plugged/nvim-
treesitter/parser/rust.so: supported between 9 and 12, found 13
Error detected while processing BufEnter Autocommands for "*":
E5108: Error executing lua ...496b9/share/nvim/runtime/lua/vim/treesitter/language.lua:33: ABI version mismatch for /Users/xuliucheng/.vim/plugged/nvim-
treesitter/parser/rust.so: supported between 9 and 12, found 13

from nvim-treesitter-context.

SandWoodJones avatar SandWoodJones commented on June 6, 2024

Did you install the rust parser with :TSInstall rust? If so then maybe this solves it?

from nvim-treesitter-context.

romgrk avatar romgrk commented on June 6, 2024

Compiling the grammar from source can fix the tree-sitter ABI change problem: :TSInstallFromGrammar rust.

from nvim-treesitter-context.

lewis6991 avatar lewis6991 commented on June 6, 2024

This issue is very stale and with little indication that this is an issue with this plugin. Closing.

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.