diff options
author | Lewis Russell <lewis6991@gmail.com> | 2023-03-20 10:30:59 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-20 10:30:59 +0000 |
commit | d8f9dcd5deb72f1fbc706d7b3bb5b823c7998e38 (patch) | |
tree | 9354e0f324c274ba9aaae31ddb2269b1a6a54268 /test/functional/lua | |
parent | 84027f7515b8ee6f818462f105882fc0052783c4 (diff) | |
parent | e5641df6d3fc3bb6c3c55593b6152082bfc561b6 (diff) | |
download | rneovim-d8f9dcd5deb72f1fbc706d7b3bb5b823c7998e38.tar.gz rneovim-d8f9dcd5deb72f1fbc706d7b3bb5b823c7998e38.tar.bz2 rneovim-d8f9dcd5deb72f1fbc706d7b3bb5b823c7998e38.zip |
Merge pull request #22634 from lewis6991/feat/tscomment
feat: add vim.filetype.get_option()
Diffstat (limited to 'test/functional/lua')
-rw-r--r-- | test/functional/lua/filetype_spec.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/functional/lua/filetype_spec.lua b/test/functional/lua/filetype_spec.lua index add69235b6..540eae1c9b 100644 --- a/test/functional/lua/filetype_spec.lua +++ b/test/functional/lua/filetype_spec.lua @@ -114,6 +114,21 @@ describe('vim.filetype', function() ]]) end) + it('can get default option values for filetypes via vim.filetype.get_option()', function() + command('filetype plugin on') + + for ft, opts in pairs { + lua = { commentstring = '-- %s' }, + vim = { commentstring = '"%s' }, + man = { tagfunc = 'v:lua.require\'man\'.goto_tag' }, + xml = { formatexpr = 'xmlformat#Format()' } + } do + for option, value in pairs(opts) do + eq(value, exec_lua([[ return vim.filetype.get_option(...) ]], ft, option)) + end + end + + end) end) describe('filetype.lua', function() |