diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2023-01-25 17:57:01 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2023-01-25 17:57:01 +0000 |
commit | 9837de570c5972f98e74848edc97c297a13136ea (patch) | |
tree | cc948611912d116a3f98a744e690d3d7b6e2f59a /runtime/plugin | |
parent | c367400b73d207833d51e09d663f969ffab37531 (diff) | |
parent | 3c48d3c83fc21dbc0841f9210f04bdb073d73cd1 (diff) | |
download | rneovim-9837de570c5972f98e74848edc97c297a13136ea.tar.gz rneovim-9837de570c5972f98e74848edc97c297a13136ea.tar.bz2 rneovim-9837de570c5972f98e74848edc97c297a13136ea.zip |
Merge remote-tracking branch 'upstream/master' into colorcolchar
Diffstat (limited to 'runtime/plugin')
-rw-r--r-- | runtime/plugin/editorconfig.lua | 13 | ||||
-rw-r--r-- | runtime/plugin/matchparen.vim | 6 | ||||
-rw-r--r-- | runtime/plugin/nvim.lua | 7 |
3 files changed, 23 insertions, 3 deletions
diff --git a/runtime/plugin/editorconfig.lua b/runtime/plugin/editorconfig.lua new file mode 100644 index 0000000000..54cd0e828e --- /dev/null +++ b/runtime/plugin/editorconfig.lua @@ -0,0 +1,13 @@ +local group = vim.api.nvim_create_augroup('editorconfig', {}) +vim.api.nvim_create_autocmd({ 'BufNewFile', 'BufRead', 'BufFilePost' }, { + group = group, + callback = function(args) + -- Buffer-local enable has higher priority + local enable = vim.F.if_nil(vim.b.editorconfig, vim.F.if_nil(vim.g.editorconfig, true)) + if not enable then + return + end + + require('editorconfig').config(args.buf) + end, +}) diff --git a/runtime/plugin/matchparen.vim b/runtime/plugin/matchparen.vim index ce2225c5f8..3982489b92 100644 --- a/runtime/plugin/matchparen.vim +++ b/runtime/plugin/matchparen.vim @@ -1,6 +1,6 @@ " Vim plugin for showing matching parens " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2021 Apr 08 +" Last Change: 2022 Dec 01 " Exit quickly when: " - this plugin was already loaded (or disabled) @@ -19,8 +19,8 @@ endif augroup matchparen " Replace all matchparen autocommands - autocmd! CursorMoved,CursorMovedI,WinEnter,WinScrolled * call s:Highlight_Matching_Pair() - autocmd! WinLeave * call s:Remove_Matches() + autocmd! CursorMoved,CursorMovedI,WinEnter,BufWinEnter,WinScrolled * call s:Highlight_Matching_Pair() + autocmd! WinLeave,BufLeave * call s:Remove_Matches() if exists('##TextChanged') autocmd! TextChanged,TextChangedI * call s:Highlight_Matching_Pair() endif diff --git a/runtime/plugin/nvim.lua b/runtime/plugin/nvim.lua new file mode 100644 index 0000000000..815886f896 --- /dev/null +++ b/runtime/plugin/nvim.lua @@ -0,0 +1,7 @@ +vim.api.nvim_create_user_command('Inspect', function(cmd) + if cmd.bang then + vim.pretty_print(vim.inspect_pos()) + else + vim.show_pos() + end +end, { desc = 'Inspect highlights and extmarks at the cursor', bang = true }) |