-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.lua
63 lines (51 loc) · 1.59 KB
/
init.lua
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
vim.loader.enable()
vim.g.mapleader=" "
vim.g.maplocalleader=[[\<space>]]
--vim.lsp.set_log_level("debug")
pcall(require, 'paths')
require('globals')
require('vd')
local ok, mod = pcall(require, 'plenary.reload')
if not ok then
print("Planery Not Available"..mod)
else
mod.reload_module("vd.", true)
end
vim.o.number = true
vim.o.signcolumn = "yes" -- always have signcolumn so text doesn't move right
vim.o.colorcolumn = "120"
vim.o.hidden = true
vim.o.showbreak = "↪"
vim.o.smartindent = true
vim.o.list = true
vim.o.shiftround = true
vim.o.scrolloff = 3
vim.opt.splitkeep = "screen"
-- title
vim.opt.title = true
-- Tab options
vim.o.tabstop = 4
vim.o.shiftwidth = 4
vim.o.softtabstop = 4
-- set expandtab
-- :retab changes tab to space if expandtab is set or vice versa
-- Search
vim.o.ignorecase = true
vim.o.smartcase = true
vim.opt.grepprg = 'rg --vimgrep'
vim.opt.grepformat = "%f:%l:%c:%m"
vim.opt.joinspaces = false
-- filetype plugin indent on
vim.opt.isfname:append({'{', '}'})
vim.opt.isfname:remove({'='})
vim.opt.listchars:append({trail="~", tab = " ", extends = "»", precedes = "«", nbsp = "␣"})
vim.opt.swapfile = false
vim.keymap.set("x",'/','<Esc>/\\%V')
vim.keymap.set("x", "<leader>p", "\"_dP")
vim.keymap.set('i', "jk", "<esc>")
local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " } for type, icon in pairs(signs) do local hl = "DiagnosticSign" .. type vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" }) end
if vim.loop.os_uname().sysname == "Darwin" then
vim.o.guifont = "FiraCode Nerd Font:h17"
else
vim.o.guifont = "Hack Nerd Font:h11"
end