From b4e1ac3b68c70483e454b09124ebabc77cae9878 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Tue, 26 Nov 2024 15:39:04 +0100 Subject: nvim: set vimwiki in vim autocmds --- .config/nvim/after/plugin/autocmds.lua | 15 --------------- .config/nvim/after/plugin/autocmds.vim | 5 +++++ 2 files changed, 5 insertions(+), 15 deletions(-) (limited to '.config/nvim/after') diff --git a/.config/nvim/after/plugin/autocmds.lua b/.config/nvim/after/plugin/autocmds.lua index bdfaf33..3356a49 100644 --- a/.config/nvim/after/plugin/autocmds.lua +++ b/.config/nvim/after/plugin/autocmds.lua @@ -35,21 +35,6 @@ vim.api.nvim_create_autocmd( } ) --- Set vimwiki filetype -vim.api.nvim_create_autocmd( - { - "BufNewFile", - "BufRead", - }, - { - pattern = "PKGBUILD", - callback = function() - local buf = vim.api.nvim_get_current_buf() - vim.api.nvim_set_option_value("filetype", "*.wiki", { buf = buf }) - end - } -) - -- Set buku-edit filetype vim.api.nvim_create_autocmd( { diff --git a/.config/nvim/after/plugin/autocmds.vim b/.config/nvim/after/plugin/autocmds.vim index ae55046..21c7bc4 100644 --- a/.config/nvim/after/plugin/autocmds.vim +++ b/.config/nvim/after/plugin/autocmds.vim @@ -1,2 +1,7 @@ " I don't know how to port this yet autocmd BufRead,BufWrite * if ! &bin | silent! %s/\s\+$//ge | endif + +augroup vimwiki + autocmd! + autocmd BufRead,BufNewFile *.wiki set filetype=vimwiki +augroup END -- cgit v1.2.3-70-g09d2