diff options
Diffstat (limited to 'dot_config/nvim/pre.fnl')
| -rw-r--r-- | dot_config/nvim/pre.fnl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/dot_config/nvim/pre.fnl b/dot_config/nvim/pre.fnl index 0b2c9af..a22a233 100644 --- a/dot_config/nvim/pre.fnl +++ b/dot_config/nvim/pre.fnl @@ -35,3 +35,13 @@ :* (recc :vim.ui.clipboard.osc52 :copy :*)} :paste {:+ (recc :vim.ui.clipboard.osc52 :paste :+) :* (recc :vim.ui.clipboard.osc52 :paste :*)}}))) + +; editorconfig extensions +(let [ec (require :editorconfig)] + (set ec.properties.filetype + (fn [bufnr val opts] + (let [bo (. vim.bo bufnr)] + (when (not= bo.filetype val) + (set bo.filetype val) + ; otherwise the change in ft will override editorconfig settings + (ec.config bufnr)))))) |
