From d33d907f53c50d323eca75c4bfc02ab5b989b30a Mon Sep 17 00:00:00 2001 From: dacctal Date: Mon, 27 Apr 2026 05:30:46 +0000 Subject: added bare plugins --- .config/vis/plugins/vis-lspc/bindings.lua | 87 +++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 .config/vis/plugins/vis-lspc/bindings.lua (limited to '.config/vis/plugins/vis-lspc/bindings.lua') diff --git a/.config/vis/plugins/vis-lspc/bindings.lua b/.config/vis/plugins/vis-lspc/bindings.lua new file mode 100644 index 0000000..7859ebb --- /dev/null +++ b/.config/vis/plugins/vis-lspc/bindings.lua @@ -0,0 +1,87 @@ +-- Copyright (c) 2021 Florian Fischer. All rights reserved. +-- +-- This file is part of vis-lspc. +-- +-- vis-lspc is free software: you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation, either version 3 of the License, or (at your option) any later +-- version. +-- +-- vis-lspc is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License along with +-- vis-lspc found in the LICENSE file. If not, see . +-- +-- vis-lspc default bindings +vis:map(vis.modes.NORMAL, '', function() + vis:command('lspc-start-server') +end, 'lspc: start lsp server') + +vis:map(vis.modes.NORMAL, '', function() + vis:command('lspc-open') +end, 'lspc: open current file') + +vis:map(vis.modes.NORMAL, '', function() + vis:command('lspc-definition') +end, 'lspc: jump to definition') + +vis:map(vis.modes.NORMAL, '', function() + vis:command('lspc-back') +end, 'lspc: go back position stack') + +vis:map(vis.modes.NORMAL, '', function() + vis:command('lspc-completion') +end, 'lspc: completion') + +vis:map(vis.modes.INSERT, '', function() + vis:command('lspc-completion') + vis.mode = vis.modes.INSERT +end, 'lspc: completion') + +-- bindings inspired by nvim +-- https://github.com/neovim/nvim-lspconfig +vis:map(vis.modes.NORMAL, 'gD', function() + vis:command('lspc-declaration') +end, 'lspc: jump to declaration') + +vis:map(vis.modes.NORMAL, 'gd', function() + vis:command('lspc-definition') +end, 'lspc: jump to definition') + +vis:map(vis.modes.NORMAL, 'gi', function() + vis:command('lspc-implementation') +end, 'lspc: jump to implementation') + +vis:map(vis.modes.NORMAL, 'gr', function() + vis:command('lspc-references') +end, 'lspc: show references') + +vis:map(vis.modes.NORMAL, ' D', function() + vis:command('lspc-typeDefinition') +end, 'lspc: jump to type definition') + +vis:map(vis.modes.NORMAL, ' e', function() + vis:command('lspc-show-diagnostics') +end, 'lspc: show diagnostic of current line') + +vis:map(vis.modes.NORMAL, ' n', function() + vis:command('lspc-next-diagnostic') +end, 'lspc: jump to the next available diagnostic') + +vis:map(vis.modes.NORMAL, ' N', function() + vis:command('lspc-prev-diagnostic') +end, 'lspc: jump to the previous available diagnostic') + +vis:map(vis.modes.NORMAL, 'K', function() + vis:command('lspc-hover') +end, 'lspc: hover over current position') + +vis:map(vis.modes.NORMAL, '', function() + vis:command('lspc-signature-help') +end, 'lspc: signature help') + +vis:map(vis.modes.NORMAL, ' o', function() + vis:command('lspc-navigate-symbols') +end, 'lspc: symbol navigation window') -- cgit v1.2.3