liquidz / vim-iced

Clojure Interactive Development Environment for Vim8/Neovim
https://liquidz.github.io/vim-iced/
MIT License
516 stars 35 forks source link

Lazy.nvim installation #468

Closed Befo closed 8 months ago

Befo commented 8 months ago

Hello, I am trying to install vim-iced through https://github.com/folke/lazy.nvim and I doesn't seem to be working. I am using this configuration.

{ 'liquidz/vim-iced', dependencies = { { 'guns/vim-sexp' }, }, config = function() vim.g.iced_enable_default_key_mappings = true end }

if I add require('vim-iced').setup() in the config function I get this message.

Failed to run config for vim-iced

/home/xxxxxxx/linux-config/nvim/init.lua:176: module 'vim-iced' not found

From the logs it looks like it is installed correctly but it fails to load and I cannot access the :Iced... commands, but I can use the iced cli.

Am I loading it the wrong way?

rafpaf commented 8 months ago

Can you give a little more context @Befo?

For what it's worth, the following works for me:

-- This gets added to a `plugins` table
{'liquidz/vim-iced',
  ft = {'clojure'},
  config = function() 
    vim.g.iced_enable_default_key_mappings = true
    vim.g.iced_default_key_mapping_leader = '<LocalLeader>'
  end
}

-- Then I initialize lazy with that `plugins` table
require("lazy").setup(plugins, lazy_options)

I don't run require("vim-iced").setup().

Befo commented 8 months ago

Hello @rafpaf, I found out what was wrong but I forgot I opened this thread. The plugin was not loading because I didn't specify a filetype like you did nor used the enabled = true option. My bad. We can close this thread, it's solved.