diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c284c65..f8772d5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,4 +28,4 @@ jobs: - name: Run Tests run: | nvim --version - nvim --headless -u test/init.lua -c "lua require'plenary.test_harness'.test_directory('test/', {minimal_init='test/init.lua',sequential=true})" + make test diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..64da472 --- /dev/null +++ b/Makefile @@ -0,0 +1,2 @@ +test: * + nvim --headless -u test/init.lua -c "lua require'plenary.test_harness'.test_directory('test/', {minimal_init='test/init.lua',sequential=true})" diff --git a/lua/splitjoin.lua b/lua/splitjoin.lua index d1b4e4c..d8afb1a 100644 --- a/lua/splitjoin.lua +++ b/lua/splitjoin.lua @@ -9,8 +9,12 @@ local is_in_node_range = vim.treesitter.is_in_node_range ---@field default_indent string ---@field surround string[] tuple of surround strings ---@field separator string=',' +---@field separator_is_node boolean=true ---@field padding string ----@field trailing_separator boolean=true +---@field trailing_separator boolean=true true when a trailing separator (e.g. trailing comma) is permitted/desired + +---@class SplitjoinLanguageConfig +---@field nodes table ---@class SplitjoinOptions ---@field default_indent string