aboutsummaryrefslogtreecommitdiff
path: root/.config/vis/visrc.lua
blob: 84b7e7d6735faa0522e3c443699ba670db0c3d12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
require('vis')

								-- config --

-- global
vis.events.subscribe(vis.events.INIT, function()
	vis:command("set theme caelus")
end)
-- per-window
vis.events.subscribe(vis.events.WIN_OPEN, function(win)
	vis:command("set tabwidth 2")
	vis:command("set numbers true") vis:command("set autoindent true")
	vis:command("set showspaces false")
	vis:command("set showtabs false")
	vis:command("set expandtab on")
	vis:command("set shell /usr/bin/env sh")
	vis:map(vis.modes.VISUAL," y", '"+y"')
	vis:map(vis.modes.NORMAL, " fm", function()
		vis:command("open .")
		vis:feedkeys("<C-w>k")
		vis:command("wq!")
	end, "")
end)

								-- plugins --

-- modal
local modal = require('plugins/vis-modal')
-- vis-autoclose
local autoclose = require('plugins/vis-autoclose')
-- colorizer
local colorizer = require('plugins/vis-colorizer')
colorizer.three = false
colorizer.six   = true
-- complete-filename
local completefilename = require('plugins/complete-filename')
-- vis-lspc
local lsp = require('plugins/vis-lspc')
--lsp.ls_map.clangd = {
--	formatting_options = {tabSize = 2, insertSpaces = false}
--}
lsp.ls_map.lua = {
	name = 'lua-language-server',
	cmd = 'lua-language-server',
	settings = {
		Lua = {diagnostics = { globals = {'vis'}}, telemetry = {enable = false}},
	},
	formatting_options = {tabSize = 2, insertSpaces = true},
}