Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 NeoVim 0.7-0.11 Last change: 2026 January 19
*luasnip.txt* For NeoVim 0.7-0.11 Last change: 2026 March 14

==============================================================================
Table of Contents *luasnip-table-of-contents*
Expand Down
2 changes: 1 addition & 1 deletion lua/luasnip/extras/filetype_functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ local function from_cursor_pos()
-- get_parser errors if parser not present (no grammar for language).
local has_parser, parser = pcall(vim.treesitter.get_parser)

if has_parser then
if has_parser and parser then
local cursor = require("luasnip.util.util").get_cursor_0ind()
-- assumption: languagetree uses 0-indexed byte-ranges.
local lang = parser
Expand Down
2 changes: 1 addition & 1 deletion lua/luasnip/extras/snip_location.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ local M = {}
-- function-call.
local function lua_find_function_call_node_at(bufnr, line)
local has_parser, parser = pcall(vim.treesitter.get_parser, bufnr, "lua")
if not has_parser then
if not has_parser or not parser then
error("Error while getting parser: " .. parser)
end

Expand Down