From 4e2e50125d163eb8b6d5cab85454d6af2b03a8e7 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Thu, 20 Jul 2023 13:37:28 +0100 Subject: [PATCH] Set textwidth in norg files for better readability --- lua/plugins/nvim_neorg.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/plugins/nvim_neorg.lua b/lua/plugins/nvim_neorg.lua index 5697bda..20727b5 100644 --- a/lua/plugins/nvim_neorg.lua +++ b/lua/plugins/nvim_neorg.lua @@ -15,6 +15,10 @@ return { pattern = { "*.norg" }, command = "setlocal spell spelllang=en_gb", }) + vim.api.nvim_create_autocmd({ "BufReadPre", "BufNewFile" }, { + pattern = { "*.norg" }, + command = "setlocal textwidth=79", + }) vim.api.nvim_create_autocmd({ "BufReadPost", "BufNewFile" }, { pattern = { "*.norg" }, command = "lua require('nabla').enable_virt()",