Skip to content

Commit

Permalink
fix(text): enforce text settings
Browse files Browse the repository at this point in the history
- Sometimes not respected
  • Loading branch information
tricktux committed Oct 17, 2024
1 parent 092793e commit 0917252
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion defaults/.config/nvim/lua/aucmds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local M = {}
local function set_text_settings()
vim.opt_local.wrap = false
vim.opt_local.spell = true
vim.opt.conceallevel = 0
vim.opt.conceallevel = vim.g.advanced_plugins == 1 and 2 or 0
vim.opt.textwidth = 0
vim.opt.foldenable = true
vim.opt.complete:append('kspell')
Expand Down Expand Up @@ -156,6 +156,14 @@ M.setup = function()
})

id = api.nvim_create_augroup('Buf', { clear = true })
vim.api.nvim_create_autocmd('BufEnter', {
pattern = {"*.md"},
group = id,
desc = 'Set text settings',
callback = function()
set_text_settings()
end, -- Call the function we defined
})
vim.api.nvim_create_autocmd('BufEnter', {
group = id,
desc = 'Set winbar',
Expand Down

0 comments on commit 0917252

Please sign in to comment.