2021-06-13 11:02:27 -05:00
|
|
|
local globals = {
|
2022-03-09 11:50:01 -06:00
|
|
|
coq_settings = {
|
|
|
|
['display.icons.mode'] = 'none'
|
|
|
|
},
|
|
|
|
dashboard_default_executive = 'telescope',
|
2021-06-13 11:02:27 -05:00
|
|
|
mapleader = ' ',
|
|
|
|
maplocalleader = ' ',
|
|
|
|
completion_enable_auto_popup = 0,
|
|
|
|
skipview_files = {'COMMIT_EDITMSG'},
|
|
|
|
indent_blankline_char = '▏',
|
|
|
|
indent_blankline_filetype_exclude = {'help', 'packer'},
|
|
|
|
indent_blankline_buftype_exclude = {'terminal', 'nofile'},
|
|
|
|
indent_blankline_char_highlight = 'LineNr',
|
2021-07-22 18:51:27 -05:00
|
|
|
svelte_preprocessors = {'typescript', 'coffeescript', 'sass', 'pug'},
|
|
|
|
svelte_preprocessor_tags = {
|
|
|
|
{name = 'sass', tag = 'lang', as = 'sass'},
|
|
|
|
{name = 'coffeescript', tag = 'lang', as = 'coffeescript'},
|
|
|
|
{name = 'pug', tag = 'pug', as = 'pug'},
|
|
|
|
},
|
|
|
|
svelte_indent_script = 0,
|
|
|
|
svelte_indent_style = 0,
|
2021-06-13 11:02:27 -05:00
|
|
|
}
|
|
|
|
for k,v in pairs(globals) do vim.g[k] = v end
|
|
|
|
|
|
|
|
local options = {
|
2021-07-22 18:51:27 -05:00
|
|
|
clipboard = 'unnamedplus',
|
2021-06-13 11:02:27 -05:00
|
|
|
inccommand = 'nosplit',
|
|
|
|
tabstop = 2,
|
|
|
|
softtabstop = 2,
|
|
|
|
shiftwidth = 2,
|
|
|
|
smartindent = true,
|
|
|
|
list = true,
|
|
|
|
listchars = 'trail:·,tab: ',
|
|
|
|
linebreak = true,
|
|
|
|
formatoptions = 'crql1jn',
|
|
|
|
synmaxcol = 200,
|
|
|
|
lazyredraw = true,
|
|
|
|
scrolloff = 8,
|
|
|
|
sidescrolloff = 15,
|
|
|
|
mouse = 'a',
|
|
|
|
splitright = true,
|
|
|
|
splitbelow = true,
|
|
|
|
errorbells = false,
|
|
|
|
visualbell = true,
|
|
|
|
backup = false,
|
|
|
|
writebackup = false,
|
|
|
|
swapfile = false,
|
|
|
|
timeout = true,
|
|
|
|
timeoutlen = 150,
|
|
|
|
hidden = true,
|
|
|
|
shortmess = 'filnxToOFIac',
|
|
|
|
history = 1000,
|
|
|
|
undofile = true,
|
2021-07-04 11:01:15 -05:00
|
|
|
undodir = vim.g.vimdir .. '/undo',
|
2021-06-13 11:02:27 -05:00
|
|
|
undolevels = 1000,
|
|
|
|
undoreload = 1000,
|
2021-07-04 11:01:15 -05:00
|
|
|
spellfile = vim.g.vimdir .. '/spell/en.utf-8.add',
|
2021-06-13 11:02:27 -05:00
|
|
|
ignorecase = true,
|
|
|
|
smartcase = true,
|
|
|
|
incsearch = true,
|
|
|
|
wrapscan = true,
|
|
|
|
hlsearch = true,
|
|
|
|
foldmethod = 'syntax',
|
|
|
|
foldlevel = 99,
|
|
|
|
foldnestmax = 10,
|
|
|
|
foldlevelstart = 99,
|
|
|
|
autowrite = false,
|
|
|
|
autochdir = true,
|
|
|
|
autoread = true,
|
|
|
|
modeline = false,
|
|
|
|
showmode = false,
|
|
|
|
showcmd = false,
|
|
|
|
laststatus = 2,
|
|
|
|
ruler = false,
|
2021-07-04 11:01:15 -05:00
|
|
|
number = true,
|
2021-06-13 11:02:27 -05:00
|
|
|
}
|
|
|
|
for k,v in pairs(options) do
|
|
|
|
vim.o[k] = v
|
|
|
|
end
|
|
|
|
|
2021-07-04 11:01:15 -05:00
|
|
|
vim.api.nvim_command'colorscheme donokai'
|
|
|
|
|
2021-07-07 12:03:48 -05:00
|
|
|
function SynGroup()
|
|
|
|
local s = vim.fn.synID(vim.fn.line('.'), vim.fn.col('.'), 1)
|
|
|
|
print(vim.fn.synIDattr(s, 'name') .. ' -> ' .. vim.fn.synIDattr(vim.fn.synIDtrans(s), 'name'))
|
|
|
|
end
|
2021-07-04 11:01:15 -05:00
|
|
|
|
2022-03-09 11:50:01 -06:00
|
|
|
vim.api.nvim_exec([[
|
2021-07-19 22:34:33 -05:00
|
|
|
au! TextYankPost * silent! lua vim.highlight.on_yank { higroup='Search', timeout=200 }
|
|
|
|
au! FileType gitcommit exec 'norm gg' | startinsert!
|
|
|
|
au! BufNewFile,BufRead *.slimleex set syntax=slime
|
|
|
|
command! W write
|
2022-03-09 11:50:01 -06:00
|
|
|
]], true)
|
|
|
|
-- au! VimEnter * COQnow -s
|
|
|
|
|
|
|
|
function NeatFoldText()
|
|
|
|
-- TODO: finish this!
|
|
|
|
-- local lines_count = vim.foldend - vim.foldstart + 1
|
|
|
|
-- local foldchar = vim.fn.matchstr(vim.fillchars, 'fold:\\zs.')
|
|
|
|
-- local foldtextstart = vim.fn.strpart('^' . repeat(foldchar, v:foldlevel*2) . line, 0, (winwidth(0)*2)/3)
|
|
|
|
-- let foldtextend = printf("%s %".(winwidth(0)-20)."dL", foldtextstart, getline(v:foldstart), lines_count)
|
|
|
|
-- let foldtextlength = strlen(substitute(foldtextstart . foldtextend, '.', 'x', 'g')) + &foldcolumn
|
|
|
|
-- return printf("%s%d", substitute(getline(v:foldstart), "^.", ">"), lines_count)
|
|
|
|
end
|
|
|
|
-- set foldtext=NeatFoldText()
|