nvim: Set default tabwidth in md, quarto to 2

Makes it easier to read lists, and also easier to work with
markdownlint even if it has not been configured for a given repository
(since its list indentations default to 2 spaces).
This commit is contained in:
Marty Oehme 2025-06-20 11:50:33 +02:00
parent c2bdda9acf
commit a3b1efeb05
Signed by: Marty
GPG key ID: 4E535BC19C61886E
2 changed files with 12 additions and 2 deletions

View file

@ -1,5 +1,9 @@
local map = vim.keymap.set
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.softtabstop = 2
if require("core.util").is_available("which-key") then
require("which-key").add({
{ "<localleader>c", group = "codecells" },

View file

@ -1,5 +1,11 @@
local map = vim.keymap.set
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.softtabstop = 2
if require("core.util").is_available("quarto") then
vim.keymap.set("n", "<localleader>po", require("quarto").quartoPreview, { desc = "show quarto preview" })
map("n", "<localleader>po", require("quarto").quartoPreview, { desc = "show quarto preview" })
end
-- TODO: Puths kernel into local file dir currently,
@ -65,7 +71,7 @@ end
vim.api.nvim_create_user_command("JupyterStart", function(opts)
startsession(opts)
end, { nargs = "?" })
vim.keymap.set("n", "<localleader>cS", ":JupyterStart<cr>", { desc = "start code session", silent = true })
map("n", "<localleader>cS", ":JupyterStart<cr>", { desc = "start code session", silent = true })
if vim.g.quarto_auto_init_molten_session then
vim.api.nvim_create_autocmd({ "BufEnter" }, {