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:
parent
c2bdda9acf
commit
a3b1efeb05
2 changed files with 12 additions and 2 deletions
|
|
@ -1,5 +1,9 @@
|
||||||
local map = vim.keymap.set
|
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
|
if require("core.util").is_available("which-key") then
|
||||||
require("which-key").add({
|
require("which-key").add({
|
||||||
{ "<localleader>c", group = "codecells" },
|
{ "<localleader>c", group = "codecells" },
|
||||||
|
|
|
||||||
|
|
@ -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
|
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
|
end
|
||||||
|
|
||||||
-- TODO: Puths kernel into local file dir currently,
|
-- TODO: Puths kernel into local file dir currently,
|
||||||
|
|
@ -65,7 +71,7 @@ end
|
||||||
vim.api.nvim_create_user_command("JupyterStart", function(opts)
|
vim.api.nvim_create_user_command("JupyterStart", function(opts)
|
||||||
startsession(opts)
|
startsession(opts)
|
||||||
end, { nargs = "?" })
|
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
|
if vim.g.quarto_auto_init_molten_session then
|
||||||
vim.api.nvim_create_autocmd({ "BufEnter" }, {
|
vim.api.nvim_create_autocmd({ "BufEnter" }, {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue