Configuration for my NixOS based systems and Home Manager
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

FIX: visrc

+40 -21
+40 -21
vis/visrc.lua
··· 1 - local vis = require('vis') 2 - 3 - local plug = require('plugins/vis-plug') 4 - 1 + require('vis') 2 + local plugin_manager = 'plugins/vis-plug' 5 3 local plugins = { 6 4 { 'timoha/vis-acme', theme = true, file = 'acme' }, 7 5 { 'milhnl/vis-format' }, ··· 9 7 { url = 'https://gitlab.com/muhq/vis-lspc.git' }, 10 8 { url = 'https://repo.or.cz/vis-parkour.git', alias = 'vis-parkour' } 11 9 } 10 + 11 + function setup_plug() 12 + if not pcall(require, 'plugins/vis-plug') then 13 + os.execute('git clone --quiet https://github.com/erf/vis-plug ' .. 14 + (os.getenv('XDG_CONFIG_HOME') or os.getenv('HOME') .. '/.config') 15 + .. '/vis/plugins/vis-plug') 16 + end 17 + return require('plugins/vis-plug') 18 + end 19 + local plug = setup_plug() 12 20 13 21 plug.init(plugins, true) 14 22 23 + function configure_plugin(name, config) 24 + if vis:module_exist(name) then 25 + local module = require(name) 26 + config(module) 27 + end 28 + end 29 + 15 30 vis.events.subscribe(vis.events.INIT, function() 16 - local format = require('plugins/vis-format') 17 - vis:map(vis.modes.NORMAL, '<C-p>', ':fzf<Enter>') 18 - vis:map(vis.modes.NORMAL, '=', format.apply) 19 - local lspc = require('plugins/vis-lspc') 20 - if next(lspc) then 21 - lspc.logging = true 22 - lspc.log_file = "/tmp/lspc.log" 31 + configure_plugin('plugins/vis-format', function(format) 32 + vis:map(vis.modes.NORMAL, '<C-p>', ':fzf<Enter>') 33 + vis:map(vis.modes.NORMAL, '=', format.apply) 34 + end) 35 + configure_plugin('plugins/vis-lspc', function(lspc) 36 + if next(lspc) then 37 + lspc.logging = true 38 + lspc.log_file = "/tmp/lspc.log" 23 39 24 - lspc.ls_map.rust = { 25 - name = "rust", 26 - cmd = "rust-analyzer", 27 - formatting_options = {tabSize = 4, insertSpaces = true} 28 - } 29 - end 40 + lspc.ls_map.rust = { 41 + name = "rust", 42 + cmd = "rust-analyzer", 43 + formatting_options = {tabSize = 4, insertSpaces = true} 44 + } 45 + lspc.ls_map.lua = { 46 + name = "lua", 47 + cmd = "lua-language-server", 48 + formatting_options = { insertSpaces = false } 49 + } 50 + end 51 + end) 30 52 end) 31 53 32 54 ··· 39 61 vis:command('set cursorline on') 40 62 vis:command('set tabwidth 4') 41 63 end) 42 - 43 - 44 - 45 - 64 + return nil