From e6772b7315a8ccf497fb8ce3d6a70fab2e20e1c8 Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 25 Oct 2024 17:05:16 +0900 Subject: [PATCH] fixup! Fix spelling issues and add spelling dictionary Remove backticks from repository names Repository names are names, not code, so they shouldn't have backticks --- .github/data/project-dictionary.txt | 8 ++++++++ DOC.md | 14 +++++++------- README.md | 10 +++++----- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/data/project-dictionary.txt b/.github/data/project-dictionary.txt index 817192b19..f2e3b76ec 100644 --- a/.github/data/project-dictionary.txt +++ b/.github/data/project-dictionary.txt @@ -40,6 +40,8 @@ backtick boolean choiceNode choiceNodes +cmp +compe config configs counterintuitive @@ -64,19 +66,24 @@ functionNode functionNodes get's globals +honza ing insertNode insertNodes +jsregexp jumpable jumplist keymaps luasnip +molleweide multiline namespace namespaces +nilsnip panvimdoc plaintext pos +posnil postfix pre precompile @@ -96,3 +103,4 @@ th there'd truthy varargs +vsnip diff --git a/DOC.md b/DOC.md index bb5c554b0..999a91713 100644 --- a/DOC.md +++ b/DOC.md @@ -591,7 +591,7 @@ s("trig", { `snippetNode`, not the surrounding snippet (only the surrounding snippet contains data like `env` or `captures`). - - `user_args`: The `user_args` passed in `opts`. Note that there may be multiple user_args + - `user_args`: The `user_args` passed in `opts`. Note that there may be multiple `user_args` (e.g. `user_args1, ..., user_argsn`). `fn` shall return a string, which will be inserted as is, or a table of @@ -1531,7 +1531,7 @@ ls.add_snippets("all", { -![fmt](https://user-images.githubusercontent.com/25300418/184359228-d30df745-0fe8-49df-b28d-662e7eb050ec.gif) +![`fmt`](https://user-images.githubusercontent.com/25300418/184359228-d30df745-0fe8-49df-b28d-662e7eb050ec.gif) @@ -1902,7 +1902,7 @@ The first argument has to be a table, which defines at least `trig` and (`"copy"`), or not at all (`nil`). - `matchTSNode`: How to determine whether there is a matching node in front of the cursor. There are two options: - * `fun(parser: LuaSnip.extra.TSParser, pos: { [1]: number, [2]: number }): LuaSnip.extra.NamedTSMatch?, TSNode? + * `fun(parser: LuaSnip.extra.TSParser, pos: { [1]: number, [2]: number }): LuaSnip.extra.NamedTSMatch?, TSNode?` Manually determine whether there is a matching node that ends just before `pos` (the beginning of the trigger). Return `nil,nil` if there is no match, otherwise first return a table @@ -2387,7 +2387,7 @@ invalid `$0`. Default true. Both `trim_empty` and `dedent` will be disabled for snippets parsed via -`ls.lsp_expand`: it might prevent correct expansion of snippets sent by lsp. +`ls.lsp_expand`: it might prevent correct expansion of snippets sent by LSP. ## SnipMate Parser @@ -2408,7 +2408,7 @@ snippet body is parsed differently. To apply [Variable/Placeholder-transformations](https://code.visualstudio.com/docs/editor/userdefinedsnippets#_variable-transforms), LuaSnip needs to apply ECMAScript regular expressions. -This is implemented by relying on [`jsregexp`](https://github.com/kmarius/jsregexp). +This is implemented by relying on [jsregexp](https://github.com/kmarius/jsregexp). The easiest (but potentially error-prone) way to install it is by calling `make install_jsregexp` in the repository root. @@ -2663,7 +2663,7 @@ section if one is having issues adding snippets via loaders. ## VS-Code As a reference on the structure of these snippet libraries, see -[`friendly-snippets`](https://github.com/rafamadriz/friendly-snippets). +[friendly-snippets](https://github.com/rafamadriz/friendly-snippets). We support a small extension: snippets can contain LuaSnip-specific options in the `luasnip`-table: @@ -2823,7 +2823,7 @@ require("luasnip.loaders.from_vscode").load_standalone({path = "a.code-snippets" Luasnip does not support the full SnipMate format: Only `./{ft}.snippets` and `./{ft}/*.snippets` will be loaded. See -[`honza/vim-snippets`](https://github.com/honza/vim-snippets) for lots of +[honza/vim-snippets](https://github.com/honza/vim-snippets) for lots of examples. Like VSCode, the SnipMate format is also extended to make use of some of diff --git a/README.md b/README.md index 3312cbdef..ebdb71859 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ https://user-images.githubusercontent.com/41961280/122515860-5179fa00-d00e-11eb- - Easy Postfix Snippets - Fast - Parse [LSP-Style](https://microsoft.github.io/language-server-protocol/specification#snippet_syntax) Snippets either directly in Lua, as a VSCode package or a SnipMate snippet collection. -- Expand LSP-Snippets with [`nvim-compe`](https://github.com/hrsh7th/nvim-compe) (or its' successor, [`nvim-cmp`](https://github.com/hrsh7th/nvim-cmp) (requires [`cmp_luasnip`](https://github.com/saadparwaiz1/cmp_luasnip))) +- Expand LSP-Snippets with [nvim-compe](https://github.com/hrsh7th/nvim-compe) (or its' successor, [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) (requires [cmp_luasnip](https://github.com/saadparwaiz1/cmp_luasnip))) - Snippet history (jump back into older snippets) - Resolve filetype at the cursor using Treesitter @@ -105,7 +105,7 @@ setting up a super-tab-like mapping. Check out [the doc](https://github.com/L3MON4D3/LuaSnip/blob/master/DOC.md#loaders) for a general explanation of the loaders and their benefits. The following list serves only as a short overview. -- **VS Code-like**: To use existing VS Code style snippets from a plugin (e.g. [`rafamadriz/friendly-snippets`](https://github.com/rafamadriz/friendly-snippets)) simply install the plugin and then add +- **VS Code-like**: To use existing VS Code style snippets from a plugin (e.g. [rafamadriz/friendly-snippets](https://github.com/rafamadriz/friendly-snippets)) simply install the plugin and then add ```lua require("luasnip.loaders.from_vscode").lazy_load() ``` @@ -123,7 +123,7 @@ loaders and their benefits. The following list serves only as a short overview. ``` The SnipMate format is very simple, so adding **custom snippets** only requires a few steps: - add a directory beside your `init.vim` (or any other place that is in your `runtimepath`) named `snippets`. - - inside that directory, create files named `.snippets` and add snippets for the given filetype in it (for inspiration, check [`honza/vim-snippets`](https://github.com/honza/vim-snippets/tree/master/snippets)). + - inside that directory, create files named `.snippets` and add snippets for the given filetype in it (for inspiration, check [honza/vim-snippets](https://github.com/honza/vim-snippets/tree/master/snippets)). ``` snipmate # comment snippet @@ -136,7 +136,7 @@ loaders and their benefits. The following list serves only as a short overview. - **Lua**: Add the snippets by calling `require("luasnip").add_snippets(filetype, snippets)`. An example for this can be found [here](https://github.com/L3MON4D3/LuaSnip/blob/master/Examples/snippets.lua#L190). This can also be done much cleaner, with all the benefits that come with using a loader, by using the [loader for Lua](https://github.com/L3MON4D3/LuaSnip/blob/master/DOC.md#lua) -There's also a repository collecting snippets for various languages, [`molleweide/LuaSnip-snippets.nvim`](https://github.com/molleweide/LuaSnip-snippets.nvim) +There's also a repository collecting snippets for various languages, [molleweide/LuaSnip-snippets.nvim](https://github.com/molleweide/LuaSnip-snippets.nvim) ## Documentation @@ -187,4 +187,4 @@ Here are some LuaSnip videos and tutorials on the Web: - A [collection of LuaSnip guides](https://evesdropper.dev/files/luasnip) by [@evesdropper](https://github.com/evesdropper), with most of them also in a LaTeX context - An introductory LuaSnip [video tutorial for beginners](https://www.youtube.com/watch?v=ub0REXjhpmk) by Ziontee113 -Inspired by [`vsnip.vim`](https://github.com/hrsh7th/vim-vsnip/) +Inspired by [vsnip.vim](https://github.com/hrsh7th/vim-vsnip/)