auto_set_synax. closes #208

This commit is contained in:
Rene Schallner
2023-01-25 20:25:17 +01:00
parent cfa3c6e038
commit db45a161ad
3 changed files with 55 additions and 35 deletions

View File

@@ -45,6 +45,10 @@ local function defaultConfig(home)
-- and thus the telekasten syntax will not be loaded either
auto_set_filetype = true,
-- auto-set telekasten syntax: if false, the telekasten syntax will not be set
-- this syntax setting is independent from auto-set filetype
auto_set_syntax = true,
-- dir names for special notes (absolute path or subdir name)
dailies = home .. "/" .. "daily",
weeklies = home .. "/" .. "weekly",
@@ -1213,6 +1217,9 @@ picker_actions.post_open = function()
if M.Cfg.auto_set_filetype then
vim.cmd("set ft=telekasten")
end
if M.Cfg.auto_set_syntax then
vim.cmd("set syntax=telekasten")
end
end
picker_actions.select_default = function(prompt_bufnr)