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

[FR]: Document installation using Lazy #254

Open
Bubobubobubobubo opened this issue Jan 24, 2025 · 0 comments
Open

[FR]: Document installation using Lazy #254

Bubobubobubobubo opened this issue Jan 24, 2025 · 0 comments

Comments

@Bubobubobubobubo
Copy link

Hi, I have switched my config to Lazy and always encounter troubles when occasionally re-installing scnvim. Nothing dramatic, but the way I install it is a bit baroque. I don't have an extensive knowledge of the Neovim internals. I'm able to get it working by tweaking my init.lua but not following the workflow that Lazy (partially) enforces.

Describe the solution you'd like

I'm suggesting the addition of a few lines in the README.md file to document the installation process with more package managers, including Lazy. There are a few lines about this already on the forum.

Describe alternatives you've considered

I have not considered any alternative since I am not really having an issue with scnvim itself.

Additional context

This is how I always end up installing it:

  1. adding the plugin the Lazy way:
  {
    'davidgranstrom/scnvim',
    name = 'scnvim',
    priority = 1000,
    opts = {
      editor = {
        highlight = {
          color = 'IncSearch',
        },
      },
      postwin = {
        float = {
          enabled = false,
        },
      },
    },
  },
  1. manually pasting everything else at the bottom of the file, without really thinking twice.
local scnvim = require 'scnvim'
local map = scnvim.map
local map_expr = scnvim.map_expr
scnvim.setup {
  keymaps = {
    ['<M-e>'] = map('editor.send_line', { 'i', 'n' }),
    ['<C-e>'] = {
      map('editor.send_block', { 'i', 'n' }),
      map('editor.send_selection', 'x'),
    },
    ['<CR>'] = map 'postwin.toggle',
    ['<M-CR>'] = map('postwin.toggle', 'i'),
    ['<M-L>'] = map('postwin.clear', { 'n', 'i' }),
    ['<C-k>'] = map('signature.show', { 'n', 'i' }),
    ['<F12>'] = map('sclang.hard_stop', { 'n', 'x', 'i' }),
    ['<leader>st'] = map 'sclang.start',
    ['<leader>sk'] = map 'sclang.recompile',
    ['<F1>'] = map_expr 's.boot',
    ['<F2>'] = map_expr 's.meter',
  },
}

I can probably help with a PR when I'll have spare time to debug my computer :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant