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-29 21:15:17 +02:00
|
|
|
opt.relativenumber = true
|
2023-07-10 13:46:48 +02:00
|
|
|
|
2023-07-25 12:59:12 +02:00
|
|
|
-- Clipboard
|
|
|
|
opt.clipboard = "unnamedplus"
|
|
|
|
|
2023-07-23 01:34:24 +02:00
|
|
|
-- Helper punctuation
|
2023-07-29 21:15:17 +02:00
|
|
|
opt.list = true
|
|
|
|
opt.listchars = {
|
2023-07-23 01:34:24 +02:00
|
|
|
trail = '·',
|
|
|
|
nbsp = '␣',
|
|
|
|
tab = '→→',
|
|
|
|
}
|
|
|
|
|
|
|
|
-- 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-08-16 18:40:52 +02:00
|
|
|
purs = "purescript",
|
2023-07-10 13:46:48 +02:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2023-07-12 19:15:14 +02:00
|
|
|
|
2023-08-15 01:22:35 +02:00
|
|
|
-- Keymap
|
|
|
|
vim.keymap.set('n', "<leader>e", vim.diagnostic.open_float, {})
|
|
|
|
|
|
|
|
|
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,
|
|
|
|
})
|
|
|
|
|