Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow custom formatting via indent_lines key. #138

Merged
merged 4 commits into from
Aug 13, 2022

Conversation

kylechui
Copy link
Owner

No description provided.

@kylechui kylechui linked an issue Aug 11, 2022 that may be closed by this pull request
3 tasks
@kylechui kylechui changed the title feat: Allow custom formatting via format_lines key. feat: Allow custom formatting via indent_lines key. Aug 13, 2022
@kylechui kylechui merged commit 3cf62f2 into v2.0.0 Aug 13, 2022
@kylechui kylechui deleted the custom-indentation branch August 13, 2022 18:02
kylechui added a commit that referenced this pull request Aug 15, 2022
* refactor!: Easier user configuration. (#130)

* feat!: Easier user configuration.

* Breaking change: The translation layer first falls back on any defined
  defaults, before using `invalid_key_behavior`.

* docs: Improve code docs for `config`.

* refactor!: Rename `textobject` to `motion`.

Breaking Change: The `textobject` key for the `config.get_selection()`
function has been renamed to `motion`, to allow for more generalized
surrounds. As a result, all existing `textobject` values should have `a`
pre-pended to them.

* refactor!: Rename the highlight group.

Breaking Change: Renames the highlight group from
`NvimSurroundHighlightTextObject` to `NvimSurroundHighlight`.

* fix: Incorrectly surrounds multi-byte characters.

* Remaining issues: Visual block mode.

* fix: Visual block multi-byte empty lines.

* Remaining issues: Does not surround the literal visual block.

* fix: Blockwise visual multi-byte character surrounds.

* chore: Better comment blockwise visual code.

* feat: Add native Tree-sitter support. (#133)

* feat: Add native Tree-sitter support.

* Documents the new feature.
* Changes default behavior for `f` to use Tree-sitter nodes by default,
  falling back on Lua patterns.
* Refactors the "nearest selection" heuristic into its own function.

* feat: Improve HTML tag/function call patterns.

* feat: Sample filetype config for Lua files.

* feat: Improve pattern-matching Tree-sitter nodes.

* feat!: Add `languages` file with new API.

* fix: Naming bug.

* refactor: Rename `languages` to `filetype`.

* docs: Comment code.

* feat: Tweak function call delete pattern.

* docs: Update help docs with new information.

* fix: Failing function call test cases.

* fix: Hopefully appease luacheck.

* feat: Add a whole host of new built-in filetypes.

* ci: Update luacheck workflow.

* ci: Try to fix luacheck integration.

* feat: Automatically configure filetype-specific surrounds.

* docs: Remove `filetype` docs.

* feat: Allow custom indentation via `indent_lines` key. (#138)

* feat: Allow custom formatting via `format_lines` key.

* fix: Insert surrounds also depend on format key.

* refactor!: Rename `format_lines` to `indent_lines`.

* docs: Add `indent_lines`, fix section numbering.

* docs: Update README with tags, Tree-sitter, etc.

* fix: Fallback on default surround if no Tree-sitter.

* fix: Jumping heuristic.

* chore: Add deprecation warnings.

* docs: Update type annotations.

* docs: Update `change.replacement` type annotation.

* chore: Delete unused function.

* docs: Update README with dependencies.

* feat: Make `change` key optional.

* By default, `change.target` will take on the `delete` key's values,
  analogous to how `change.replacement` will take on the next surround's
  `add` key's value.

* fix: `invalid_key_behavior` should check for `false`.

* feat!: Disable filetype configs by default.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: Allow users to customize or disable indentation.
1 participant