Skip to content

Commit

Permalink
feat(snippets): add NEW MODULE
Browse files Browse the repository at this point in the history
  • Loading branch information
echasnovski committed Dec 21, 2024
1 parent 4228f16 commit 4c1d893
Show file tree
Hide file tree
Showing 110 changed files with 10,401 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
version: v0.19.0
# CLI arguments
args: --color always --check .
args: --color always --respect-ignores --check .

gendoc:
name: Document generation
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ repos:
name: StyLua
language: system
entry: stylua
args: [--respect-ignores]
types: [lua]
- id: gendocs
name: Gendocs
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@

- FEATURE: update `grep` and `grep_live` pickers to allow `globs` local option which restricts search to files that match any of its glob patterns (for example, `{ '*.lua', 'lua/**' }` will only search in Lua files and files in 'lua' directory). The `grep_live` picker also has custom `<C-o>` mapping to add globs interactively after picker is opened.

## mini.snippets

- Introduction of a new module.

## mini.surround

- BREAKING: created mappings for `find`, `find_left`, and `highlight` are now *not* dot-repeatable. Dot-repeat should repeat last text change but neither of those actions change text. Having them dot-repeatable breaks the common "move cursor -> press dot" workflow. Initially making them dot-repeatable was a "you can but you should not" type of mistake.
Expand Down
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,14 @@ Here is a list of all highlight groups defined inside 'mini.nvim' modules. See d
- `MiniPickPreviewRegion`
- `MiniPickPrompt`

- 'mini.snippets':

- `MiniSnippetsCurrent`
- `MiniSnippetsCurrentReplace`
- `MiniSnippetsFinal`
- `MiniSnippetsUnvisited`
- `MiniSnippetsVisited`

- 'mini.starter':
- `MiniStarterCurrent`
- `MiniStarterFooter`
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ If you are browsing without particular objective and don't know which module to
| mini.pairs | Autopairs | [README](readmes/mini-pairs.md) | [Help file](doc/mini-pairs.txt) |
| mini.pick | Pick anything | [README](readmes/mini-pick.md) | [Help file](doc/mini-pick.txt) |
| mini.sessions | Session management | [README](readmes/mini-sessions.md) | [Help file](doc/mini-sessions.txt) |
| mini.snippets | Manage and expand snippets | [README](readmes/mini-snippets.md) | [Help file](doc/mini-snippets.txt) |
| mini.splitjoin | Split and join arguments | [README](readmes/mini-splitjoin.md) | [Help file](doc/mini-splitjoin.txt) |
| mini.starter | Start screen | [README](readmes/mini-starter.md) | [Help file](doc/mini-starter.txt) |
| mini.statusline | Statusline | [README](readmes/mini-statusline.md) | [Help file](doc/mini-statusline.txt) |
Expand Down Expand Up @@ -167,7 +168,6 @@ This is the list of modules I currently intend to implement eventually (as my fr

- 'mini.cycle' - cycle through alternatives with pre-defined rules. Something like [monaqa/dial.nvim](https://github.com/monaqa/dial.nvim) and [AndrewRadev/switch.vim](https://github.com/AndrewRadev/switch.vim)
- 'mini.keymap' - utilities to make non-trivial mappings (like [max397574/better-escape.nvim](https://github.com/max397574/better-escape.nvim) and dot-repeatable mappings).
- 'mini.snippets' - work with snippets. Something like [L3MON4D3/LuaSnip](https://github.com/L3MON4D3/LuaSnip) but only with more straightforward functionality.
- 'mini.statuscolumn' - customizable 'statuscolumn'.
- 'mini.terminals' - coherently manage terminal windows and send text from buffers to terminal windows. Something like [kassio/neoterm](https://github.com/kassio/neoterm).
- 'mini.quickfix' - fuzzy search and preview of quickfix entries. Possibly with some presets for populating quickfix list (like files, help tags, etc.). Similar to [kevinhwang91/nvim-bqf](https://github.com/kevinhwang91/nvim-bqf).
1,147 changes: 1,147 additions & 0 deletions doc/mini-snippets.txt

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions doc/mini.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Table of contents:
Autopairs ..................................................... |mini.pairs|
Pick anything .................................................. |mini.pick|
Session management ......................................... |mini.sessions|
Manage and expand snippets ................................. |mini.snippets|
Split and join arguments .................................. |mini.splitjoin|
Start screen ................................................ |mini.starter|
Statusline ............................................... |mini.statusline|
Expand Down Expand Up @@ -262,6 +263,11 @@ Table of contents:
using |mksession|. Implements both global (from configured directory) and
local (from current directory) sessions.

- |MiniSnippets| - manage and expand snippets. Supports only syntax from LSP
specification. Provides flexible loaders to manage snippet files, exact and
fuzzy prefix matching, interactive selection, and rich interactive snippet
session experience with dynamic tabstop visualization.

- |MiniSplitjoin| - split and join arguments (regions inside brackets
between allowed separators). Has customizable pre and post hooks.
Works inside comments.
Expand Down
6 changes: 6 additions & 0 deletions lua/mini/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
--- Autopairs ..................................................... |mini.pairs|
--- Pick anything .................................................. |mini.pick|
--- Session management ......................................... |mini.sessions|
--- Manage and expand snippets ................................. |mini.snippets|
--- Split and join arguments .................................. |mini.splitjoin|
--- Start screen ................................................ |mini.starter|
--- Statusline ............................................... |mini.statusline|
Expand Down Expand Up @@ -262,6 +263,11 @@
--- using |mksession|. Implements both global (from configured directory) and
--- local (from current directory) sessions.
---
--- - |MiniSnippets| - manage and expand snippets. Supports only syntax from LSP
--- specification. Provides flexible loaders to manage snippet files, exact and
--- fuzzy prefix matching, interactive selection, and rich interactive snippet
--- session experience with dynamic tabstop visualization.
---
--- - |MiniSplitjoin| - split and join arguments (regions inside brackets
--- between allowed separators). Has customizable pre and post hooks.
--- Works inside comments.
Expand Down
Loading

0 comments on commit 4c1d893

Please sign in to comment.