diff --git a/nvim/.config/nvim/lua/personal/scratchpad.lua b/nvim/.config/nvim/lua/personal/scratchpad.lua index 676d9c4..7a51a4d 100644 --- a/nvim/.config/nvim/lua/personal/scratchpad.lua +++ b/nvim/.config/nvim/lua/personal/scratchpad.lua @@ -6,7 +6,7 @@ appear in the buffer list. Useful for e.g. jotting down quick notes and thoughts If called with bang, will replace the current buffer with the scratch window, otherwise opens a new split. -The buffer, by default is set to the pandoc filetype. +The buffer, by default is set to the markdown filetype. This can be changed by setting the `g:scratchpad_ft` variable or the `b:scratchpad_ft` variable to the intended filetype. ]] @@ -25,9 +25,9 @@ function M.create(split, ft) else split = true end - -- which filetype to set for the scratchpad, defaults to pandoc + -- which filetype to set for the scratchpad, defaults to markdown if isempty(ft) then - ft = vim.b["scratchpad_ft"] or vim.g["scratchpad_ft"] or "pandoc" + ft = vim.b["scratchpad_ft"] or vim.g["scratchpad_ft"] or "markdown" end local buf = api.nvim_create_buf(false, true) diff --git a/nvim/.config/nvim/lua/plugins/core.lua b/nvim/.config/nvim/lua/plugins/core.lua index b1dd640..878f302 100644 --- a/nvim/.config/nvim/lua/plugins/core.lua +++ b/nvim/.config/nvim/lua/plugins/core.lua @@ -173,6 +173,11 @@ return { evaluate_single = true, items = { starter.sections.builtin_actions(), + { + name = "Scratchpad", + action = "lua require('personal.scratchpad').create()", + section = "Builtin actions", + }, starter.sections.recent_files(10, true), starter.sections.recent_files(10, false), -- Use this if you set up 'mini.sessions'