From 6c81e38e15455fb3074d9d46c94ec2c951b5a382 Mon Sep 17 00:00:00 2001 From: bh Date: Thu, 9 Apr 2026 15:46:00 +0800 Subject: Fix indentation --- lua/config/luasnip.lua | 54 +++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'lua/config/luasnip.lua') diff --git a/lua/config/luasnip.lua b/lua/config/luasnip.lua index 4524322..1dbc039 100644 --- a/lua/config/luasnip.lua +++ b/lua/config/luasnip.lua @@ -1,36 +1,36 @@ -- Return a function so we can call it from Lazy.nvim return function() - local ls = require("luasnip") + local ls = require("luasnip") - -- Load snippets from friendly-snippets - require("luasnip.loaders.from_vscode").lazy_load() + -- Load snippets from friendly-snippets + require("luasnip.loaders.from_vscode").lazy_load() - -- Example Lua snippets - ls.add_snippets("lua", { - ls.parser.parse_snippet("hi", "print('Hello, world!')"), - ls.parser.parse_snippet("fn", "function ${1:name}(${2:args})\n\t$0\nend"), - }) + -- Example Lua snippets + ls.add_snippets("lua", { + ls.parser.parse_snippet("hi", "print('Hello, world!')"), + ls.parser.parse_snippet("fn", "function ${1:name}(${2:args})\n\t$0\nend"), + }) - local opts = { silent = true, noremap = true } + local opts = { silent = true, noremap = true } - -- Expand snippet or jump forward - vim.keymap.set({ "i", "s" }, "", function() - if ls.expand_or_jumpable() then - ls.expand_or_jump() - end - end, opts) + -- Expand snippet or jump forward + vim.keymap.set({ "i", "s" }, "", function() + if ls.expand_or_jumpable() then + ls.expand_or_jump() + end + end, opts) - -- Jump backward - vim.keymap.set({ "i", "s" }, "", function() - if ls.jumpable(-1) then - ls.jump(-1) - end - end, opts) + -- Jump backward + vim.keymap.set({ "i", "s" }, "", function() + if ls.jumpable(-1) then + ls.jump(-1) + end + end, opts) - -- Change choice in choice node - vim.keymap.set({ "i", "s" }, "", function() - if ls.choice_active() then - ls.change_choice(1) - end - end, opts) + -- Change choice in choice node + vim.keymap.set({ "i", "s" }, "", function() + if ls.choice_active() then + ls.change_choice(1) + end + end, opts) end -- cgit v1.2.3