2023-07-10 13:46:48 +02:00
|
|
|
local g = vim.g
|
|
|
|
local o = vim.o
|
|
|
|
local opt = vim.opt
|
|
|
|
|
2023-07-25 17:53:51 +02:00
|
|
|
-- Debug
|
|
|
|
-- vim.lsp.set_log_level('debug')
|
|
|
|
|
2023-07-10 13:46:48 +02:00
|
|
|
-- Indentation
|
|
|
|
opt.tabstop = 2
|
|
|
|
opt.smartindent = true
|
|
|
|
opt.shiftwidth = 2
|
|
|
|
opt.expandtab = true
|
|
|
|
|
|
|
|
-- Line numbers
|
|
|
|
opt.number = true
|
|
|
|
|
2023-07-25 12:59:12 +02:00
|
|
|
-- Clipboard
|
|
|
|
opt.clipboard = "unnamedplus"
|
|
|
|
|
2023-07-23 01:34:24 +02:00
|
|
|
-- Helper punctuation
|
|
|
|
vim.opt.list = true
|
|
|
|
vim.opt.listchars = {
|
|
|
|
trail = '·',
|
|
|
|
nbsp = '␣',
|
|
|
|
tab = '→→',
|
|
|
|
}
|
|
|
|
|
2023-07-27 23:31:51 +02:00
|
|
|
-- Neovide
|
|
|
|
g.neovide_scale_factor = 0.75
|
|
|
|
|
2023-07-23 01:34:24 +02:00
|
|
|
-- Trailing whitespace
|
2023-07-24 22:08:33 +02:00
|
|
|
-- vim.fn.matchadd("errorMsg", [[\s\+$]])
|
2023-07-23 01:34:24 +02:00
|
|
|
vim.api.nvim_create_autocmd("BufWritePre", { command = [[%s/\s\+$//e]] })
|
|
|
|
|
2023-07-10 13:46:48 +02:00
|
|
|
vim.filetype.add({
|
|
|
|
extension = {
|
2023-07-12 00:34:27 +02:00
|
|
|
mdx = "mdx",
|
|
|
|
typ = "typst",
|
2023-07-10 13:46:48 +02:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2023-07-12 19:15:14 +02:00
|
|
|
|
2023-07-10 14:30:11 +02:00
|
|
|
-- Workaround: https://github.com/neovim/neovim/issues/21856
|
|
|
|
vim.api.nvim_create_autocmd({ "VimLeave" }, {
|
|
|
|
callback = function()
|
2023-07-24 22:08:33 +02:00
|
|
|
-- vim.fn.jobstart('notify-send "hello"', {detach=true})
|
|
|
|
vim.cmd([[sleep 10m]])
|
2023-07-10 14:30:11 +02:00
|
|
|
end,
|
|
|
|
})
|
|
|
|
|