Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
L3MON4D3 authored Feb 14, 2024
2 parents 2be4a55 + 7770d37 commit 51374d2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion doc/luasnip.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*luasnip.txt* For NVIM v0.8.0 Last change: 2024 January 28
*luasnip.txt* For NVIM v0.8.0 Last change: 2024 February 14

==============================================================================
Table of Contents *luasnip-table-of-contents*
Expand Down
15 changes: 12 additions & 3 deletions tests/helpers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,21 @@ function M.session_setup_luasnip(opts)
end
or vim.treesitter.require_language
-- this is a nop on new versions of neovim, where the lua-parser is shipped by default.
ts_lang_add("lua", os.getenv("LUASNIP_SOURCE") .. "/tests/parsers/lua.so")
ts_lang_add("json", os.getenv("LUASNIP_SOURCE") .. "/tests/parsers/json.so")
ts_lang_add("jsonc", os.getenv("LUASNIP_SOURCE") .. "/tests/parsers/jsonc.so")
]])

local version = exec_lua([[ return vim.version() ]])
local nvim_07_or_09 = (version.minor == 7 or version.minor == 9)
and version.major == 0
if nvim_07_or_09 then
-- 0.7 and 0.9 need a different parser than master :/
-- (actually, master has a lua-parser built-in, so we don't need to
-- load one at all in that case :) )
exec_lua(
[[ts_lang_add("lua", os.getenv("LUASNIP_SOURCE") .. "/tests/parsers/lua_07_09.so")]]
)
end
end

helpers.exec_lua(
Expand Down
File renamed without changes.

0 comments on commit 51374d2

Please sign in to comment.