Skip to content

Releases: rxtsel/template-string.nvim

v0.2.0

07 Jul 20:15
fc00138
Compare
Choose a tag to compare

Release v0.2.0

Changes

  • Automatic Configuration: The plugin now configures itself automatically upon loading, removing the need for manual setup. This simplifies the usage and integration of the plugin.

    Previous Configuration:

    {
        "rxtsel/template-string.nvim",
        event = "BufReadPost",
        dependencies = {
            "nvim-lua/plenary.nvim",
        },
        config = function()
            require("template-string").setup()
        end,
    }

    New Configuration:

    {
        "rxtsel/template-string.nvim",
        event = "BufReadPost",
        dependencies = {
            "nvim-lua/plenary.nvim",
            "nvim-treesitter/nvim-treesitter"
        }
    }
  • Default Enabled Filetypes: The plugin now supports tsx, jsx, ts, and js filetypes by default, eliminating the need for additional configuration.

  • Integration with nvim-treesitter: The plugin now utilizes nvim-treesitter to accurately detect and manipulate JSX/TSX nodes, enhancing its functionality and precision.

Breaking Changes

  • Removed Manual Setup: The previous method of passing configuration parameters to setup() is no longer supported. The plugin now initializes automatically.

    Removed Configuration:

    -- Default configuration
    require('template-string').setup({
        jsx_brackets = true, -- Wrap template literals with {``} inside JSX/TSX components
    })

    New Behavior: The plugin now automatically wraps template literals with {``} inside JSX/TSX components without requiring additional setup.

Fixes

  • Bug Fixes: Various bugs have been addressed to improve the stability and functionality of the plugin.

v0.1.0

22 May 23:22
Compare
Choose a tag to compare

Features

  • Wrap template literals with {``} when inside JSX/TSX components.
  • Revert template literals to their original form when necessary.
  • Configurable options to enable/disable wrapping with {``}.