-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* vsnip is very buggy. hrsh7th/vim-vsnip#254 * luasnip loads too many files at startup. Lazy-load it at InsertEnter and <C-l>. * My patch to break undo sequence before expanding. Upstream it? * Make vsnip snippets available for luasnip. * Port some advanced vsnip snippets to luasnip.
- Loading branch information
Showing
7 changed files
with
151 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
return { | ||
s("date", p(os.date, "%Y-%m-%d")), | ||
s("diso", p(os.date, "%Y-%m-%d %H:%M:%S%z")), | ||
s("time", p(os.date, "%H:%M")), | ||
s("modeline", fmt([[vim: set {}:]], { i(0, "opt=value") })), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff --git a/lua/luasnip/init.lua b/lua/luasnip/init.lua | ||
index 99e9284..e62b88a 100644 | ||
--- a/lua/luasnip/init.lua | ||
+++ b/lua/luasnip/init.lua | ||
@@ -284,6 +284,7 @@ local function expand(opts) | ||
local jump_into_func = opts and opts.jump_into_func | ||
|
||
local cursor = util.get_cursor_0ind() | ||
+ vim.cmd[[let &undolevels = &undolevels]] | ||
-- override snip with expanded copy. | ||
snip = snip_expand(snip, { | ||
expand_params = expand_params, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"name": "vscode snippets for luasnip", | ||
"contributes": { | ||
"snippets": [ | ||
{ | ||
"language": [ | ||
"markdown", | ||
"pandoc" | ||
], | ||
"path": "./markdown.json" | ||
}, | ||
{ | ||
"language": [ | ||
"all" | ||
], | ||
"path": "./global.json" | ||
}, | ||
{ | ||
"language": [ | ||
"coq" | ||
], | ||
"path": "./coq.json" | ||
}, | ||
{ | ||
"language": [ | ||
"rust" | ||
], | ||
"path": "./rust.json" | ||
}, | ||
{ | ||
"language": [ | ||
"tex", | ||
"pandoc" | ||
], | ||
"path": "./tex.json" | ||
} | ||
] | ||
} | ||
} |
Oops, something went wrong.