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

Seems to clash with Telescope (or zk.nvim?) #7

Open
mawkler opened this issue Jan 18, 2024 · 0 comments
Open

Seems to clash with Telescope (or zk.nvim?) #7

mawkler opened this issue Jan 18, 2024 · 0 comments

Comments

@mawkler
Copy link

mawkler commented Jan 18, 2024

Seems to clash with Telescope (or zk.nvim?)

Hi! This plugin looks really promising. However, it seems to clash with zk.nvim, causing a telescope.nvim error. This is the error that I get:

Error executing vim.schedule lua callback: ...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:459: User Autocommands for "TelescopePreviewerLoaded": Vim(append):Error executing lua callback: .../share/
nvim/lazy/ltex-utils.nvim/lua/ltex-utils/init.lua:66: attempt to index field 'bufname' (a nil value)
stack traceback:
        .../share/nvim/lazy/ltex-utils.nvim/lua/ltex-utils/init.lua:66: in function <.../share/nvim/lazy/ltex-utils.nvim/lua/ltex-utils/init.lua:64>
        [C]: in function 'nvim_exec_autocmds'
        ...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:460: in function <...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:459>
        [C]: in function 'nvim_buf_call'
        ...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:459: in function <...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:453>
stack traceback:
        [C]: in function 'nvim_buf_call'
        ...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:459: in function <...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:453>

Here's a minimal version of my config with the error:

Click to expand
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    'git',
    'clone',
    '--filter=blob:none',
    'https://github.com/folke/lazy.nvim.git',
    '--branch=stable', -- latest stable release
    lazypath,
  })
end
vim.opt.rtp:prepend(lazypath)

require('lazy').setup({
  {
    'neovim/nvim-lspconfig',
    dependencies = {
      'williamboman/mason.nvim',
      'williamboman/mason-lspconfig.nvim',
      'hrsh7th/nvim-cmp',
      'jhofscheier/ltex-utils.nvim',
    },
    config = function()
      require('mason').setup({})
      require('mason-lspconfig').setup_handlers {
        function(server_name)
          require('lspconfig')[server_name].setup {}
        end,
        ltex = function()
          require('lspconfig').ltex.setup({
            on_attach = function(_, buf)
              require('ltex-utils').on_attach(buf)
            end,
            settings = {
              ltex = {},
            },
          })
        end,
      }
    end,
  },
  {
    'jhofscheier/ltex-utils.nvim',
    dependencies = { 'neovim/nvim-lspconfig', 'nvim-telescope/telescope.nvim', 'nvim-lua/plenary.nvim' },
    opts = {},
  },
  {
    'mickael-menu/zk-nvim',
    requires = 'nvim-lua/plenary.nvim',
    config = function()
      require('zk').setup({ picker = 'telescope' })
    end,
  },
})

I get the issue when I do :ZkNotes in a Markdown file. Do you have any guess what the problem could be?

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