Public Access
updated theme, now auto-switches based on kitty theme. added some tools for plaintext writing.
21 lines
772 B
Lua
21 lines
772 B
Lua
vim.cmd("set tabstop=4")
|
|
vim.cmd("set shiftwidth=4")
|
|
vim.wo.relativenumber = true
|
|
vim.opt.number = true
|
|
vim.g.mapleader = " "
|
|
vim.api.nvim_create_autocmd("FileType", {
|
|
pattern = { "markdown", "text", "plaintex" },
|
|
callback = function()
|
|
vim.opt_local.wrap = true
|
|
vim.opt_local.linebreak = true
|
|
vim.opt_local.breakindent = true
|
|
vim.opt_local.showbreak = "↳ "
|
|
end,
|
|
})
|
|
-- Smart navigation for wrapped lines
|
|
vim.keymap.set("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
|
vim.keymap.set("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
|
vim.keymap.set("x", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
|
vim.keymap.set("x", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
|
|