From e330b8c8a8f02e3983a4f5ce7aabdda47cb4e825 Mon Sep 17 00:00:00 2001 From: Anish L Date: Wed, 10 Aug 2022 01:33:20 +1000 Subject: [PATCH] supercollider nvim --- users/profiles/nvim/default.nix | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/users/profiles/nvim/default.nix b/users/profiles/nvim/default.nix index 3f3a7506..832d9470 100644 --- a/users/profiles/nvim/default.nix +++ b/users/profiles/nvim/default.nix @@ -646,8 +646,28 @@ in require('leap').set_default_keymaps() -- supercollider - require('scnvim').setup() - require("luasnip").add_snippets("supercollider", require("scnvim/utils").get_snippets()) + local scnvim = require 'scnvim' + local map = scnvim.map + local map_expr = scnvim.map_expr + scnvim.setup { + keymaps = { + ['e'] = map('editor.send_line', {'i', 'n'}), + ['t'] = { + map('editor.send_block', {'i', 'n'}), + map('editor.send_selection', 'x'), + }, + [''] = map('postwin.toggle'), + [''] = map('postwin.toggle', 'i'), + [''] = map('postwin.clear', {'n', 'i'}), + [''] = map('signature.show', {'n', 'i'}), + [''] = map('sclang.hard_stop', {'n', 'x', 'i'}), + ['st'] = map('sclang.start'), + ['sk'] = map('sclang.recompile'), + [''] = map_expr('s.boot'), + [''] = map_expr('s.meter'), + } + } + -- require("luasnip").add_snippets("supercollider", require("scnvim/utils").get_snippets()) EOF '';